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

Instance Method Details

#canvas_account_navigation!(params = {}) ⇒ Object

Adds the tool to account level navigation in canvas Valid properties are url, text, enabled



85
86
87
# File 'lib/ims/lti/extensions/canvas.rb', line 85

def (params = {})
  set_ext_param(PLATFORM, :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



93
94
95
# File 'lib/ims/lti/extensions/canvas.rb', line 93

def canvas_course_navigation!(params = {})
  set_ext_param(PLATFORM, :course_navigation, params)
end

#canvas_domain!(domain) ⇒ Object



44
45
46
# File 'lib/ims/lti/extensions/canvas.rb', line 44

def canvas_domain!(domain)
  set_ext_param(PLATFORM, :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



73
74
75
# File 'lib/ims/lti/extensions/canvas.rb', line 73

def canvas_editor_button!(params = {})
  set_ext_param(PLATFORM, :editor_button, params)
end

#canvas_homework_submission!(params = {}) ⇒ Object

Enables homework submissions via the tool Valid properties are url, text, selection_width, selection_height, enabled



67
68
69
# File 'lib/ims/lti/extensions/canvas.rb', line 67

def canvas_homework_submission!(params = {})
  set_ext_param(PLATFORM, :homework_submission, params)
end

#canvas_icon_url!(icon_url) ⇒ Object



52
53
54
# File 'lib/ims/lti/extensions/canvas.rb', line 52

def canvas_icon_url!(icon_url)
  set_ext_param(PLATFORM, :icon_url, icon_url)
end

#canvas_privacy_anonymous!Object



40
41
42
# File 'lib/ims/lti/extensions/canvas.rb', line 40

def canvas_privacy_anonymous!()
  set_ext_param(PLATFORM, :privacy_level, 'anonymous')
end

#canvas_privacy_name_only!Object



36
37
38
# File 'lib/ims/lti/extensions/canvas.rb', line 36

def canvas_privacy_name_only!()
  set_ext_param(PLATFORM, :privacy_level, 'name_only')
end

#canvas_privacy_public!Object

Canvas extension defaults These properties will cascade down to any options that are configured



32
33
34
# File 'lib/ims/lti/extensions/canvas.rb', line 32

def canvas_privacy_public!()
  set_ext_param(PLATFORM, :privacy_level, 'public')
end

#canvas_resource_selection!(params = {}) ⇒ Object

Adds the tool to canvas’ rich text editor Valid properties are url, icon_url, text, selection_width, selection_height, enabled



79
80
81
# File 'lib/ims/lti/extensions/canvas.rb', line 79

def canvas_resource_selection!(params = {})
  set_ext_param(PLATFORM, :resource_selection, params)
end

#canvas_selector_dimensions!(width, height) ⇒ Object



56
57
58
59
# File 'lib/ims/lti/extensions/canvas.rb', line 56

def canvas_selector_dimensions!(width, height)
  set_ext_param(PLATFORM, :selection_width, width)
  set_ext_param(PLATFORM, :selection_height, height)
end

#canvas_text!(text) ⇒ Object



48
49
50
# File 'lib/ims/lti/extensions/canvas.rb', line 48

def canvas_text!(text)
  set_ext_param(PLATFORM, :text, text)
end

#canvas_user_navigation!(params = {}) ⇒ Object

Adds the tool to user level navigation in canvas Valid properties are url, text, enabled



99
100
101
# File 'lib/ims/lti/extensions/canvas.rb', line 99

def canvas_user_navigation!(params = {})
  set_ext_param(PLATFORM, :user_navigation, params)
end

#get_canvas_param(param_key) ⇒ Object



103
104
105
# File 'lib/ims/lti/extensions/canvas.rb', line 103

def get_canvas_param(param_key)
  get_ext_param PLATFORM, param_key
end