Moodle PHP Documentation 4.4
Moodle 4.4.1 (Build: 20240610) (db07c09afc5)
core\content\export\exporters\course_exporter Class Reference

The course exporter. More...

Inheritance diagram for core\content\export\exporters\course_exporter:
core\content\export\exporters\component_exporter

Public Member Functions

 __construct (context_course $context, stdClass $user, zipwriter $archive)
 Constructor for the course exporter.
 
 export_course (array $exportedcontexts)
 Export the course.
 
 export_mod_content (context_module $modcontext, array $exportables)
 Export all exportable content for an activity module.
 
 get_archive ()
 Get the archive used for export.
 
 get_component ()
 Get the component name.
 
 get_context ()
 Get the context being exported.
 

Static Public Member Functions

static get_classname_for_component (string $component)
 Get the name of the exporter for the specified component.
 

Protected Member Functions

 add_course_about_page ()
 Add course about page.
 
 get_course_section (array $exportedcontexts, section_info $section)
 Fetch data for the specified course section.
 
 get_mod_intro_data (context_module $modcontext)
 Get the course_module introduction data.
 

Protected Attributes

zipwriter $archive
 A reference to the zipwriter.
 
string $component = null
 The component that this instance belongs to.
 
context $context = null
 The context to be exported.
 
stdClass $course
 The course being exported.
 
course_modinfo $modinfo
 The course_modinfo instnace for this course.
 
stdClass $user
 The user being exported.
 

Detailed Description

The course exporter.

License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Constructor & Destructor Documentation

◆ __construct()

core\content\export\exporters\course_exporter::__construct ( context_course $context,
stdClass $user,
zipwriter $archive )

Constructor for the course exporter.

Parameters
context_course$contextThe context of the course to export
stdClass$user
zipwriter$archive

Member Function Documentation

◆ add_course_about_page()

core\content\export\exporters\course_exporter::add_course_about_page ( )
protected

Add course about page.

Return values
null|stringThe URL to the about page if one was generated

◆ export_course()

core\content\export\exporters\course_exporter::export_course ( array $exportedcontexts)

Export the course.

Parameters
context[]$exportedcontextsA list of contexts which were successfully exported

◆ export_mod_content()

core\content\export\exporters\course_exporter::export_mod_content ( context_module $modcontext,
array $exportables )

Export all exportable content for an activity module.

Parameters
context_module$modcontect
exportable_item[]$export_exportables

◆ get_archive()

core\content\export\exporters\component_exporter::get_archive ( )
inherited

Get the archive used for export.

Return values
zipwriter

◆ get_classname_for_component()

static core\content\export\exporters\component_exporter::get_classname_for_component ( string $component)
staticinherited

Get the name of the exporter for the specified component.

Parameters
string$componentThe component to fetch a classname for
Return values
stringThe classname for the component

◆ get_component()

core\content\export\exporters\component_exporter::get_component ( )
inherited

Get the component name.

Return values
string

◆ get_context()

core\content\export\exporters\component_exporter::get_context ( )
inherited

Get the context being exported.

Return values
context

◆ get_course_section()

core\content\export\exporters\course_exporter::get_course_section ( array $exportedcontexts,
section_info $section )
protected

Fetch data for the specified course section.

Parameters
context[]$exportedcontextsA list of contexts which were successfully exported
section_info$sectionThe section being exported
Return values
stdClass

◆ get_mod_intro_data()

core\content\export\exporters\course_exporter::get_mod_intro_data ( context_module $modcontext)
protected

Get the course_module introduction data.

Parameters
context_module$modcontect
Return values
null|stringThe content of the intro area

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