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.



728
729
730
# File 'lib/google/apis/forms_v1/classes.rb', line 728

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



705
706
707
# File 'lib/google/apis/forms_v1/classes.rb', line 705

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



710
711
712
# File 'lib/google/apis/forms_v1/classes.rb', line 710

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)


716
717
718
# File 'lib/google/apis/forms_v1/classes.rb', line 716

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



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

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



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

def when_wrong
  @when_wrong
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



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

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