Class: Google::Apis::FormsV1::Grade

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/forms_v1/classes.rb,
lib/google/apis/forms_v1/representations.rb,
lib/google/apis/forms_v1/representations.rb

Overview

Grade information associated with a respondent's answer to a question.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Grade

Returns a new instance of Grade.



686
687
688
# File 'lib/google/apis/forms_v1/classes.rb', line 686

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

Instance Attribute Details

#correctBoolean Also known as: correct?

Output only. Whether the question was answered correctly or not. A zero-point score is not enough to infer incorrectness, since a correctly answered question could be worth zero points. Corresponds to the JSON property correct

Returns:

  • (Boolean)


673
674
675
# File 'lib/google/apis/forms_v1/classes.rb', line 673

def correct
  @correct
end

#feedbackGoogle::Apis::FormsV1::Feedback

Feedback for a respondent about their response to a question. Corresponds to the JSON property feedback



679
680
681
# File 'lib/google/apis/forms_v1/classes.rb', line 679

def feedback
  @feedback
end

#scoreFloat

Output only. The numeric score awarded for the answer. Corresponds to the JSON property score

Returns:

  • (Float)


684
685
686
# File 'lib/google/apis/forms_v1/classes.rb', line 684

def score
  @score
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



691
692
693
694
695
# File 'lib/google/apis/forms_v1/classes.rb', line 691

def update!(**args)
  @correct = args[:correct] if args.key?(:correct)
  @feedback = args[:feedback] if args.key?(:feedback)
  @score = args[:score] if args.key?(:score)
end