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.



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

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



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

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



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

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)


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

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



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

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



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

def when_wrong
  @when_wrong
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



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

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