Class: Google::Apis::ClassroomV1::GradingPeriod

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

An individual grading period. Grading periods must not have overlapping date ranges and must be listed in chronological order. For example, if the end_date of a grading period is 2024-01-25, then the start_date of the next grading period must be 2024-01-26 or later. Each grading period must have a unique title within a course.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GradingPeriod

Returns a new instance of GradingPeriod.



1488
1489
1490
# File 'lib/google/apis/classroom_v1/classes.rb', line 1488

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

Instance Attribute Details

#end_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 endDate



1464
1465
1466
# File 'lib/google/apis/classroom_v1/classes.rb', line 1464

def end_date
  @end_date
end

#idString

Output only. System generated grading period ID. Read-only. Corresponds to the JSON property id

Returns:

  • (String)


1469
1470
1471
# File 'lib/google/apis/classroom_v1/classes.rb', line 1469

def id
  @id
end

#start_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 startDate



1481
1482
1483
# File 'lib/google/apis/classroom_v1/classes.rb', line 1481

def start_date
  @start_date
end

#titleString

Required. Title of the grading period. For example, “Semester 1”. Corresponds to the JSON property title

Returns:

  • (String)


1486
1487
1488
# File 'lib/google/apis/classroom_v1/classes.rb', line 1486

def title
  @title
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1493
1494
1495
1496
1497
1498
# File 'lib/google/apis/classroom_v1/classes.rb', line 1493

def update!(**args)
  @end_date = args[:end_date] if args.key?(:end_date)
  @id = args[:id] if args.key?(:id)
  @start_date = args[:start_date] if args.key?(:start_date)
  @title = args[:title] if args.key?(:title)
end