adding a table to moodle database - moodle

I have some tables in moodle. how can I add a table in it?
I built my table in xmldbeditor first. Then, paste the php code in db/upgrade.php and change it's version to date (2012103000). finall I change version.php to that version. But i think it isn't created. what's the problem?

You need to create proper plugin for that the best place is local plugin folder.
if you creating a new plugin then you can add your tables in local/pluginname/db/install.xml
install.xml will only call when plugin is installed first time.
after that if want to change in structure then you need to put your code into db/upgrade.php and need to change the version and open admin/index.php

I usually back up the data in the tables I already have, uninstall the plugin and then go to the notifications page to install it again. Update.php should be called when you type in a new version number within version.php and then visit the notifications page, but when I am developing a plugin I tend not to rely on that.
Alternatively, load the table within the XMLDB editor on Moodle and click on the "[View SQL code]" link. This will generate SQL code which can be executed on PHPMyAdmin or MySQL Workbench to create the table directly.

Related

Jenkins - Add custom webpage to Jenkins

Management has given me a task to add a link(ex. under "People" link) and display a table w/ data from a DB(MongoDB). The user will be then able to insert/update the table and have it saved to the DB.
Using HTML/CSS/JS I am capable to doing it but I don't know how to modify jenkins to do so. I've looked for plugins like "Simple Theme" but from what I saw it only updates CSS and JS of Jenkins UI. I'm new to Jenkins and really have not idea where to start.
Any suggestions?
Thanks!
To customize a jenkins plugin of your own is a graceful solution but complicated for someone who is new to jenkins.
create a new jenkins-plugin project and need to be familiar with java/maven before.
create a java subclass which implements hudson.model.RootAction.
create index.jelly which display the table data from the DB and need to learn jelly before.

How to change backend layout in Typo3 7.2?

I am new to typo3, i am trying to create a new backend layout for my home page.I need add few custom sections to edit contents.I am not able to find option to do so.
TYPO3 7.2 is out of support and has know security issues. Please update to 7.3 at least.
You can create backend layout records in any folder in the page tree. To select those backend layouts, you have to add this folder as the general record storage in the page properties of the page where you want to use your backend layout.
I suggest you take a look into the Getting started tutorial which will walk you through your first steps.
http://docs.typo3.org/typo3cms/GettingStartedTutorial/
In case you use a distribution, it might be that the backend layout is added in another way, e.g. via TSconfig or directly using PHP. Please consult the according documentation of the distribution in this case.
Figured out myself.
Go to List in Web, then click on add new + icon, then select Backend Layout under System Records.

Magento extension

I have created magento module as per the
Custom Module with Custom Database Table
I have replace with proper variable, but I am not able to see, on able to create.
And I am using 1.7 community edition.
but on the admin panel two blocks are displayed.
how to display only single block
and also have problem that after saving and refreshing page title get change automatically
How to we debug if any error occur in processing request
try to install module with module creator its very simple and easy,,,

Oracle Application Express plugin development using v4.2.2

I am working on some Oracle APEX Plugin development and wonder whether the following requirement is possible.
I basically would like to be able, via a plugin, create a form with say six page items, where two of those page items might be LOVs, another two are page items are text fields, where users have to enter values and the remaining two are display items only.
Based on this form requirement, I want to be able to upload/install this plugin within other Oracle Application Express apps/schemas, so when installed within other apps, this plugin is rendered within a region and the data is stored within a table in that schema, but using the form described above.
Can this be achieved building a plugin in Oracle APEX, and if so, how?
Create a stock application with the pages and regions that need to be replicated, export that, and import it into the other workspaces that need it. Then, when developing an application, copy the regions and/or pages as necessary from that stock application.

is it possible to get an xPages build number?

I do all development in a single application. when a new version is ready I create a template and give it a version number. this way I can store a history of all previous versions.
the development templates are used to push the new design to many applications via replace design.
Creating manual version number or template names is fine but I am looking for a more automatic way of finding out which build the different applications are inherited from
When I visit the different applications I would like to be able to see which build number each application are inherited from. is this possible?
A simple build time stamp could do, but is there a built in build number that can be used and that can be displayed on the xpage.
e.g Build 2012092712345
Update:
Thank you for all your answers, many good suggestions but it looks like all require manual work.
The best solution would be if there is a way to read (from ssjs) a timestamp from any file within the nsf that is always updated during a build. is this possible?
In classic notes, there was a method to add a shared field with a special name to the application. Cannot remember the details, but have it somewhere on the disk.
Then you can see the build number in the design tab of the application properties. And you can of course display the value in your applikation as well.
But you have to fill the item manually on each build. Or use teamstudio Buildmanager. This tool adds the value automatically.
And I also guess that you can write some code that changes the value whenever you create a new build.
Another option would be to use a versioning system like CVS/SVN. This is possible since 8.5.3.
Source control
I think I know what you are meaning. Your a pushing out design and want to check thru code what version each database has. I usually do this with a Build form. In this form I have computed fields with all the data I want to retrieve. Then I open the database with an agent create a document
and set the form field to "BuildForm" and do a computewithform.
Now I can see all information about this database.
I once wrote a rudimentary build system for "classic" Notes, and had the last part of the build pipeline create a form named _BUILDID_, and put the build id in the $Comment field.
The main reason to create a form instead of a shared field was that I could dynamically fetch the form using NotesDatabase.Forms, and open up the desired field.
I sure hope there are simpler solutions nowadays... :-)