Class: CanvasCc::CanvasCC::Models::Discussion
- Inherits:
-
Object
- Object
- CanvasCc::CanvasCC::Models::Discussion
- Defined in:
- lib/canvas_cc/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
-
#assignment ⇒ Object
Returns the value of attribute assignment.
-
#delayed_post_at ⇒ Object
Returns the value of attribute delayed_post_at.
-
#discussion_type ⇒ Object
Returns the value of attribute discussion_type.
-
#identifier ⇒ Object
Returns the value of attribute identifier.
-
#lock_at ⇒ Object
Returns the value of attribute lock_at.
-
#pinned ⇒ Object
Returns the value of attribute pinned.
-
#position ⇒ Object
Returns the value of attribute position.
-
#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.
-
#type ⇒ Object
Returns the value of attribute type.
-
#workflow_state ⇒ Object
Returns the value of attribute workflow_state.
Instance Method Summary collapse
Instance Attribute Details
#assignment ⇒ Object
Returns the value of attribute assignment.
3 4 5 |
# File 'lib/canvas_cc/canvas_cc/models/discussion.rb', line 3 def assignment @assignment end |
#delayed_post_at ⇒ Object
Returns the value of attribute delayed_post_at.
3 4 5 |
# File 'lib/canvas_cc/canvas_cc/models/discussion.rb', line 3 def delayed_post_at @delayed_post_at end |
#discussion_type ⇒ Object
Returns the value of attribute discussion_type.
3 4 5 |
# File 'lib/canvas_cc/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/canvas_cc/canvas_cc/models/discussion.rb', line 3 def identifier @identifier end |
#lock_at ⇒ Object
Returns the value of attribute lock_at.
3 4 5 |
# File 'lib/canvas_cc/canvas_cc/models/discussion.rb', line 3 def lock_at @lock_at end |
#pinned ⇒ Object
Returns the value of attribute pinned.
3 4 5 |
# File 'lib/canvas_cc/canvas_cc/models/discussion.rb', line 3 def pinned @pinned end |
#position ⇒ Object
Returns the value of attribute position.
3 4 5 |
# File 'lib/canvas_cc/canvas_cc/models/discussion.rb', line 3 def position @position end |
#require_initial_post ⇒ Object
Returns the value of attribute require_initial_post.
3 4 5 |
# File 'lib/canvas_cc/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/canvas_cc/canvas_cc/models/discussion.rb', line 3 def text @text end |
#title ⇒ Object
Returns the value of attribute title.
3 4 5 |
# File 'lib/canvas_cc/canvas_cc/models/discussion.rb', line 3 def title @title end |
#type ⇒ Object
Returns the value of attribute type.
3 4 5 |
# File 'lib/canvas_cc/canvas_cc/models/discussion.rb', line 3 def type @type end |
#workflow_state ⇒ Object
Returns the value of attribute workflow_state.
3 4 5 |
# File 'lib/canvas_cc/canvas_cc/models/discussion.rb', line 3 def workflow_state @workflow_state end |
Instance Method Details
#discussion_resource ⇒ Object
15 16 17 18 19 20 21 22 23 |
# File 'lib/canvas_cc/canvas_cc/models/discussion.rb', line 15 def discussion_resource resource = CanvasCc::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
25 26 27 28 29 30 31 32 33 34 |
# File 'lib/canvas_cc/canvas_cc/models/discussion.rb', line 25 def resource = CanvasCc::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
10 11 12 13 |
# File 'lib/canvas_cc/canvas_cc/models/discussion.rb', line 10 def resources #generate_meta_resource [discussion_resource, ] end |