|
Moodle
2.2.1
http://www.collinsharper.com
|
Public Member Functions | |
| __construct (stdclass $user) | |
| add_entry (portfolio_format_leap2a_entry $entry) | |
| make_selection ($selectionentry, $ids, $selectiontype) | |
| link_files ($entry, $files) | |
| to_xml () | |
object to encapsulate the writing of leap2a. should be used like:
$writer = portfolio_format_leap2a::leap2a_writer($USER); $entry = new portfolio_format_leap2a_entry('forumpost6', $title, 'leap2', 'somecontent') $entry->add_link('something', 'has_part')->add_link('somethingelse', 'has_part'); .. etc $writer->add_entry($entry); $xmlstr = $writer->to_xml();
find a way to ensure that all referenced files are included
| __construct | ( | stdclass $ | user | ) |
constructor - usually generated from portfolio_format_leap2a::leap2a_writer($USER);
| stdclass | $user | the user exporting (almost always $USER) |
| add_entry | ( | portfolio_format_leap2a_entry $ | entry | ) |
adds a entry to the feed ready to be exported
| portfolio_format_leap2a_entry | $entry | the entry to add |
Definition at line 105 of file lib.php.

| link_files | ( | $ | entry, |
| $ | files | ||
| ) |
helper function to link some stored_files into the feed and link them to a particular entry
| portfolio_format_leap2a_entry | $entry | the entry to link the files into |
| array | $files | array of stored_files to link |
Definition at line 152 of file lib.php.

| make_selection | ( | $ | selectionentry, |
| $ | ids, | ||
| $ | selectiontype | ||
| ) |
make an entry that has previously been added into the feed into a selection.
| mixed | $selectionentry | the entry to make a selection (id or entry object) |
| array | $ids | array of ids this selection includes |
| string | $selectiontype | http://wiki.cetis.ac.uk/2009-03/LEAP2A_categories/selection_type |
Definition at line 122 of file lib.php.

| to_xml | ( | ) |