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

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
generated/google/apis/classroom_v1/classes.rb,
generated/google/apis/classroom_v1/representations.rb,
generated/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

Methods included from Google::Apis::Core::JsonObjectSupport

#to_json

Methods included from Google::Apis::Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ CourseWork

Returns a new instance of CourseWork



716
717
718
# File 'generated/google/apis/classroom_v1/classes.rb', line 716

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)


650
651
652
# File 'generated/google/apis/classroom_v1/classes.rb', line 650

def alternate_link
  @alternate_link
end

#assignmentGoogle::Apis::ClassroomV1::Assignment

Additional details for assignments. Corresponds to the JSON property assignment



673
674
675
# File 'generated/google/apis/classroom_v1/classes.rb', line 673

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 google.classroom.Work.CreateCourseWork for more details. Read-only. Corresponds to the JSON property associatedWithDeveloper

Returns:

  • (Boolean)


636
637
638
# File 'generated/google/apis/classroom_v1/classes.rb', line 636

def associated_with_developer
  @associated_with_developer
end

#course_idString

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

Returns:

  • (String)


601
602
603
# File 'generated/google/apis/classroom_v1/classes.rb', line 601

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)


691
692
693
# File 'generated/google/apis/classroom_v1/classes.rb', line 691

def creation_time
  @creation_time
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)


680
681
682
# File 'generated/google/apis/classroom_v1/classes.rb', line 680

def description
  @description
end

#due_dateGoogle::Apis::ClassroomV1::Date

Represents a whole calendar date, e.g. date of birth. The time of day and time zone are either specified elsewhere or are not significant. The date is relative to the Proleptic Gregorian Calendar. The day may be 0 to represent a year and month where the day is not significant, e.g. credit card expiration date. The year may be 0 to represent a month and day independent of year, e.g. anniversary date. Related types are google.type.TimeOfDay and google.protobuf.Timestamp. Corresponds to the JSON property dueDate



702
703
704
# File 'generated/google/apis/classroom_v1/classes.rb', line 702

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



614
615
616
# File 'generated/google/apis/classroom_v1/classes.rb', line 614

def due_time
  @due_time
end

#idString

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

Returns:

  • (String)


607
608
609
# File 'generated/google/apis/classroom_v1/classes.rb', line 607

def id
  @id
end

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

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



627
628
629
# File 'generated/google/apis/classroom_v1/classes.rb', line 627

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)


657
658
659
# File 'generated/google/apis/classroom_v1/classes.rb', line 657

def max_points
  @max_points
end

#multiple_choice_questionGoogle::Apis::ClassroomV1::MultipleChoiceQuestion

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



668
669
670
# File 'generated/google/apis/classroom_v1/classes.rb', line 668

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)


685
686
687
# File 'generated/google/apis/classroom_v1/classes.rb', line 685

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)


714
715
716
# File 'generated/google/apis/classroom_v1/classes.rb', line 714

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)


708
709
710
# File 'generated/google/apis/classroom_v1/classes.rb', line 708

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)


621
622
623
# File 'generated/google/apis/classroom_v1/classes.rb', line 621

def title
  @title
end

#update_timeString

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

Returns:

  • (String)


643
644
645
# File 'generated/google/apis/classroom_v1/classes.rb', line 643

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)


663
664
665
# File 'generated/google/apis/classroom_v1/classes.rb', line 663

def work_type
  @work_type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
# File 'generated/google/apis/classroom_v1/classes.rb', line 721

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