Class: Google::Apis::ClassroomV1::CourseWork

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
lib/google/apis/classroom_v1/classes.rb,
lib/google/apis/classroom_v1/representations.rb,
lib/google/apis/classroom_v1/representations.rb

Overview

Course work created by a teacher for students of the course.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ CourseWork

Returns a new instance of CourseWork.



866
867
868
# File 'lib/google/apis/classroom_v1/classes.rb', line 866

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

Absolute link to this course work in the Classroom web UI. This is only populated if state is PUBLISHED. Read-only. Corresponds to the JSON property alternateLink

Returns:

  • (String)


722
723
724
# File 'lib/google/apis/classroom_v1/classes.rb', line 722

def alternate_link
  @alternate_link
end

#assignee_modeString

Assignee mode of the coursework. If unspecified, the default value is ALL_STUDENTS. Corresponds to the JSON property assigneeMode

Returns:

  • (String)


728
729
730
# File 'lib/google/apis/classroom_v1/classes.rb', line 728

def assignee_mode
  @assignee_mode
end

#assignmentGoogle::Apis::ClassroomV1::Assignment

Additional details for assignments. Corresponds to the JSON property assignment



733
734
735
# File 'lib/google/apis/classroom_v1/classes.rb', line 733

def assignment
  @assignment
end

#associated_with_developerBoolean Also known as: associated_with_developer?

Whether this course work item is associated with the Developer Console project making the request. See CreateCourseWork for more details. Read-only. Corresponds to the JSON property associatedWithDeveloper

Returns:

  • (Boolean)


739
740
741
# File 'lib/google/apis/classroom_v1/classes.rb', line 739

def associated_with_developer
  @associated_with_developer
end

#course_idString

Identifier of the course. Read-only. Corresponds to the JSON property courseId

Returns:

  • (String)


745
746
747
# File 'lib/google/apis/classroom_v1/classes.rb', line 745

def course_id
  @course_id
end

#creation_timeString

Timestamp when this course work was created. Read-only. Corresponds to the JSON property creationTime

Returns:

  • (String)


750
751
752
# File 'lib/google/apis/classroom_v1/classes.rb', line 750

def creation_time
  @creation_time
end

#creator_user_idString

Identifier for the user that created the coursework. Read-only. Corresponds to the JSON property creatorUserId

Returns:

  • (String)


755
756
757
# File 'lib/google/apis/classroom_v1/classes.rb', line 755

def creator_user_id
  @creator_user_id
end

#descriptionString

Optional description of this course work. If set, the description must be a valid UTF-8 string containing no more than 30,000 characters. Corresponds to the JSON property description

Returns:

  • (String)


761
762
763
# File 'lib/google/apis/classroom_v1/classes.rb', line 761

def description
  @description
end

#due_dateGoogle::Apis::ClassroomV1::Date

Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type. TimeOfDay * google.type.DateTime * google.protobuf.Timestamp Corresponds to the JSON property dueDate



773
774
775
# File 'lib/google/apis/classroom_v1/classes.rb', line 773

def due_date
  @due_date
end

#due_timeGoogle::Apis::ClassroomV1::TimeOfDay

Represents a time of day. The date and time zone are either not significant or are specified elsewhere. An API may choose to allow leap seconds. Related types are google.type.Date and google.protobuf.Timestamp. Corresponds to the JSON property dueTime



780
781
782
# File 'lib/google/apis/classroom_v1/classes.rb', line 780

def due_time
  @due_time
end

#grade_categoryGoogle::Apis::ClassroomV1::GradeCategory

Details for a grade category in a course. Coursework may have zero or one grade category, and the category may be used in computing the overall grade. See the help center article for details. Corresponds to the JSON property gradeCategory



788
789
790
# File 'lib/google/apis/classroom_v1/classes.rb', line 788

def grade_category
  @grade_category
end

#grading_period_idString

Identifier of the grading period associated with the coursework. * At creation, if unspecified, the grading period ID will be set based on the dueDate (or scheduledTime if no dueDate is set). * To indicate no association to any grading period, set this field to an empty string (""). * If specified, it must match an existing grading period ID in the course. Corresponds to the JSON property gradingPeriodId

Returns:

  • (String)


797
798
799
# File 'lib/google/apis/classroom_v1/classes.rb', line 797

def grading_period_id
  @grading_period_id
end

#idString

Classroom-assigned identifier of this course work, unique per course. Read- only. Corresponds to the JSON property id

Returns:

  • (String)


803
804
805
# File 'lib/google/apis/classroom_v1/classes.rb', line 803

def id
  @id
end

#individual_students_optionsGoogle::Apis::ClassroomV1::IndividualStudentsOptions

Assignee details about a coursework/announcement. This field is set if and only if assigneeMode is INDIVIDUAL_STUDENTS. Corresponds to the JSON property individualStudentsOptions



809
810
811
# File 'lib/google/apis/classroom_v1/classes.rb', line 809

def individual_students_options
  @individual_students_options
end

#materialsArray<Google::Apis::ClassroomV1::Material>

Additional materials. CourseWork must have no more than 20 material items. Corresponds to the JSON property materials



814
815
816
# File 'lib/google/apis/classroom_v1/classes.rb', line 814

def materials
  @materials
end

#max_pointsFloat

Maximum grade for this course work. If zero or unspecified, this assignment is considered ungraded. This must be a non-negative integer value. Corresponds to the JSON property maxPoints

Returns:

  • (Float)


820
821
822
# File 'lib/google/apis/classroom_v1/classes.rb', line 820

def max_points
  @max_points
end

#multiple_choice_questionGoogle::Apis::ClassroomV1::MultipleChoiceQuestion

Additional details for multiple-choice questions. Corresponds to the JSON property multipleChoiceQuestion



825
826
827
# File 'lib/google/apis/classroom_v1/classes.rb', line 825

def multiple_choice_question
  @multiple_choice_question
end

#scheduled_timeString

Optional timestamp when this course work is scheduled to be published. Corresponds to the JSON property scheduledTime

Returns:

  • (String)


830
831
832
# File 'lib/google/apis/classroom_v1/classes.rb', line 830

def scheduled_time
  @scheduled_time
end

#stateString

Status of this course work. If unspecified, the default state is DRAFT. Corresponds to the JSON property state

Returns:

  • (String)


835
836
837
# File 'lib/google/apis/classroom_v1/classes.rb', line 835

def state
  @state
end

#submission_modification_modeString

Setting to determine when students are allowed to modify submissions. If unspecified, the default value is MODIFIABLE_UNTIL_TURNED_IN. Corresponds to the JSON property submissionModificationMode

Returns:

  • (String)


841
842
843
# File 'lib/google/apis/classroom_v1/classes.rb', line 841

def submission_modification_mode
  @submission_modification_mode
end

#titleString

Title of this course work. The title must be a valid UTF-8 string containing between 1 and 3000 characters. Corresponds to the JSON property title

Returns:

  • (String)


847
848
849
# File 'lib/google/apis/classroom_v1/classes.rb', line 847

def title
  @title
end

#topic_idString

Identifier for the topic that this coursework is associated with. Must match an existing topic in the course. Corresponds to the JSON property topicId

Returns:

  • (String)


853
854
855
# File 'lib/google/apis/classroom_v1/classes.rb', line 853

def topic_id
  @topic_id
end

#update_timeString

Timestamp of the most recent change to this course work. Read-only. Corresponds to the JSON property updateTime

Returns:

  • (String)


858
859
860
# File 'lib/google/apis/classroom_v1/classes.rb', line 858

def update_time
  @update_time
end

#work_typeString

Type of this course work. The type is set when the course work is created and cannot be changed. Corresponds to the JSON property workType

Returns:

  • (String)


864
865
866
# File 'lib/google/apis/classroom_v1/classes.rb', line 864

def work_type
  @work_type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
# File 'lib/google/apis/classroom_v1/classes.rb', line 871

def update!(**args)
  @alternate_link = args[:alternate_link] if args.key?(:alternate_link)
  @assignee_mode = args[:assignee_mode] if args.key?(:assignee_mode)
  @assignment = args[:assignment] if args.key?(:assignment)
  @associated_with_developer = args[:associated_with_developer] if args.key?(:associated_with_developer)
  @course_id = args[:course_id] if args.key?(:course_id)
  @creation_time = args[:creation_time] if args.key?(:creation_time)
  @creator_user_id = args[:creator_user_id] if args.key?(:creator_user_id)
  @description = args[:description] if args.key?(:description)
  @due_date = args[:due_date] if args.key?(:due_date)
  @due_time = args[:due_time] if args.key?(:due_time)
  @grade_category = args[:grade_category] if args.key?(:grade_category)
  @grading_period_id = args[:grading_period_id] if args.key?(:grading_period_id)
  @id = args[:id] if args.key?(:id)
  @individual_students_options = args[:individual_students_options] if args.key?(:individual_students_options)
  @materials = args[:materials] if args.key?(:materials)
  @max_points = args[:max_points] if args.key?(:max_points)
  @multiple_choice_question = args[:multiple_choice_question] if args.key?(:multiple_choice_question)
  @scheduled_time = args[:scheduled_time] if args.key?(:scheduled_time)
  @state = args[:state] if args.key?(:state)
  @submission_modification_mode = args[:submission_modification_mode] if args.key?(:submission_modification_mode)
  @title = args[:title] if args.key?(:title)
  @topic_id = args[:topic_id] if args.key?(:topic_id)
  @update_time = args[:update_time] if args.key?(:update_time)
  @work_type = args[:work_type] if args.key?(:work_type)
end