Module: IMS::LTI::Extensions::Canvas::ToolConfig
- Defined in:
- lib/ims/lti/extensions/canvas.rb
Constant Summary collapse
- PLATFORM =
'canvas.instructure.com'
Instance Method Summary collapse
-
#canvas_account_navigation!(params = {}) ⇒ Object
Adds the tool to account level navigation in canvas Valid properties are url, text, enabled.
-
#canvas_course_navigation!(params = {}) ⇒ Object
Adds the tool to course level navigation in canvas Valid properties are url, text, visibility, default, enabled Visibility describes who will see the navigation element.
- #canvas_domain!(domain) ⇒ Object
-
#canvas_editor_button!(params = {}) ⇒ Object
Adds the tool to canvas’ rich text editor Valid properties are url, icon_url, text, selection_width, selection_height, enabled.
-
#canvas_environments!(params = {}) ⇒ Object
Adds canvas environment configurations options Valid properties are launch_url, domain, test_launch_url, test_domain, beta_launch_url, beta_domain.
-
#canvas_homework_submission!(params = {}) ⇒ Object
Enables homework submissions via the tool Valid properties are url, text, selection_width, selection_height, enabled.
- #canvas_icon_url!(icon_url) ⇒ Object
- #canvas_privacy_anonymous! ⇒ Object
- #canvas_privacy_name_only! ⇒ Object
- #canvas_privacy_public! ⇒ Object
-
#canvas_resource_selection!(params = {}) ⇒ Object
Adds the tool to canvas’ resource selector Valid properties are url, text, selection_width, selection_height, enabled.
- #canvas_selector_dimensions!(width, height) ⇒ Object
- #canvas_text!(text) ⇒ Object
- #canvas_tool_id!(tool_id) ⇒ Object
-
#canvas_user_navigation!(params = {}) ⇒ Object
Adds the tool to user level navigation in canvas Valid properties are url, text, enabled.
- #get_canvas_param(param_key) ⇒ Object
-
#set_canvas_ext_param(key, value) ⇒ Object
Canvas extension defaults These properties will cascade down to any options that are configured.
Instance Method Details
#canvas_account_navigation!(params = {}) ⇒ Object
Adds the tool to account level navigation in canvas Valid properties are url, text, enabled
96 97 98 |
# File 'lib/ims/lti/extensions/canvas.rb', line 96 def (params = {}) set_canvas_ext_param(:account_navigation, params) end |
#canvas_course_navigation!(params = {}) ⇒ Object
Adds the tool to course level navigation in canvas Valid properties are url, text, visibility, default, enabled Visibility describes who will see the navigation element. Possible values are “admins”, “members”, and nil Default determines if it is on or off by default. Possible values are “admins”, “members”, and nil
104 105 106 |
# File 'lib/ims/lti/extensions/canvas.rb', line 104 def (params = {}) set_canvas_ext_param(:course_navigation, params) end |
#canvas_domain!(domain) ⇒ Object
51 52 53 |
# File 'lib/ims/lti/extensions/canvas.rb', line 51 def canvas_domain!(domain) set_canvas_ext_param(:domain, domain) end |
#canvas_editor_button!(params = {}) ⇒ Object
Adds the tool to canvas’ rich text editor Valid properties are url, icon_url, text, selection_width, selection_height, enabled
84 85 86 |
# File 'lib/ims/lti/extensions/canvas.rb', line 84 def (params = {}) set_canvas_ext_param(:editor_button, params) end |
#canvas_environments!(params = {}) ⇒ Object
Adds canvas environment configurations options Valid properties are launch_url, domain, test_launch_url, test_domain, beta_launch_url, beta_domain
116 117 118 |
# File 'lib/ims/lti/extensions/canvas.rb', line 116 def canvas_environments!(params = {}) set_canvas_ext_param(:environments, params) end |
#canvas_homework_submission!(params = {}) ⇒ Object
Enables homework submissions via the tool Valid properties are url, text, selection_width, selection_height, enabled
78 79 80 |
# File 'lib/ims/lti/extensions/canvas.rb', line 78 def canvas_homework_submission!(params = {}) set_canvas_ext_param(:homework_submission, params) end |
#canvas_icon_url!(icon_url) ⇒ Object
59 60 61 |
# File 'lib/ims/lti/extensions/canvas.rb', line 59 def canvas_icon_url!(icon_url) set_canvas_ext_param(:icon_url, icon_url) end |
#canvas_privacy_anonymous! ⇒ Object
47 48 49 |
# File 'lib/ims/lti/extensions/canvas.rb', line 47 def canvas_privacy_anonymous!() set_canvas_ext_param(:privacy_level, 'anonymous') end |
#canvas_privacy_name_only! ⇒ Object
43 44 45 |
# File 'lib/ims/lti/extensions/canvas.rb', line 43 def canvas_privacy_name_only!() set_canvas_ext_param(:privacy_level, 'name_only') end |
#canvas_privacy_public! ⇒ Object
39 40 41 |
# File 'lib/ims/lti/extensions/canvas.rb', line 39 def canvas_privacy_public!() set_canvas_ext_param(:privacy_level, 'public') end |
#canvas_resource_selection!(params = {}) ⇒ Object
Adds the tool to canvas’ resource selector Valid properties are url, text, selection_width, selection_height, enabled
90 91 92 |
# File 'lib/ims/lti/extensions/canvas.rb', line 90 def canvas_resource_selection!(params = {}) set_canvas_ext_param(:resource_selection, params) end |
#canvas_selector_dimensions!(width, height) ⇒ Object
67 68 69 70 |
# File 'lib/ims/lti/extensions/canvas.rb', line 67 def canvas_selector_dimensions!(width, height) set_canvas_ext_param(:selection_width, width) set_canvas_ext_param(:selection_height, height) end |
#canvas_text!(text) ⇒ Object
55 56 57 |
# File 'lib/ims/lti/extensions/canvas.rb', line 55 def canvas_text!(text) set_canvas_ext_param(:text, text) end |
#canvas_tool_id!(tool_id) ⇒ Object
63 64 65 |
# File 'lib/ims/lti/extensions/canvas.rb', line 63 def canvas_tool_id!(tool_id) set_canvas_ext_param(:tool_id, tool_id) end |
#canvas_user_navigation!(params = {}) ⇒ Object
Adds the tool to user level navigation in canvas Valid properties are url, text, enabled
110 111 112 |
# File 'lib/ims/lti/extensions/canvas.rb', line 110 def (params = {}) set_canvas_ext_param(:user_navigation, params) end |
#get_canvas_param(param_key) ⇒ Object
35 36 37 |
# File 'lib/ims/lti/extensions/canvas.rb', line 35 def get_canvas_param(param_key) get_ext_param PLATFORM, param_key end |
#set_canvas_ext_param(key, value) ⇒ Object
Canvas extension defaults These properties will cascade down to any options that are configured
31 32 33 |
# File 'lib/ims/lti/extensions/canvas.rb', line 31 def set_canvas_ext_param(key, value) set_ext_param(PLATFORM, key, value) end |