LessonsLegacyExport
in package
File-based lessons.json Common Cartridge zip.
This is the zip cc/export.php writes. Course copy uses it for $CFG->lessons. Manifest courses use LessonsCartridge instead. Do not merge the two writers.
Table of Contents
Methods
- writeZip() : mixed
- Write imsmanifest.xml and resource files into an open ZipArchive.
- exportIdentifier() : string|null
- Cartridge item identifier for a lesson resource link id.
- modulePath() : string
- processItem() : mixed
Methods
writeZip()
Write imsmanifest.xml and resource files into an open ZipArchive.
public
static writeZip(object $l, ZipArchive $zip[, array{tsugi_lms?: string, topic?: string, anchors?: array|false, thick?: bool, gift_qti?: bool, title?: string, cli?: bool} $options = array() ]) : mixed
Parameters
- $l : object
-
Lessons
- $zip : ZipArchive
- $options : array{tsugi_lms?: string, topic?: string, anchors?: array|false, thick?: bool, gift_qti?: bool, title?: string, cli?: bool} = array()
exportIdentifier()
Cartridge item identifier for a lesson resource link id.
private
static exportIdentifier(mixed $resource_link_id) : string|null
":" is written as colon. Null when the lesson has no link id.
Parameters
- $resource_link_id : mixed
Return values
string|nullmodulePath()
private
static modulePath(mixed $module_node, CC $cc_dom) : string
Parameters
- $module_node : mixed
- $cc_dom : CC
Return values
stringprocessItem()
private
static processItem(object $item_obj, object $module, DOMNode $sub_module, ZipArchive $zip, CC $cc_dom, string|false $topic, LessonsLegacyFiles $local_files, LessonsLegacyGift $gift_qti) : mixed
Parameters
- $item_obj : object
- $module : object
- $sub_module : DOMNode
- $zip : ZipArchive
- $cc_dom : CC
- $topic : string|false
- $local_files : LessonsLegacyFiles
- $gift_qti : LessonsLegacyGift