class CanvasCc::CanvasCC::Models::Question
Constants
- QTI_META_ATTRIBUTES
- STANDARD_QUESTION_TYPES
Attributes
answers[RW]
general_correct_feedback[RW]
general_feedback[RW]
general_incorrect_feedback[RW]
identifier[RW]
material[RW]
original_identifier[RW]
title[RW]
Public Class Methods
create(type)
click to toggle source
# File lib/canvas_cc/canvas_cc/models/question.rb, line 14 def self.create(type) q = if STANDARD_QUESTION_TYPES.include?(type) self.new elsif c = @@subclasses[type] c.new else raise "Unknown question type: #{type}" end q.question_type = type q end
new()
click to toggle source
# File lib/canvas_cc/canvas_cc/models/question.rb, line 30 def initialize @answers = [] end
register_question_type(name)
click to toggle source
# File lib/canvas_cc/canvas_cc/models/question.rb, line 26 def self.register_question_type(name) @@subclasses[name] = self end