Class: Google::Apis::FormsV1::Grading

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

Grading for a single question

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Grading

Returns a new instance of Grading.



744
745
746
# File 'lib/google/apis/forms_v1/classes.rb', line 744

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

Instance Attribute Details

#correct_answersGoogle::Apis::FormsV1::CorrectAnswers

The answer key for a question. Corresponds to the JSON property correctAnswers



721
722
723
# File 'lib/google/apis/forms_v1/classes.rb', line 721

def correct_answers
  @correct_answers
end

#general_feedbackGoogle::Apis::FormsV1::Feedback

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



726
727
728
# File 'lib/google/apis/forms_v1/classes.rb', line 726

def general_feedback
  @general_feedback
end

#point_valueFixnum

Required. The maximum number of points a respondent can automatically get for a correct answer. This must not be negative. Corresponds to the JSON property pointValue

Returns:

  • (Fixnum)


732
733
734
# File 'lib/google/apis/forms_v1/classes.rb', line 732

def point_value
  @point_value
end

#when_rightGoogle::Apis::FormsV1::Feedback

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



737
738
739
# File 'lib/google/apis/forms_v1/classes.rb', line 737

def when_right
  @when_right
end

#when_wrongGoogle::Apis::FormsV1::Feedback

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



742
743
744
# File 'lib/google/apis/forms_v1/classes.rb', line 742

def when_wrong
  @when_wrong
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



749
750
751
752
753
754
755
# File 'lib/google/apis/forms_v1/classes.rb', line 749

def update!(**args)
  @correct_answers = args[:correct_answers] if args.key?(:correct_answers)
  @general_feedback = args[:general_feedback] if args.key?(:general_feedback)
  @point_value = args[:point_value] if args.key?(:point_value)
  @when_right = args[:when_right] if args.key?(:when_right)
  @when_wrong = args[:when_wrong] if args.key?(:when_wrong)
end