Moodle  2.2.1
http://www.collinsharper.com
portfolio_format_leap2a_writer Class Reference

Public Member Functions

 __construct (stdclass $user)
 add_entry (portfolio_format_leap2a_entry $entry)
 make_selection ($selectionentry, $ids, $selectiontype)
 link_files ($entry, $files)
 to_xml ()

Detailed Description

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

Definition at line 44 of file lib.php.


Constructor & Destructor Documentation

__construct ( stdclass $  user)

constructor - usually generated from portfolio_format_leap2a::leap2a_writer($USER);

Parameters:
stdclass$userthe user exporting (almost always $USER)

Definition at line 63 of file lib.php.


Member Function Documentation

adds a entry to the feed ready to be exported

Parameters:
portfolio_format_leap2a_entry$entrythe entry to add

Definition at line 105 of file lib.php.

Here is the caller graph for this function:

link_files ( entry,
files 
)

helper function to link some stored_files into the feed and link them to a particular entry

Parameters:
portfolio_format_leap2a_entry$entrythe entry to link the files into
array$filesarray of stored_files to link

Definition at line 152 of file lib.php.

Here is the call graph for this function:

make_selection ( selectionentry,
ids,
selectiontype 
)

make an entry that has previously been added into the feed into a selection.

Parameters:
mixed$selectionentrythe entry to make a selection (id or entry object)
array$idsarray of ids this selection includes
string$selectiontypehttp://wiki.cetis.ac.uk/2009-03/LEAP2A_categories/selection_type

Definition at line 122 of file lib.php.

Here is the call graph for this function:

to_xml ( )

return the entire feed as a string calls validate() first on everything

Returns:
string

Definition at line 191 of file lib.php.


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Enumerations