Moodle APIs  3.8
Moodle 3.8.6 (Build: 20201109)
Public Member Functions | List of all members
portfolio_format_leap2a_writer Class Reference

Public Member Functions

 __construct (stdclass $user)
 Constructor - usually generated from portfolio_format_leap2a::leap2a_writer($USER);. More...
 
 add_entry (portfolio_format_leap2a_entry $entry)
 Adds a entry to the feed ready to be exported. More...
 
 link_files ($entry, $files)
 Helper function to link some stored_files into the feed and link them to a particular entry. More...
 
 make_selection ($selectionentry, $ids, $selectiontype)
 Select an entry that has previously been added into the feed. More...
 
 to_xml ()
 Return the entire feed as a string. More...
 

Constructor & Destructor Documentation

◆ __construct()

portfolio_format_leap2a_writer::__construct ( stdclass  $user)

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

Todo:
MDL-31302 - add exporter and format
Parameters
stdclass$userthe user exporting (almost always $USER)

Member Function Documentation

◆ add_entry()

portfolio_format_leap2a_writer::add_entry ( portfolio_format_leap2a_entry  $entry)

Adds a entry to the feed ready to be exported.

Parameters
portfolio_format_leap2a_entry$entrynew feed entry to add
Return values
portfolio_format_leap2a_entry

◆ link_files()

portfolio_format_leap2a_writer::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$entryfeed object
array$filesarray of stored_files to link

◆ make_selection()

portfolio_format_leap2a_writer::make_selection (   $selectionentry,
  $ids,
  $selectiontype 
)

Select an entry that has previously been added into the feed.

Parameters
portfolio_format_leap2a_entry | string$selectionentrythe entry to make a selection (id or entry object)
array$idsarray of ids this selection includes
string$selectiontypefor selection type, see: http://wiki.cetis.ac.uk/2009-03/LEAP2A_categories/selection_type

◆ to_xml()

portfolio_format_leap2a_writer::to_xml ( )

Return the entire feed as a string.

Then, it calls for validation

Return values
stringfeeds' content in xml

The documentation for this class was generated from the following file: