Class: Google::Apis::ClassroomV1::StudentSubmission

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

Student submission for course work. StudentSubmission items are generated when a CourseWork item is created. StudentSubmissions that have never been accessed (i.e. with state = NEW) may not have a creation time or update time.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ StudentSubmission

Returns a new instance of StudentSubmission.



2103
2104
2105
# File 'lib/google/apis/classroom_v1/classes.rb', line 2103

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

Instance Attribute Details

Absolute link to the submission in the Classroom web UI. Read-only. Corresponds to the JSON property alternateLink

Returns:

  • (String)


2010
2011
2012
# File 'lib/google/apis/classroom_v1/classes.rb', line 2010

def alternate_link
  @alternate_link
end

#assigned_gradeFloat

Optional grade. If unset, no grade was set. This value must be non-negative. Decimal (that is, non-integer) values are allowed, but are rounded to two decimal places. This may be modified only by course teachers. Corresponds to the JSON property assignedGrade

Returns:

  • (Float)


2017
2018
2019
# File 'lib/google/apis/classroom_v1/classes.rb', line 2017

def assigned_grade
  @assigned_grade
end

#assignment_submissionGoogle::Apis::ClassroomV1::AssignmentSubmission

Student work for an assignment. Corresponds to the JSON property assignmentSubmission



2022
2023
2024
# File 'lib/google/apis/classroom_v1/classes.rb', line 2022

def assignment_submission
  @assignment_submission
end

#associated_with_developerBoolean Also known as: associated_with_developer?

Whether this student submission 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)


2028
2029
2030
# File 'lib/google/apis/classroom_v1/classes.rb', line 2028

def associated_with_developer
  @associated_with_developer
end

#course_idString

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

Returns:

  • (String)


2034
2035
2036
# File 'lib/google/apis/classroom_v1/classes.rb', line 2034

def course_id
  @course_id
end

#course_work_idString

Identifier for the course work this corresponds to. Read-only. Corresponds to the JSON property courseWorkId

Returns:

  • (String)


2039
2040
2041
# File 'lib/google/apis/classroom_v1/classes.rb', line 2039

def course_work_id
  @course_work_id
end

#course_work_typeString

Type of course work this submission is for. Read-only. Corresponds to the JSON property courseWorkType

Returns:

  • (String)


2044
2045
2046
# File 'lib/google/apis/classroom_v1/classes.rb', line 2044

def course_work_type
  @course_work_type
end

#creation_timeString

Creation time of this submission. This may be unset if the student has not accessed this item. Read-only. Corresponds to the JSON property creationTime

Returns:

  • (String)


2050
2051
2052
# File 'lib/google/apis/classroom_v1/classes.rb', line 2050

def creation_time
  @creation_time
end

#draft_gradeFloat

Optional pending grade. If unset, no grade was set. This value must be non- negative. Decimal (that is, non-integer) values are allowed, but are rounded to two decimal places. This is only visible to and modifiable by course teachers. Corresponds to the JSON property draftGrade

Returns:

  • (Float)


2058
2059
2060
# File 'lib/google/apis/classroom_v1/classes.rb', line 2058

def draft_grade
  @draft_grade
end

#idString

Classroom-assigned Identifier for the student submission. This is unique among submissions for the relevant course work. Read-only. Corresponds to the JSON property id

Returns:

  • (String)


2064
2065
2066
# File 'lib/google/apis/classroom_v1/classes.rb', line 2064

def id
  @id
end

#lateBoolean Also known as: late?

Whether this submission is late. Read-only. Corresponds to the JSON property late

Returns:

  • (Boolean)


2069
2070
2071
# File 'lib/google/apis/classroom_v1/classes.rb', line 2069

def late
  @late
end

#multiple_choice_submissionGoogle::Apis::ClassroomV1::MultipleChoiceSubmission

Student work for a multiple-choice question. Corresponds to the JSON property multipleChoiceSubmission



2075
2076
2077
# File 'lib/google/apis/classroom_v1/classes.rb', line 2075

def multiple_choice_submission
  @multiple_choice_submission
end

#short_answer_submissionGoogle::Apis::ClassroomV1::ShortAnswerSubmission

Student work for a short answer question. Corresponds to the JSON property shortAnswerSubmission



2080
2081
2082
# File 'lib/google/apis/classroom_v1/classes.rb', line 2080

def short_answer_submission
  @short_answer_submission
end

#stateString

State of this submission. Read-only. Corresponds to the JSON property state

Returns:

  • (String)


2085
2086
2087
# File 'lib/google/apis/classroom_v1/classes.rb', line 2085

def state
  @state
end

#submission_historyArray<Google::Apis::ClassroomV1::SubmissionHistory>

The history of the submission (includes state and grade histories). Read-only. Corresponds to the JSON property submissionHistory



2090
2091
2092
# File 'lib/google/apis/classroom_v1/classes.rb', line 2090

def submission_history
  @submission_history
end

#update_timeString

Last update time of this submission. This may be unset if the student has not accessed this item. Read-only. Corresponds to the JSON property updateTime

Returns:

  • (String)


2096
2097
2098
# File 'lib/google/apis/classroom_v1/classes.rb', line 2096

def update_time
  @update_time
end

#user_idString

Identifier for the student that owns this submission. Read-only. Corresponds to the JSON property userId

Returns:

  • (String)


2101
2102
2103
# File 'lib/google/apis/classroom_v1/classes.rb', line 2101

def user_id
  @user_id
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
# File 'lib/google/apis/classroom_v1/classes.rb', line 2108

def update!(**args)
  @alternate_link = args[:alternate_link] if args.key?(:alternate_link)
  @assigned_grade = args[:assigned_grade] if args.key?(:assigned_grade)
  @assignment_submission = args[:assignment_submission] if args.key?(:assignment_submission)
  @associated_with_developer = args[:associated_with_developer] if args.key?(:associated_with_developer)
  @course_id = args[:course_id] if args.key?(:course_id)
  @course_work_id = args[:course_work_id] if args.key?(:course_work_id)
  @course_work_type = args[:course_work_type] if args.key?(:course_work_type)
  @creation_time = args[:creation_time] if args.key?(:creation_time)
  @draft_grade = args[:draft_grade] if args.key?(:draft_grade)
  @id = args[:id] if args.key?(:id)
  @late = args[:late] if args.key?(:late)
  @multiple_choice_submission = args[:multiple_choice_submission] if args.key?(:multiple_choice_submission)
  @short_answer_submission = args[:short_answer_submission] if args.key?(:short_answer_submission)
  @state = args[:state] if args.key?(:state)
  @submission_history = args[:submission_history] if args.key?(:submission_history)
  @update_time = args[:update_time] if args.key?(:update_time)
  @user_id = args[:user_id] if args.key?(:user_id)
end