https://wiki.mahara.org/api.php?action=feedcontributions&user=Rossdash&feedformat=atomMahara Wiki - User contributions [en-gb]2024-03-28T12:57:10ZUser contributionsMediaWiki 1.35.10https://wiki.mahara.org/index.php?title=Plugins/Artefact/My_ILP&diff=3228Plugins/Artefact/My ILP2012-04-24T13:14:30Z<p>Rossdash: /* Languages */</p>
<hr />
<div>== Individual Learning Plan Plugin ==<br />
<br />
[[File:ILP.png|900px]]<br />
<br />
<br />
Many National Vocational Qualifications (NVQ) involve the formulation of ILPs to record and keep track of a student's progress throughout the length of the course. These courses use a point system; the course has a set point value that needs to be achieved by the students. This is achieved by the selection of units, which have different point values depending on the level of the NVQ. <br />
<br />
This Mahara plugin allows simple ILPs to be maintained. It includes fields for setting the title, description, status, point value, target completion date and the actual date of completion of individual units. It also does calculations on the points, displaying the remaining points needed, the acquired points and the total value of the units added. Each ILP is set up to include the title of the course, its description and its set point value.<br />
<br />
The ILP can be added to a Mahara view, which can also include related resources and artefacts, e.g. a blog, piece of text or Google document that illustrates the work done on the units included in the ILP.<br />
<br />
The plugin allows a user to have multiple instances of ILPs. So, a user can store ILPs for multiple NVQs they may partake.<br />
<br />
The plugin adds a new 'ILP' tab (similar to 'My Plans') to 'My Portfolio' in Mahara. The code was based on 'My Plans'<br />
<br />
== Installation ==<br />
<br />
The plugin is currently available from GitHub.<br />
<br />
https://github.com/rossdash/Individual-Learning-Plan<br />
<br />
Download, unpack and copy the /ilps folder (and included files and folders) into the /artefact folder of your Mahara installation. Then enable the ilps and units from the Plugin Administration interface.<br />
<br />
The plugin should work with any Mahara 1.4.x installation . It creates a new artefact_ilps_unit table and a artefact_ilps_points table which have a 1:1 extension of the artefact table. Please test it on a development installation before production deployment.<br />
<br />
== Languages ==<br />
<br />
This plugin supports the following Languages:<br />
<br />
- English<br />
<br />
- French - Thanks to Dominique-Alain JAN (dajan)<br />
<br />
- Spanish - Thanks to Iñaki Arenaza (iarenaza)<br />
<br />
== Adding an ILP to a Mahara Page (View) ==<br />
<br />
When editing a Page, drag the 'Your ILP' icon (below) into the Page (View) from the 'General' tab of the Mahara toolbar<br />
<br />
[[File:ILP_thumb.png]]<br />
<br />
You can also add related resources and artefacts for the ILPs units to the page, e.g. a blog, peice of text or google document that ilistates the work done on the units included in the ILP.<br />
<br />
It is possible to export a Page (View) containing a ILP as a standalone HTML Website. <br />
<br />
A Page (View) containing a ILP, or multiple ILPs, can also be exported via Leap2A, then imported into another Mahara instance.</div>Rossdashhttps://wiki.mahara.org/index.php?title=Plugins/Artefact/My_ILP&diff=3219Plugins/Artefact/My ILP2012-04-23T10:04:35Z<p>Rossdash: /* Languages */</p>
<hr />
<div>== Individual Learning Plan Plugin ==<br />
<br />
[[File:ILP.png|900px]]<br />
<br />
<br />
Many National Vocational Qualifications (NVQ) involve the formulation of ILPs to record and keep track of a student's progress throughout the length of the course. These courses use a point system; the course has a set point value that needs to be achieved by the students. This is achieved by the selection of units, which have different point values depending on the level of the NVQ. <br />
<br />
This Mahara plugin allows simple ILPs to be maintained. It includes fields for setting the title, description, status, point value, target completion date and the actual date of completion of individual units. It also does calculations on the points, displaying the remaining points needed, the acquired points and the total value of the units added. Each ILP is set up to include the title of the course, its description and its set point value.<br />
<br />
The ILP can be added to a Mahara view, which can also include related resources and artefacts, e.g. a blog, piece of text or Google document that illustrates the work done on the units included in the ILP.<br />
<br />
The plugin allows a user to have multiple instances of ILPs. So, a user can store ILPs for multiple NVQs they may partake.<br />
<br />
The plugin adds a new 'ILP' tab (similar to 'My Plans') to 'My Portfolio' in Mahara. The code was based on 'My Plans'<br />
<br />
== Installation ==<br />
<br />
The plugin is currently available from GitHub.<br />
<br />
https://github.com/rossdash/Individual-Learning-Plan<br />
<br />
Download, unpack and copy the /ilps folder (and included files and folders) into the /artefact folder of your Mahara installation. Then enable the ilps and units from the Plugin Administration interface.<br />
<br />
The plugin should work with any Mahara 1.4.x installation . It creates a new artefact_ilps_unit table and a artefact_ilps_points table which have a 1:1 extension of the artefact table. Please test it on a development installation before production deployment.<br />
<br />
== Languages ==<br />
<br />
This plugin supports the following Languages:<br />
<br />
- English<br />
<br />
- French - Thanks to Dominique-Alain JAN (dajan)<br />
<br />
== Adding an ILP to a Mahara Page (View) ==<br />
<br />
When editing a Page, drag the 'Your ILP' icon (below) into the Page (View) from the 'General' tab of the Mahara toolbar<br />
<br />
[[File:ILP_thumb.png]]<br />
<br />
You can also add related resources and artefacts for the ILPs units to the page, e.g. a blog, peice of text or google document that ilistates the work done on the units included in the ILP.<br />
<br />
It is possible to export a Page (View) containing a ILP as a standalone HTML Website. <br />
<br />
A Page (View) containing a ILP, or multiple ILPs, can also be exported via Leap2A, then imported into another Mahara instance.</div>Rossdashhttps://wiki.mahara.org/index.php?title=Plugins/Artefact/My_ILP&diff=3218Plugins/Artefact/My ILP2012-04-23T10:04:11Z<p>Rossdash: </p>
<hr />
<div>== Individual Learning Plan Plugin ==<br />
<br />
[[File:ILP.png|900px]]<br />
<br />
<br />
Many National Vocational Qualifications (NVQ) involve the formulation of ILPs to record and keep track of a student's progress throughout the length of the course. These courses use a point system; the course has a set point value that needs to be achieved by the students. This is achieved by the selection of units, which have different point values depending on the level of the NVQ. <br />
<br />
This Mahara plugin allows simple ILPs to be maintained. It includes fields for setting the title, description, status, point value, target completion date and the actual date of completion of individual units. It also does calculations on the points, displaying the remaining points needed, the acquired points and the total value of the units added. Each ILP is set up to include the title of the course, its description and its set point value.<br />
<br />
The ILP can be added to a Mahara view, which can also include related resources and artefacts, e.g. a blog, piece of text or Google document that illustrates the work done on the units included in the ILP.<br />
<br />
The plugin allows a user to have multiple instances of ILPs. So, a user can store ILPs for multiple NVQs they may partake.<br />
<br />
The plugin adds a new 'ILP' tab (similar to 'My Plans') to 'My Portfolio' in Mahara. The code was based on 'My Plans'<br />
<br />
== Installation ==<br />
<br />
The plugin is currently available from GitHub.<br />
<br />
https://github.com/rossdash/Individual-Learning-Plan<br />
<br />
Download, unpack and copy the /ilps folder (and included files and folders) into the /artefact folder of your Mahara installation. Then enable the ilps and units from the Plugin Administration interface.<br />
<br />
The plugin should work with any Mahara 1.4.x installation . It creates a new artefact_ilps_unit table and a artefact_ilps_points table which have a 1:1 extension of the artefact table. Please test it on a development installation before production deployment.<br />
<br />
== Languages ==<br />
<br />
This plugin supports the following Languages:<br />
<br />
- English<br />
- French - Thanks to Dominique-Alain JAN (dajan)<br />
<br />
== Adding an ILP to a Mahara Page (View) ==<br />
<br />
When editing a Page, drag the 'Your ILP' icon (below) into the Page (View) from the 'General' tab of the Mahara toolbar<br />
<br />
[[File:ILP_thumb.png]]<br />
<br />
You can also add related resources and artefacts for the ILPs units to the page, e.g. a blog, peice of text or google document that ilistates the work done on the units included in the ILP.<br />
<br />
It is possible to export a Page (View) containing a ILP as a standalone HTML Website. <br />
<br />
A Page (View) containing a ILP, or multiple ILPs, can also be exported via Leap2A, then imported into another Mahara instance.</div>Rossdashhttps://wiki.mahara.org/index.php?title=File:ILP_thumb.png&diff=3217File:ILP thumb.png2012-04-23T10:04:02Z<p>Rossdash: Individual Learning Plan Blocktype thumbnail</p>
<hr />
<div>Individual Learning Plan Blocktype thumbnail</div>Rossdashhttps://wiki.mahara.org/index.php?title=Plugins/Artefact/My_ILP&diff=3216Plugins/Artefact/My ILP2012-04-23T09:47:23Z<p>Rossdash: /* Individual Learning PLan Plugin */</p>
<hr />
<div>== Individual Learning Plan Plugin ==<br />
<br />
[[File:ILP.png|900px]]<br />
<br />
<br />
Many National Vocational Qualifications (NVQ) involve the formulation of ILPs to record and keep track of a student's progress throughout the length of the course. These courses use a point system; the course has a set point value that needs to be achieved by the students. This is achieved by the selection of units, which have different point values depending on the level of the NVQ. <br />
<br />
This Mahara plugin allows simple ILPs to be maintained. It includes fields for setting the title, description, status, point value, target completion date and the actual date of completion of individual units. It also does calculations on the points, displaying the remaining points needed, the acquired points and the total value of the units added. Each ILP is set up to include the title of the course, its description and its set point value.<br />
<br />
The ILP can be added to a Mahara view, which can also include related resources and artefacts, e.g. a blog, piece of text or Google document that illustrates the work done on the units included in the ILP.<br />
<br />
The plugin allows a user to have multiple instances of ILPs. So, a user can store ILPs for multiple NVQs they may partake.<br />
<br />
The plugin adds a new 'ILP' tab (similar to 'My Plans') to 'My Portfolio' in Mahara. The code was based on 'My Plans'</div>Rossdashhttps://wiki.mahara.org/index.php?title=Plugins/Artefact/My_ILP&diff=3215Plugins/Artefact/My ILP2012-04-23T09:46:31Z<p>Rossdash: /* Individual Learning PLan Plugin */</p>
<hr />
<div>== Individual Learning PLan Plugin ==<br />
<br />
[[File:ILP.png|900px]]<br />
<br />
<br />
Many National Vocational Qualifications (NVQ) involve the formulation of ILPs to record and keep track of a student's progress throughout the length of the course. These courses use a point system; the course has a set point value that needs to be achieved by the students. This is achieved by the selection of units, which have different point values depending on the level of the NVQ. <br />
<br />
This Mahara plugin allows simple ILPs to be maintained. It includes fields for setting the title, description, status, point value, target completion date and the actual date of completion of individual units. It also does calculations on the points, displaying the remaining points needed, the acquired points and the total value of the units added. Each ILP is set up to include the title of the course, its description and its set point value.<br />
<br />
The ILP can be added to a Mahara view, which can also include related resources and artefacts, e.g. a blog, piece of text or Google document that illustrates the work done on the units included in the ILP.<br />
<br />
The plugin allows a user to have multiple instances of ILPs. So, a user can store ILPs for multiple NVQs they may partake.<br />
<br />
The plugin adds a new 'ILP' tab (similar to 'My Plans') to 'My Portfolio' in Mahara. The code was based on 'My Plans'</div>Rossdashhttps://wiki.mahara.org/index.php?title=Plugins/Artefact/My_ILP&diff=3214Plugins/Artefact/My ILP2012-04-23T09:45:57Z<p>Rossdash: Individual Learning Plan (ILP)</p>
<hr />
<div>== Individual Learning PLan Plugin ==<br />
<br />
[[File:ilp.png|900px]]<br />
<br />
<br />
Many National Vocational Qualifications (NVQ) involve the formulation of ILPs to record and keep track of a student's progress throughout the length of the course. These courses use a point system; the course has a set point value that needs to be achieved by the students. This is achieved by the selection of units, which have different point values depending on the level of the NVQ. <br />
<br />
This Mahara plugin allows simple ILPs to be maintained. It includes fields for setting the title, description, status, point value, target completion date and the actual date of completion of individual units. It also does calculations on the points, displaying the remaining points needed, the acquired points and the total value of the units added. Each ILP is set up to include the title of the course, its description and its set point value.<br />
<br />
The ILP can be added to a Mahara view, which can also include related resources and artefacts, e.g. a blog, piece of text or Google document that illustrates the work done on the units included in the ILP.<br />
<br />
The plugin allows a user to have multiple instances of ILPs. So, a user can store ILPs for multiple NVQs they may partake.<br />
<br />
The plugin adds a new 'ILP' tab (similar to 'My Plans') to 'My Portfolio' in Mahara. The code was based on 'My Plans'</div>Rossdashhttps://wiki.mahara.org/index.php?title=File:ILP.png&diff=3213File:ILP.png2012-04-23T09:44:41Z<p>Rossdash: Individual Learning Plan</p>
<hr />
<div>Individual Learning Plan</div>Rossdashhttps://wiki.mahara.org/index.php?title=Plugins&diff=3212Plugins2012-04-23T09:30:32Z<p>Rossdash: /* Artefact Plugins */</p>
<hr />
<div>Mahara has a very pluggable architecture, which allows people to add their own artefacts, blocks for views, methods for authentication and more. Mahara is a young project, but a few plugins are beginning to appear. Here is a list of them.<br />
<br />
If you have a plugin that you'd like to contribute, we'd love to hear from you! Post on the [http://mahara.org/interaction/forum/view.php?id=48 Developers Forum] with some information about it.<br />
<br />
'''Please note:''' Plugins listed here are NOT subject to the same standards of review that the Mahara core is, and as such, may contain security issues or other problems. It's up to you to verify that the plugin will adequately suit your needs!<br />
<br />
==Mahara plugins==<br />
===Artefact Plugins===<br />
<br />
Mahara ships with plugins for profile information, a file repository, blogs and a resume builder. In addition, these plugins are available:<br />
<br />
* Bookmark by Catalyst for Intel Education - Users can save links as Mahara artefacts. They are managed on a separate page under the My Portfolio menu, and can be selected for display in a block. Mahara 1.2 only. [http://gitorious.org/mahara-contrib/artefact-bookmark/archive-tarball/master download]<br />
* [[Plugins/Artefact/Europass|'''Europass''']] by Gregor Anželj - implements Europass into Mahara, allows showing Europass data in Views and exporting this data into several forms<br />
* [[Plugins/Artefact/My ILP|'''Individual Learning Plan (ILP)''']] by Ross Dash - Plugin for adding an Individual Learning Plan to Mahara<br />
* [[Plugins/Artefact/My CPD|'''My CPD''']] by James Kerrigan and Geoff Rowland - adds a Continuing Professional Development (CPD) log to record details and total time spent on different CPD activities<br /><br />
* [[Plugins/Artefact/My Learning|'''My Learning''']] by Gregor Anželj - adds questionaires about learning styles and intelligences, with Flash-based visualisations that can be embedded in Views<br />
* My Reading by Jong-Dae Park - add comments on the books users read. The plugin was developed by modifying the code of blog artefact plugin developed by Catalyst and utilize web service from Korean online book company. The code need to be modified if users want to use webservice from the online book company in other countries. [[@api/deki/files/417/=reading.zip|download]] <br />
* [[Plugins/Artefact/Problems_&_Conditions|'''Problems &amp; Conditions''']] by Catalyst for [http://www.medschl.cam.ac.uk/ Cambridge University School of Clinical Medicine] - adds the ability for students to record case notes about medical conditions, and share them with others. A nice feature is a category browser that makes it easy for users to choose what conditions to associate with a given case note.<br />
* [[Plugins/Artefact/WebServices|'''Web Services''']] Web Services support for Mahara (REST, SOAP, &amp; XML-RPC)<br />
* [[Plugins/Artefact/Extresource|'''External Resource''']] by [http://mahara.org/user/view.php?id=19050 Laurent Opprecht] for the [http://unige.ch/ University of Geneva] - allows you to add embedable content (videos, pictures, ...) and resources (pdf, rss, ...) to your Mahara portfolio. All providers that implement any of the protocols (oembed, ogp, ...) is supported - Youtube, Dailymotion, Slideshare, Google Books, and more. <br />
* [http://code.google.com/p/mahara-artefact-note/'''Notes'''] by [http://mahara.org/user/view.php?id=19050 Laurent Opprecht] for the [http://unige.ch/ University of Geneva] - allows you to create documents/take notes and display them in views.<br />
* [http://code.google.com/p/mahara-artefact-widget/'''Open Social Widget'''] by [http://mahara.org/user/view.php?id=19050 Laurent Opprecht] for the [http://unige.ch/ University of Geneva] - allows you to publish your porfolio's blocks to an Open Social container - i.e. iGoogle, portal, etc.<br />
<br />
===Blocktype Plugins===<br />
<br />
* [[Plugins/Blocktype/ChemNIH|'''Chem 2D NIH''']] by Geoff Rowland - uses the NIH NCI/CADD Chemical Identifier Resolver service to display an image of a 2D chemical structure in a Page (View).<br />
* [http://mahara.org/view/view.php?id=35826 '''Embed.ly'''] by Gregor Anželj - embeds tons of Web 2.0 stuff<br />
* [http://mahara.org/view/view.php?id=35645 '''Facebook Like / Recommend'''] by Gregor Anželj - adding Facebook buttons to a Mahara page so that updates can be sent to that service ([https://bugs.launchpad.net/mahara-blocktype-facebooklike bug tracker] and [http://gitorious.org/mahara-contrib/blocktype-facebooklike code repository])<br />
* [[Plugins/Artefact/FreeMindFlash|'''FreeMind Flash''']] by James Kerrigan and Geoff Rowland - adds an interactive Flash rendering of a FreeMind mind map to a Page (View).<br />
* [https://github.com/effgarces/Google--1-Block '''Google +1 block'''] by Emanuel Garcês. Google +1 button for Mahara 1.4.x.<br />
* [http://mahara.org/view/view.php?id=11634 '''GoogleApps'''] by Gregor Anželj - allows for making Google Docs, Spreadsheets, Presentations, calendars and maps visible in a View.<br />
* [[Plugins/Blocktype/Jmol|'''Jmol''']] by James Kerrigan and Geoff Rowland - displays an interactive 3D chemical structure file rendered with Jmol in a Page (View).<br />
* [[Plugins/Blocktype/JmolNIH|'''Jmol NIH''']] by Geoff Rowland - uses the NIH NCI/CADD Chemical Identifier Resolver service to display an interactive 3D chemical structure rendered with Jmol in a Page (View).<br />
* [http://mahara.org/view/view.php?id=35645 '''LinkedIn Profile'''] by Gregor Anželj - embeding LinkedIn public Member Profile to a Mahara page<br />
* [http://mahara.org/view/view.php?id=35645 '''LinkedIn Share button'''] by Gregor Anželj - adding LinkedIn Share button to a Mahara page so that updates can be sent to this service<br />
* [http://mahara.org/view/view.php?id=53383 '''My Forum Posts block'''] by William Mair - displays your posts from multiple forums ([https://bugs.launchpad.net/mahara-blocktype-myforumposts bug tracker] and [http://gitorious.org/mahara-contrib/blocktype-myforumposts code repository])<br />
* [https://github.com/effgarces/QR-Code-Generator '''QR Code Generator'''] by Emanuel Garcês. QR Code Generator block for Mahara 1.4.x.<br />
* [http://mahara.org/view/view.php?id=44478 '''Twitter'''] by Florian Eder - embeds Twitters Tweets or Twitter Timeline<br />
* [http://mahara.org/view/view.php?id=35645 '''Twitter Tweet buttons'''] by Gregor Anželj - adding Twitter buttons to a Mahara page so that updates can be sent to that service ([https://launchpad.net/mahara-blocktype-twittertweet bug tracker] and [http://gitorious.org/mahara-contrib/blocktype-twittertweet code repository])<br />
* [http://mahara.org/view/view.php?id=26018 '''WindowsLive'''] by Gregor Anželj - embeds documents, Hotmail calendar and Bing maps in a View.<br />
<br />
===Authentication Plugins===<br />
<br />
* [https://github.com/patrickpollet/mahara_plugin_auth_cas '''CAS'''] plugin by Patrick Pollet<br />
* [[Plugins/Auth/Janrain Engage|'''Janrain Engage''']] by [http://luns.net.uk/ LUNS Ltd.] for [http://www.genesis-jo.com/ Learning Arabia] - provides a single sign on to Mahara using identity from the popular websites like Google, Facebook, Twitter, Yahoo! and many others. It uses [http://www.janrain.com/products/engage/social-login Janrain Engage] (former RPX) service.<br />
* '''LDAP group enrolment''' ([[File:Ldap enrol.php]]) by Amer Hamade allows you to get the users automatically added to the specified group on Mahara upon login.<br />
* [https://github.com/patrickpollet/mahara_ldap_sync '''LDAP sync'''] by Patrick Pollet: sync LDAP user accounts and LDAP groups. More information in the [http://mahara.org/interaction/forum/topic.php?id=4303#post19025 forum post]<br />
* [http://sourceforge.net/projects/mahararadius/ '''Radius authentication'''] plugin by Stanislav Tsymbalov.<br />
* [[Plugins/Auth/Shibboleth|'''Shibboleth''']] by [http://mahara.org/user/view.php?id=19050 Laurent Opprecht] for the [http://unige.ch/ University of Geneva] - designed to work primarily for '''Shibboleth '''but should work as well with other web server based authentication schemes.<br />
<br />
===Integration with other systems===<br />
* [https://autonline.aut.ac.nz/bbcswebdav/users/hhumphre/maharafeeds.jsp '''Blackboard/Mahara Integration'''] A script written specifically for AUT University, which can be inserted into a building block to send usernames from Blackboard to Mahara. [http://mahara.org/interaction/forum/topic.php?id=3985#post17713 Some more information about how to use the script.]<br />
*'''[[System_Administrator's_Guide/Moodle//Mahara_Integration/View_Submission | Mahara assignment submission plugin for Moodle 2]]''': submit portfolio pages to Moodle for feedback<br />
<br />
===Search Plugins===<br />
<br />
* [http://mahara.org/view/view.php?id=17706 '''Sphinx search'''], by Antti Koskinen<br />
<br />
==Plugin Installation==<br />
<br />
Unless the plugin has an installation manual, to install the plugin, download it first, then decompress it in the appropriate plugin type directory. For example, if you download an artefact plugin, decompress it in the 'artefact' subdirectory. If you download a blocktype plugin, decompress it in the 'blocktype' subdirectory.<br />
<br />
==Plugin Development==<br />
<br />
*[[Developer_Area/Plugins|Plugins]]<br />
*[[Developer_Area/Mahara_Architecture_Introduction|Mahara_Architecture_Introduction]]<br />
*[[Developer_Area/Plugin_migration_between_Mahara_1.3_and_1.4|Plugin_migration_between_Mahara_1.3_and_1.4]]<br />
<br />
==Subpages==<br />
<br />
* [[Plugins/Artefact|Artefact]]<br />
* [[Plugins/Auth|Auth]]<br />
<br />
[[Category:Plugins]][[Category:Customising]]</div>Rossdashhttps://wiki.mahara.org/index.php?title=Developer_Area/Core_Subsystems/Form_API_(Pieforms)/Form_APIForm_Array&diff=3163Developer Area/Core Subsystems/Form API (Pieforms)/Form APIForm Array2012-04-04T13:03:37Z<p>Rossdash: /* Rule types */</p>
<hr />
<div>The biggest part about creating a form is describing it using the $form array. This array can tend to get quite large when many elements are involved, so here is a breakdown of its format.<br />
<br />
<div id="section_1"><br />
<br />
===Form metadata===<br />
<br />
The $form array must contain a "name" index, and should also contain some other indexes to define the overall behaviour of the form. These are as follows:<br />
<br />
* '''name''': Must be specified, and must be a string such that a PHP function with it's name could be called. The value "form" is not allowed as this conflicts with the form API itself (this limitation may be removed in future, but you should really be giving your forms a better name). This name is used to call the validation/submission functions, so choose it appropriately.<br />
* '''method''': Optionally defines the method that the form will be posted as. It defaults to "get" (as normal HTML forms do), and you can set it to "post". An invalid value here will default to 'get'.<br />
* '''action''': Optionally defines the page where the form will be submitted to. It's important to note that the submitting page should also call the "form" function with the same form definition! Most of the time you can leave this blank or not set it at all, since that will submit it to the same page.<br />
* '''tabindex''': Optionally defines an explicit tabindex for all of the form elements. If this is not specified, the first form on the page will have tabindex 1, and the second 2 etc.<br />
* '''iscancellable''': Optionally defines whether the form is able to be cancelled or not. Generally you would never set this option, unless your form happened to be like the Mahara login form, which passes on form data from other forms, and so must not cancel if the passed data included a "cancel" message.<br />
* '''validate''': Optionally defines whether the form should be validated or not. Forms that are not validated are not submitted. This is useful if you just want to draw a form and not validate it. This defaults to true.<br />
* '''submit''': Optionally defines whether the form should be submitted or not. Use in combination with the 'validate' flag to make a form that is validated but does not actually handle a submit. Defaults to true.<br />
* '''renderer''': Optionally defines a different renderer for the form. Valid values are 'div' and 'table', with 'table' being the default. Using the table renderer puts form elements in a standard HTML table, with the title in the left column, the element in the right, and the description and errors below both of them. The div renderer will do a similar layout, but using <div>s which you can float around the place.</div><br />
* '''autofocus''': Either true or an element name, this specifies which element will get the keyboard focus on page load. If this is set to anything other than <code>false</code>, then when errors occur the form field with the first error will be focussed. This defaults to false (although for the Mahara project later it will default to true).<br />
<br />
</div><div id="section_2"><br />
<br />
===The "elements" index===<br />
<br />
This section is the largest part of the $form array. It specifies what elements are on the form, and in what order they appear.<br />
<br />
The section is an array of arrays, each one describing a form element. Form elements roughly correspond to HTML form elements, but they are not necessarily the same. For example, while there are "text", "select" and "radio" elements, there are also "fieldset" elements (which can contain other elements), "wysiwyg" elements (which are textareas with special javascript to turn them into WYSIWYG boxes), and later there may also be others such as "checkboxgroup", "autocomplete" and more.<br />
<br />
The element types are pluggable, and can be found in <code>lib/form/elements/*.php</code>. They are documented on the [http://old.eduforge.org/wiki/wiki/mahara/wiki?pagename=FormAPIElements FormAPIElements] page.<br />
<br />
Here is an example element:<br />
<br />
<div class="plugin tightenable"><code><font color="#000000"> <font color="#dd0000">'name' </font><font color="#007700">=&gt; array(<br /> </font><font color="#dd0000">'type' </font><font color="#007700">=&gt; </font><font color="#dd0000">'text'</font><font color="#007700">,<br /> </font><font color="#dd0000">'title' </font><font color="#007700">=&gt; </font><font color="#dd0000">'my title'</font><font color="#007700">,<br /> </font><font color="#dd0000">'description' </font><font color="#007700">=&gt; </font><font color="#dd0000">'my description'</font><font color="#007700">,<br /> </font><font color="#dd0000">'help' </font><font color="#007700">=&gt; </font><font color="#dd0000">'help text'<br /> </font><font color="#007700">),<br /></font> </font> </code></div><br />
<br />
This describes a standard<br />
<br />
element. The title will be rendered next to the element, the description in a smaller font below it, and the help text will display in a box that pops up when a question mark to the right of the element is hovered over.<br />
<br />
The following list is that of all of the allowed indexes in this array.<br />
<br />
* '''type''': The type of element. Types are installed in lib/form/elements/*.php. There are types for most of the standard form widgets, and also extra types for customised versions. This is not required, however if the type is not specified then "markup" is assumed, which will simply insert whatever is in the "value" index straight into the form. More on the allowed types is below.<br />
* '''title''': The title that will be displayed to the left of the element. This is not required, and defaults to the empty string, however most of the time you will want to specify this.<br />
* '''description''': The description that will be displayed on the page for the element (i.e., it will always be visible, unlike the "help" index). This is optional, and should be a short sentence describing how you expect the element to be filled out.<br />
* '''help''': The help text that will be displayed when a user hovers over the small question mark that appears next to the form element. This is optional, and can be more verbose than the description.<br />
* '''rules''': The rules that are to apply to the element. This is an optional array of rulename =&gt; ruledata. The default is for no rules to apply. More on rules is below.<br />
* '''value''': The value that the element will '''always''' have, even if the form is submitted and the field is changed. Sometimes useful for some elements, but very useful for 'submit' and 'cancel' buttons.<br />
* '''defaultvalue''': The value that the element will have if the form has not been submitted.<br />
<br />
The following options are passed directly as attributes to the form widget (for most basic form widgets, and in theory for other more complicated ones where they apply):<br />
<br />
* accesskey<br />
* class<br />
* dir<br />
* id<br />
* lang<br />
* name<br />
* size<br />
* style<br />
* tabindex<br />
<br />
If you have a rule for maximum length of a field, it will automatically be set.<br />
<br />
You can also pass 'disabled' =&gt; true and 'readonly' =&gt; true, which will set the disabled/readonly attributes respectively.<br />
<br />
</div><div id="section_3"><br />
<br />
===Element types===<br />
<br />
The canonical list of element types is in the source code. Please consult the form-element package in the [http://mahara.eduforge.org/api/ <span style="white-space: nowrap">[[Image:http.png]]API</span> documentation] for the list. However, most of them are documented on the [http://old.eduforge.org/wiki/wiki/mahara/wiki?pagename=FormAPIElements FormAPIElements] page.<br />
<br />
* '''text''': A simple text line input<br />
* '''password''': A password input field<br />
* '''select''': A drop down box. Supports multiselect and 'size'<br />
* '''checkbox''': A simple checkbox<br />
* '''radio''': A list of radio items<br />
* '''submit''': A submit button<br />
* '''cancel''': A cancel button. Rendered as a submit button, but on submit no validation is performed and a different submission callback function is called.<br />
* '''submitcancel''': Combines the above two on one line<br />
* '''textarea''': A simple textarea<br />
* '''wysiwyg''': A WYSIWYG textarea<br />
* '''hidden''': A hidden element<br />
* '''file''': A file upload field<br />
<br />
In addition, there are two special types:<br />
<br />
* '''markup''': For raw HTML. Use sparingly, and think whether you could create a re-usable form element first.<br />
* '''fieldset''': Fieldsets contain other elements, by specifying an 'elements' index for them too. You cannot nest fieldsets (you can't do this in the HTML spec anyway).<br />
<br />
</div><div id="section_4"><br />
<br />
===Rule types===<br />
<br />
The following rule types are supported:<br />
<br />
* '''required''': if set to true, the field must contain a value on submission. The field is not trimmed before this check is performed at this time, as support for filters will be added that will allow you to do this.<br />
* '''minlength''': if set to a number, the field must have at least this many characters.<br />
* '''maxlength''': if set to a number, the field must have at most this many characters.<br />
* '''email''': if set to true, the field must match a valid e-mail address.<br />
* '''integer''': if set to true, the field must be an integer value.<br />
<br />
More rules can be added by adding them to <code>form/rules</code>, and you are encouraged to add rules that may see more than a passing usage.<br />
<br />
</div></div>Rossdash