|
Moodle
2.2.1
http://www.collinsharper.com
|

Public Member Functions | |
| __construct ($id, $title, $type, $content=null) | |
| __set ($field, $value) | |
| validate () | |
| add_link ($otherentry, $reltype, $displayorder=null) | |
| add_category ($term, $scheme=null, $label=null) | |
| to_dom (DomDocument $dom, $feedauthor) | |
Data Fields | |
| $id | |
| $title | |
| $type | |
| $author | |
| $summary | |
| $content | |
| $updated | |
| $published | |
| $links = array() | |
| $attachments = array() | |
Protected Member Functions | |
| add_extra_links () | |
this class represents a single leap2a entry. you can create these directly and then add them to the main leap feed object
| __construct | ( | $ | id, |
| $ | title, | ||
| $ | type, | ||
| $ | content = null |
||
| ) |
constructor. All arguments are required (and will be validated) http://wiki.cetis.ac.uk/2009-03/LEAP2A_types
| string | $id | unique id of this entry. could be something like forumpost6 for example. This must be unique to the entire feed. |
| string | $title | title of the entry. This is pure atom. |
| string | $type | the leap type of this entry. |
| mixed | $content | the content of the entry. string (xhtml/html/text) |
Definition at line 250 of file lib.php.

| __set | ( | $ | field, |
| $ | value | ||
| ) |
| add_category | ( | $ | term, |
| $ | scheme = null, |
||
| $ | label = null |
||
| ) |
add a category to this entry http://wiki.cetis.ac.uk/2009-03/LEAP2A_categories
| string | $term | eg 'Offline' |
| string | $scheme | (optional) eg resource_type |
| string | $label | (optional) eg File |
"tags" should just pass a term here and no scheme or label. they will be automatically normalised if they have spaces.
Definition at line 334 of file lib.php.

| add_extra_links | ( | ) | [protected] |
| add_link | ( | $ | otherentry, |
| $ | reltype, | ||
| $ | displayorder = null |
||
| ) |
add a link from this entry to another one these will be collated at the end of the export (during to_xml) and validated at that point. This function does no validation http://wiki.cetis.ac.uk/2009-03/LEAP2A_relationships
| mixed | $otherentry | portfolio_format_leap2a_entry or its id |
| string | $reltype | (no leap2: ns required) |
| to_dom | ( | DomDocument $ | dom, |
| $ | feedauthor | ||
| ) |
| validate | ( | ) |
| $content |
main content of the entry. can be html,text,or xhtml. for a stored_file, use portfolio_format_leap2a_file
| $id |