CanvasModuleMeta
extends TsugiDOM
in package
This class allows us to produce the Canvas course_settings/module_meta.xml extension in a CC
Table of Contents
Constants
- CANVAS_CC_1_0 : mixed = 'http://canvas.instructure.com/xsd/cccv1p0'
- cc_to_canvas_map : mixed = array(\Tsugi\Util\CC::WEB_LINK_TYPE => self::co...
- content_type : mixed = 'content_type'
- content_type_Assignment : mixed = 'Assignment'
- content_type_Attachment : mixed = 'Attachment'
- content_type_ContextExternalTool : mixed = 'ContextExternalTool'
- content_type_ContextModuleSubHeader : mixed = 'ContextModuleSubHeader'
- content_type_DiscussionTopic : mixed = 'DiscussionTopic'
- content_type_ExternalUrl : mixed = 'ExternalUrl'
- content_type_QuizzesQuiz : mixed = 'Quizzes::Quiz'
- content_type_WikiPage : mixed = 'WikiPage'
- identifier : mixed = 'identifier'
- identifierref : mixed = 'identifierref'
- indent : mixed = 'indent'
- item : mixed = 'item'
- items : mixed = 'items'
- link_settings_json : mixed = 'link_settings_json'
- locked : mixed = 'locked'
- module : mixed = 'module'
- new_tab : mixed = 'new_tab'
- new_tab_false : mixed = 'false'
- new_tab_true : mixed = 'true'
- position : mixed = 'position'
- require_sequential_progress : mixed = 'require_sequential_progress'
- title : mixed = 'title'
- url : mixed = 'url'
- workflow_state : mixed = 'workflow_state'
- workflow_state_active : mixed = 'active'
- workflow_state_unpublished : mixed = 'unpublished'
Properties
- $currentNamespace : mixed
- $item_position : mixed
- $module_position : mixed
Methods
- __construct() : mixed
- add_child() : mixed
- add_child_ns() : mixed
- add_item() : the
- Adds an item to the items in a module
- add_items() : mixed
- Add the items collection below the module.
- add_module() : the
- Adds a module to the manifest
- child_tags() : mixed
- delete_children() : mixed
- delete_children_ns() : mixed
- delete_tag() : mixed
- delete_tag_ns() : mixed
- dump_dom_levels() : mixed
- dump_dom_list() : mixed
- dump_dom_node() : mixed
- get_element() : mixed
- get_tag() : mixed
- get_tag_ns() : mixed
- prettyXML() : mixed
- replace_text() : mixed
- replace_text_ns() : mixed
- set_namespace() : mixed
- web_link_item() : mixed
- web_link_tags() : mixed
Constants
CANVAS_CC_1_0
public
mixed
CANVAS_CC_1_0
= 'http://canvas.instructure.com/xsd/cccv1p0'
cc_to_canvas_map
public
mixed
cc_to_canvas_map
= array(\Tsugi\Util\CC::WEB_LINK_TYPE => self::content_type_ExternalUrl, \Tsugi\Util\CC::TOPIC_TYPE => self::content_type_DiscussionTopic, \Tsugi\Util\CC::LTI_TYPE => self::content_type_ContextExternalTool, \Tsugi\Util\CC::QTI_ASSESSMENT_TYPE => self::content_type_QuizzesQuiz, \Tsugi\Util\CC::WEBCONTENT_TYPE => self::content_type_Attachment)
content_type
public
mixed
content_type
= 'content_type'
content_type_Assignment
public
mixed
content_type_Assignment
= 'Assignment'
content_type_Attachment
public
mixed
content_type_Attachment
= 'Attachment'
content_type_ContextExternalTool
public
mixed
content_type_ContextExternalTool
= 'ContextExternalTool'
content_type_ContextModuleSubHeader
public
mixed
content_type_ContextModuleSubHeader
= 'ContextModuleSubHeader'
content_type_DiscussionTopic
public
mixed
content_type_DiscussionTopic
= 'DiscussionTopic'
content_type_ExternalUrl
public
mixed
content_type_ExternalUrl
= 'ExternalUrl'
content_type_QuizzesQuiz
public
mixed
content_type_QuizzesQuiz
= 'Quizzes::Quiz'
content_type_WikiPage
public
mixed
content_type_WikiPage
= 'WikiPage'
identifier
public
mixed
identifier
= 'identifier'
identifierref
public
mixed
identifierref
= 'identifierref'
indent
public
mixed
indent
= 'indent'
item
public
mixed
item
= 'item'
items
public
mixed
items
= 'items'
link_settings_json
public
mixed
link_settings_json
= 'link_settings_json'
locked
public
mixed
locked
= 'locked'
module
public
mixed
module
= 'module'
new_tab
public
mixed
new_tab
= 'new_tab'
new_tab_false
public
mixed
new_tab_false
= 'false'
new_tab_true
public
mixed
new_tab_true
= 'true'
position
public
mixed
position
= 'position'
require_sequential_progress
public
mixed
require_sequential_progress
= 'require_sequential_progress'
title
public
mixed
title
= 'title'
url
public
mixed
url
= 'url'
workflow_state
public
mixed
workflow_state
= 'workflow_state'
workflow_state_active
public
mixed
workflow_state_active
= 'active'
workflow_state_unpublished
public
mixed
workflow_state_unpublished
= 'unpublished'
Properties
$currentNamespace
public
mixed
$currentNamespace
= false
$item_position
public
mixed
$item_position
= 0
$module_position
public
mixed
$module_position
= 0
Methods
__construct()
public
__construct() : mixed
add_child()
public
add_child(mixed $entry, mixed $tag[, mixed $text = null ][, mixed $attr = null ]) : mixed
Parameters
- $entry : mixed
- $tag : mixed
- $text : mixed = null
- $attr : mixed = null
add_child_ns()
public
add_child_ns(mixed $ns, mixed $entry, mixed $tag[, mixed $text = null ][, mixed $attr = null ]) : mixed
Parameters
- $ns : mixed
- $entry : mixed
- $tag : mixed
- $text : mixed = null
- $attr : mixed = null
add_item()
Adds an item to the items in a module
public
add_item(mixed $items, mixed $identifier[, mixed $children = null ]) : the
Parameters
- $items : mixed
-
DOMNode The items collection
- $identifier : mixed
- $children : mixed = null
-
An aray of child text nodes under
In the imsmanifest there are two levels of items - the top level is like "Week 1", etc and the second level is "Reading 1" etc. The identifier and identifierref need to be the same as the "Reading 1" identifier.
Return values
the —DOMNode of the newly added item
add_items()
Add the items collection below the module.
public
add_items(mixed $module) : mixed
The items collections has no attributes and only
Parameters
- $module : mixed
add_module()
Adds a module to the manifest
public
add_module(mixed $title, mixed $identifier) : the
Parameters
- $title : mixed
-
The title of the module
- $identifier : mixed
-
The identifier of the module (from the imsmanifest)
In the imsmanifest there are two levels of items - the top level is like "Week 1", etc and the second level is "Reading 1" etc. The identifier on the module tag needs to be the same as the "Week 1" identifier.
Return values
the —DOMNode of the items tag within the newly added module
child_tags()
public
child_tags(mixed $content_type) : mixed
Parameters
- $content_type : mixed
delete_children()
public
delete_children(mixed $tag) : mixed
Parameters
- $tag : mixed
delete_children_ns()
public
delete_children_ns(mixed $ns, mixed $tag) : mixed
Parameters
- $ns : mixed
- $tag : mixed
delete_tag()
public
delete_tag(mixed $tag) : mixed
Parameters
- $tag : mixed
delete_tag_ns()
public
delete_tag_ns(mixed $ns, mixed $tag) : mixed
Parameters
- $ns : mixed
- $tag : mixed
dump_dom_levels()
public
dump_dom_levels(mixed $node[, mixed $level = 0 ]) : mixed
Parameters
- $node : mixed
- $level : mixed = 0
dump_dom_list()
public
dump_dom_list(mixed $node_list) : mixed
Parameters
- $node_list : mixed
dump_dom_node()
public
dump_dom_node(mixed $tag) : mixed
Parameters
- $tag : mixed
get_element()
public
get_element(mixed $ns, mixed $tag) : mixed
Parameters
- $ns : mixed
- $tag : mixed
get_tag()
public
get_tag(mixed $tag[, mixed $key = null ][, mixed $value = null ]) : mixed
Parameters
- $tag : mixed
- $key : mixed = null
- $value : mixed = null
get_tag_ns()
public
get_tag_ns(mixed $ns, mixed $tag[, mixed $key = null ][, mixed $value = null ]) : mixed
Parameters
- $ns : mixed
- $tag : mixed
- $key : mixed = null
- $value : mixed = null
prettyXML()
public
prettyXML() : mixed
replace_text()
public
replace_text(mixed $tag, mixed $text) : mixed
Parameters
- $tag : mixed
- $text : mixed
replace_text_ns()
public
replace_text_ns(mixed $ns, mixed $tag, mixed $text) : mixed
Parameters
- $ns : mixed
- $tag : mixed
- $text : mixed
set_namespace()
public
set_namespace(mixed $new) : mixed
Parameters
- $new : mixed
web_link_item()
public
web_link_item(mixed $items, mixed $identifier, mixed $tags) : mixed
Parameters
- $items : mixed
- $identifier : mixed
- $tags : mixed
web_link_tags()
public
web_link_tags(mixed $children) : mixed
Parameters
- $children : mixed