Class: Moodle2CC::CanvasCC::Models::Discussion
- Inherits:
-
Object
- Object
- Moodle2CC::CanvasCC::Models::Discussion
- Defined in:
- lib/moodle2cc/canvas_cc/models/discussion.rb
Constant Summary collapse
- DISCUSSION_ID_POSTFIX =
'_DISCUSSION'
- DISCUSSION_META_POSTFIX =
'_meta'
- IMSDT_TYPE =
'imsdt_xmlv1p1'
- LAR_TYPE =
'associatedcontent/imscc_xmlv1p1/learning-application-resource'
Instance Attribute Summary collapse
-
#discussion_type ⇒ Object
Returns the value of attribute discussion_type.
-
#identifier ⇒ Object
Returns the value of attribute identifier.
-
#is_announcement ⇒ Object
Returns the value of attribute is_announcement.
-
#points_possible ⇒ Object
Returns the value of attribute points_possible.
-
#require_initial_post ⇒ Object
Returns the value of attribute require_initial_post.
-
#text ⇒ Object
Returns the value of attribute text.
-
#title ⇒ Object
Returns the value of attribute title.
-
#workflow_state ⇒ Object
Returns the value of attribute workflow_state.
Instance Method Summary collapse
Instance Attribute Details
#discussion_type ⇒ Object
Returns the value of attribute discussion_type.
3 4 5 |
# File 'lib/moodle2cc/canvas_cc/models/discussion.rb', line 3 def discussion_type @discussion_type end |
#identifier ⇒ Object
Returns the value of attribute identifier.
3 4 5 |
# File 'lib/moodle2cc/canvas_cc/models/discussion.rb', line 3 def identifier @identifier end |
#is_announcement ⇒ Object
Returns the value of attribute is_announcement.
3 4 5 |
# File 'lib/moodle2cc/canvas_cc/models/discussion.rb', line 3 def is_announcement @is_announcement end |
#points_possible ⇒ Object
Returns the value of attribute points_possible.
3 4 5 |
# File 'lib/moodle2cc/canvas_cc/models/discussion.rb', line 3 def points_possible @points_possible end |
#require_initial_post ⇒ Object
Returns the value of attribute require_initial_post.
3 4 5 |
# File 'lib/moodle2cc/canvas_cc/models/discussion.rb', line 3 def require_initial_post @require_initial_post end |
#text ⇒ Object
Returns the value of attribute text.
3 4 5 |
# File 'lib/moodle2cc/canvas_cc/models/discussion.rb', line 3 def text @text end |
#title ⇒ Object
Returns the value of attribute title.
3 4 5 |
# File 'lib/moodle2cc/canvas_cc/models/discussion.rb', line 3 def title @title end |
#workflow_state ⇒ Object
Returns the value of attribute workflow_state.
3 4 5 |
# File 'lib/moodle2cc/canvas_cc/models/discussion.rb', line 3 def workflow_state @workflow_state end |
Instance Method Details
#discussion_resource ⇒ Object
14 15 16 17 18 19 20 21 22 |
# File 'lib/moodle2cc/canvas_cc/models/discussion.rb', line 14 def discussion_resource resource = Moodle2CC::CanvasCC::Models::Resource.new resource.identifier = @identifier resource.dependencies << resource.identifier + DISCUSSION_META_POSTFIX resource.type = IMSDT_TYPE resource.files << resource.identifier + '.xml' resource end |
#meta_resource ⇒ Object
24 25 26 27 28 29 30 31 32 33 |
# File 'lib/moodle2cc/canvas_cc/models/discussion.rb', line 24 def resource = Moodle2CC::CanvasCC::Models::Resource.new resource.identifier = @identifier + DISCUSSION_META_POSTFIX resource.type = LAR_TYPE file_name = resource.identifier + '.xml' resource.href = file_name resource.files << file_name resource end |
#resources ⇒ Object
9 10 11 12 |
# File 'lib/moodle2cc/canvas_cc/models/discussion.rb', line 9 def resources #generate_meta_resource [discussion_resource, ] end |