Class: Google::Apis::ClassroomV1::GradeCategory

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

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.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GradeCategory

Returns a new instance of GradeCategory.



1033
1034
1035
# File 'lib/google/apis/classroom_v1/classes.rb', line 1033

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

Instance Attribute Details

#default_grade_denominatorFixnum

Default value of denominator. Only applicable when grade calculation type is TOTAL_POINTS. Corresponds to the JSON property defaultGradeDenominator

Returns:

  • (Fixnum)


1013
1014
1015
# File 'lib/google/apis/classroom_v1/classes.rb', line 1013

def default_grade_denominator
  @default_grade_denominator
end

#idString

ID of the grade category. Corresponds to the JSON property id

Returns:

  • (String)


1018
1019
1020
# File 'lib/google/apis/classroom_v1/classes.rb', line 1018

def id
  @id
end

#nameString

Name of the grade category. Corresponds to the JSON property name

Returns:

  • (String)


1023
1024
1025
# File 'lib/google/apis/classroom_v1/classes.rb', line 1023

def name
  @name
end

#weightFixnum

The weight of the category average as part of overall average. A weight of 12. 34% is represented as 123400 (100% is 1,000,000). The last two digits should always be zero since we use two decimal precision. Only applicable when grade calculation type is WEIGHTED_CATEGORIES. Corresponds to the JSON property weight

Returns:

  • (Fixnum)


1031
1032
1033
# File 'lib/google/apis/classroom_v1/classes.rb', line 1031

def weight
  @weight
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1038
1039
1040
1041
1042
1043
# File 'lib/google/apis/classroom_v1/classes.rb', line 1038

def update!(**args)
  @default_grade_denominator = args[:default_grade_denominator] if args.key?(:default_grade_denominator)
  @id = args[:id] if args.key?(:id)
  @name = args[:name] if args.key?(:name)
  @weight = args[:weight] if args.key?(:weight)
end