Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.3.x will end 7 October 2024 (12 months).
  • Bug fixes for security issues in 4.3.x will end 21 April 2025 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.2.x is supported too.

Differences Between: [Versions 310 and 403] [Versions 311 and 403] [Versions 400 and 403] [Versions 401 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