Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.11.x will end 14 Nov 2022 (12 months plus 6 months extension).
  • Bug fixes for security issues in 3.11.x will end 13 Nov 2023 (18 months plus 12 months extension).
  • PHP version: minimum PHP 7.3.0 Note: minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is supported too.

Differences Between: [Versions 311 and 402] [Versions 311 and 403]

The course exporter.

Copyright: 2020 Andrew Nicols <andrew@nicols.co.uk>
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 286 lines (9 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

course_exporter:: (6 methods):
  __construct()
  export_course()
  add_course_about_page()
  get_course_section()
  export_mod_content()
  get_mod_intro_data()


Class: course_exporter  - X-Ref

The course exporter.

__construct(context_course $context, stdClass $user, zipwriter $archive)   X-Ref
Constructor for the course exporter.

param: context_course $context The context of the course to export
param: stdClass $user
param: zipwriter $archive

export_course(array $exportedcontexts)   X-Ref
Export the course.

param: context[] $exportedcontexts A list of contexts which were successfully exported

add_course_about_page()   X-Ref
Add course about page.

return: null|string The URL to the about page if one was generated

get_course_section(array $exportedcontexts, section_info $section)   X-Ref
Fetch data for the specified course section.

param: context[] $exportedcontexts A list of contexts which were successfully exported
param: section_info $section The section being exported
return: stdClass

export_mod_content(context_module $modcontext, array $exportables)   X-Ref
Export all exportable content for an activity module.

param: context_module $modcontect
param: exportable_item[] $export_exportables

get_mod_intro_data(context_module $modcontext)   X-Ref
Get the course_module introduction data.

param: context_module $modcontect
return: null|string The content of the intro area