Module: IMS::LTI::Extensions::Content::ToolConsumer

Includes:
Base, ExtensionBase
Defined in:
lib/ims/lti/extensions/content.rb

Instance Method Summary collapse

Methods included from Base

#extend_outcome_request, #extend_outcome_response, #outcome_request_extensions, #outcome_response_extensions

Methods included from ExtensionBase

#outcome_request_extensions, #outcome_response_extensions

Instance Method Details

#content_intended_useObject



185
186
187
# File 'lib/ims/lti/extensions/content.rb', line 185

def content_intended_use
  get_ext_param('content_intended_use')
end

#content_intended_use=(val) ⇒ Object



181
182
183
# File 'lib/ims/lti/extensions/content.rb', line 181

def content_intended_use=(val)
  set_ext_param('content_intended_use', val)
end

#content_return_typesObject

a comma-separated string of the supported outcome data types



177
178
179
# File 'lib/ims/lti/extensions/content.rb', line 177

def content_return_types
  get_ext_param('content_return_types')
end

#content_return_types=(val) ⇒ Object

a list of the content types accepted

tc.add_content_return_types=(['url', 'text'])
tc.add_content_return_types=("url,text")


171
172
173
174
# File 'lib/ims/lti/extensions/content.rb', line 171

def content_return_types=(val)
  val = val.join(',') if val.is_a? Array
  set_ext_param('content_return_types', val)
end

#support_embed_content!Object

convenience method for setting support for embed content



196
197
198
199
# File 'lib/ims/lti/extensions/content.rb', line 196

def support_embed_content!
  self.content_intended_use = 'embed'
  self.content_return_types = 'oembed,lti_launch_url,url,image_url,iframe'
end

#support_homework_content!Object

convenience method for setting support for homework content



190
191
192
193
# File 'lib/ims/lti/extensions/content.rb', line 190

def support_homework_content!
  self.content_intended_use = 'homework'
  self.content_return_types = 'file,url'
end

#support_navigation_content!Object

convenience method for setting support for navigation content



202
203
204
205
# File 'lib/ims/lti/extensions/content.rb', line 202

def support_navigation_content!
  self.content_intended_use = 'navigation'
  self.content_return_types = 'lti_launch_url'
end