Class: CanvasCc::CanvasCC::Models::Assignment
- Inherits:
-
Object
- Object
- CanvasCc::CanvasCC::Models::Assignment
- Defined in:
- lib/canvas_cc/canvas_cc/models/assignment.rb
Constant Summary collapse
- LAR_TYPE =
'associatedcontent/imscc_xmlv1p1/learning-application-resource'
- ASSIGNMENT_SETTINGS_FILE =
'assignment_settings.xml'
Instance Attribute Summary collapse
-
#all_day ⇒ Object
Returns the value of attribute all_day.
-
#all_day_date ⇒ Object
Returns the value of attribute all_day_date.
-
#anonymous_peer_reviews ⇒ Object
Returns the value of attribute anonymous_peer_reviews.
-
#assignment_group_identifier_ref ⇒ Object
Returns the value of attribute assignment_group_identifier_ref.
-
#automatic_peer_reviews ⇒ Object
Returns the value of attribute automatic_peer_reviews.
-
#body ⇒ Object
Returns the value of attribute body.
-
#due_at ⇒ Object
Returns the value of attribute due_at.
-
#grade_group_students_individually ⇒ Object
Returns the value of attribute grade_group_students_individually.
-
#grading_standard_identifier_ref ⇒ Object
Returns the value of attribute grading_standard_identifier_ref.
-
#grading_type ⇒ Object
Returns the value of attribute grading_type.
-
#identifier ⇒ Object
Returns the value of attribute identifier.
-
#lock_at ⇒ Object
Returns the value of attribute lock_at.
-
#muted ⇒ Object
Returns the value of attribute muted.
-
#omit_from_final_grade ⇒ Object
Returns the value of attribute omit_from_final_grade.
-
#peer_review_count ⇒ Object
Returns the value of attribute peer_review_count.
-
#peer_reviews ⇒ Object
Returns the value of attribute peer_reviews.
-
#peer_reviews_assigned ⇒ Object
Returns the value of attribute peer_reviews_assigned.
-
#peer_reviews_due_at ⇒ Object
Returns the value of attribute peer_reviews_due_at.
-
#points_possible ⇒ Object
Returns the value of attribute points_possible.
-
#position ⇒ Object
Returns the value of attribute position.
-
#quiz_identifierref ⇒ Object
Returns the value of attribute quiz_identifierref.
-
#rubric ⇒ Object
Returns the value of attribute rubric.
-
#rubric_hide_score_total ⇒ Object
Returns the value of attribute rubric_hide_score_total.
-
#rubric_use_for_grading ⇒ Object
Returns the value of attribute rubric_use_for_grading.
-
#submission_types ⇒ Object
Returns the value of attribute submission_types.
-
#title ⇒ Object
Returns the value of attribute title.
-
#turnitin_enabled ⇒ Object
Returns the value of attribute turnitin_enabled.
-
#unlock_at ⇒ Object
Returns the value of attribute unlock_at.
-
#workflow_state ⇒ Object
Returns the value of attribute workflow_state.
Instance Method Summary collapse
- #assignment_resource ⇒ Object
-
#initialize ⇒ Assignment
constructor
A new instance of Assignment.
- #resources ⇒ Object
Constructor Details
#initialize ⇒ Assignment
Returns a new instance of Assignment.
13 14 15 |
# File 'lib/canvas_cc/canvas_cc/models/assignment.rb', line 13 def initialize @submission_types = [] end |
Instance Attribute Details
#all_day ⇒ Object
Returns the value of attribute all_day.
3 4 5 |
# File 'lib/canvas_cc/canvas_cc/models/assignment.rb', line 3 def all_day @all_day end |
#all_day_date ⇒ Object
Returns the value of attribute all_day_date.
3 4 5 |
# File 'lib/canvas_cc/canvas_cc/models/assignment.rb', line 3 def all_day_date @all_day_date end |
#anonymous_peer_reviews ⇒ Object
Returns the value of attribute anonymous_peer_reviews.
3 4 5 |
# File 'lib/canvas_cc/canvas_cc/models/assignment.rb', line 3 def anonymous_peer_reviews @anonymous_peer_reviews end |
#assignment_group_identifier_ref ⇒ Object
Returns the value of attribute assignment_group_identifier_ref.
3 4 5 |
# File 'lib/canvas_cc/canvas_cc/models/assignment.rb', line 3 def assignment_group_identifier_ref @assignment_group_identifier_ref end |
#automatic_peer_reviews ⇒ Object
Returns the value of attribute automatic_peer_reviews.
3 4 5 |
# File 'lib/canvas_cc/canvas_cc/models/assignment.rb', line 3 def automatic_peer_reviews @automatic_peer_reviews end |
#body ⇒ Object
Returns the value of attribute body.
3 4 5 |
# File 'lib/canvas_cc/canvas_cc/models/assignment.rb', line 3 def body @body end |
#due_at ⇒ Object
Returns the value of attribute due_at.
3 4 5 |
# File 'lib/canvas_cc/canvas_cc/models/assignment.rb', line 3 def due_at @due_at end |
#grade_group_students_individually ⇒ Object
Returns the value of attribute grade_group_students_individually.
3 4 5 |
# File 'lib/canvas_cc/canvas_cc/models/assignment.rb', line 3 def grade_group_students_individually @grade_group_students_individually end |
#grading_standard_identifier_ref ⇒ Object
Returns the value of attribute grading_standard_identifier_ref.
3 4 5 |
# File 'lib/canvas_cc/canvas_cc/models/assignment.rb', line 3 def grading_standard_identifier_ref @grading_standard_identifier_ref end |
#grading_type ⇒ Object
Returns the value of attribute grading_type.
3 4 5 |
# File 'lib/canvas_cc/canvas_cc/models/assignment.rb', line 3 def grading_type @grading_type end |
#identifier ⇒ Object
Returns the value of attribute identifier.
3 4 5 |
# File 'lib/canvas_cc/canvas_cc/models/assignment.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/assignment.rb', line 3 def lock_at @lock_at end |
#muted ⇒ Object
Returns the value of attribute muted.
3 4 5 |
# File 'lib/canvas_cc/canvas_cc/models/assignment.rb', line 3 def muted @muted end |
#omit_from_final_grade ⇒ Object
Returns the value of attribute omit_from_final_grade.
3 4 5 |
# File 'lib/canvas_cc/canvas_cc/models/assignment.rb', line 3 def omit_from_final_grade @omit_from_final_grade end |
#peer_review_count ⇒ Object
Returns the value of attribute peer_review_count.
3 4 5 |
# File 'lib/canvas_cc/canvas_cc/models/assignment.rb', line 3 def peer_review_count @peer_review_count end |
#peer_reviews ⇒ Object
Returns the value of attribute peer_reviews.
3 4 5 |
# File 'lib/canvas_cc/canvas_cc/models/assignment.rb', line 3 def peer_reviews @peer_reviews end |
#peer_reviews_assigned ⇒ Object
Returns the value of attribute peer_reviews_assigned.
3 4 5 |
# File 'lib/canvas_cc/canvas_cc/models/assignment.rb', line 3 def peer_reviews_assigned @peer_reviews_assigned end |
#peer_reviews_due_at ⇒ Object
Returns the value of attribute peer_reviews_due_at.
3 4 5 |
# File 'lib/canvas_cc/canvas_cc/models/assignment.rb', line 3 def peer_reviews_due_at @peer_reviews_due_at end |
#points_possible ⇒ Object
Returns the value of attribute points_possible.
3 4 5 |
# File 'lib/canvas_cc/canvas_cc/models/assignment.rb', line 3 def points_possible @points_possible end |
#position ⇒ Object
Returns the value of attribute position.
3 4 5 |
# File 'lib/canvas_cc/canvas_cc/models/assignment.rb', line 3 def position @position end |
#quiz_identifierref ⇒ Object
Returns the value of attribute quiz_identifierref.
3 4 5 |
# File 'lib/canvas_cc/canvas_cc/models/assignment.rb', line 3 def quiz_identifierref @quiz_identifierref end |
#rubric ⇒ Object
Returns the value of attribute rubric.
3 4 5 |
# File 'lib/canvas_cc/canvas_cc/models/assignment.rb', line 3 def rubric @rubric end |
#rubric_hide_score_total ⇒ Object
Returns the value of attribute rubric_hide_score_total.
3 4 5 |
# File 'lib/canvas_cc/canvas_cc/models/assignment.rb', line 3 def rubric_hide_score_total @rubric_hide_score_total end |
#rubric_use_for_grading ⇒ Object
Returns the value of attribute rubric_use_for_grading.
3 4 5 |
# File 'lib/canvas_cc/canvas_cc/models/assignment.rb', line 3 def rubric_use_for_grading @rubric_use_for_grading end |
#submission_types ⇒ Object
Returns the value of attribute submission_types.
3 4 5 |
# File 'lib/canvas_cc/canvas_cc/models/assignment.rb', line 3 def submission_types @submission_types end |
#title ⇒ Object
Returns the value of attribute title.
3 4 5 |
# File 'lib/canvas_cc/canvas_cc/models/assignment.rb', line 3 def title @title end |
#turnitin_enabled ⇒ Object
Returns the value of attribute turnitin_enabled.
3 4 5 |
# File 'lib/canvas_cc/canvas_cc/models/assignment.rb', line 3 def turnitin_enabled @turnitin_enabled end |
#unlock_at ⇒ Object
Returns the value of attribute unlock_at.
3 4 5 |
# File 'lib/canvas_cc/canvas_cc/models/assignment.rb', line 3 def unlock_at @unlock_at end |
#workflow_state ⇒ Object
Returns the value of attribute workflow_state.
3 4 5 |
# File 'lib/canvas_cc/canvas_cc/models/assignment.rb', line 3 def workflow_state @workflow_state end |
Instance Method Details
#assignment_resource ⇒ Object
21 22 23 24 25 26 27 28 29 |
# File 'lib/canvas_cc/canvas_cc/models/assignment.rb', line 21 def assignment_resource resource = CanvasCc::CanvasCC::Models::Resource.new resource.identifier = @identifier resource.href = "#{resource.identifier}/assignment-#{CGI::escape(title.downcase.gsub(/\s/, '-'))}.html" resource.type = LAR_TYPE resource.files = [resource.href, "#{resource.identifier}/#{ASSIGNMENT_SETTINGS_FILE}"] resource end |
#resources ⇒ Object
17 18 19 |
# File 'lib/canvas_cc/canvas_cc/models/assignment.rb', line 17 def resources [assignment_resource] end |