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

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

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

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

#to_json

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

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ StudentSubmission

Returns a new instance of StudentSubmission



1947
1948
1949
# File 'generated/google/apis/classroom_v1/classes.rb', line 1947

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)


1840
1841
1842
# File 'generated/google/apis/classroom_v1/classes.rb', line 1840

def alternate_link
  @alternate_link
end

#assigned_gradeFloat

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

Returns:

  • (Float)


1848
1849
1850
# File 'generated/google/apis/classroom_v1/classes.rb', line 1848

def assigned_grade
  @assigned_grade
end

#assignment_submissionGoogle::Apis::ClassroomV1::AssignmentSubmission

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



1853
1854
1855
# File 'generated/google/apis/classroom_v1/classes.rb', line 1853

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

Returns:

  • (Boolean)


1862
1863
1864
# File 'generated/google/apis/classroom_v1/classes.rb', line 1862

def associated_with_developer
  @associated_with_developer
end

#course_idString

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

Returns:

  • (String)


1869
1870
1871
# File 'generated/google/apis/classroom_v1/classes.rb', line 1869

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)


1875
1876
1877
# File 'generated/google/apis/classroom_v1/classes.rb', line 1875

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)


1881
1882
1883
# File 'generated/google/apis/classroom_v1/classes.rb', line 1881

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)


1888
1889
1890
# File 'generated/google/apis/classroom_v1/classes.rb', line 1888

def creation_time
  @creation_time
end

#draft_gradeFloat

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

Returns:

  • (Float)


1896
1897
1898
# File 'generated/google/apis/classroom_v1/classes.rb', line 1896

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)


1903
1904
1905
# File 'generated/google/apis/classroom_v1/classes.rb', line 1903

def id
  @id
end

#lateBoolean Also known as: late?

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

Returns:

  • (Boolean)


1909
1910
1911
# File 'generated/google/apis/classroom_v1/classes.rb', line 1909

def late
  @late
end

#multiple_choice_submissionGoogle::Apis::ClassroomV1::MultipleChoiceSubmission

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



1915
1916
1917
# File 'generated/google/apis/classroom_v1/classes.rb', line 1915

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



1920
1921
1922
# File 'generated/google/apis/classroom_v1/classes.rb', line 1920

def short_answer_submission
  @short_answer_submission
end

#stateString

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

Returns:

  • (String)


1926
1927
1928
# File 'generated/google/apis/classroom_v1/classes.rb', line 1926

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



1932
1933
1934
# File 'generated/google/apis/classroom_v1/classes.rb', line 1932

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)


1939
1940
1941
# File 'generated/google/apis/classroom_v1/classes.rb', line 1939

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)


1945
1946
1947
# File 'generated/google/apis/classroom_v1/classes.rb', line 1945

def user_id
  @user_id
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
# File 'generated/google/apis/classroom_v1/classes.rb', line 1952

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