Class: WhopSDK::Models::Lesson::AssessmentQuestion
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- WhopSDK::Models::Lesson::AssessmentQuestion
- Defined in:
- lib/whop_sdk/models/lesson.rb
Defined Under Namespace
Instance Attribute Summary collapse
-
#correct_answer ⇒ String?
The correct answer for the question.
-
#created_at ⇒ Time
When the question was created.
-
#id ⇒ String
The ID of the assessment question.
-
#image ⇒ WhopSDK::Models::Lesson::AssessmentQuestion::Image?
Optional image attachment for the question.
-
#options ⇒ Array<WhopSDK::Models::Lesson::AssessmentQuestion::Option>
The answer options for multiple choice/select questions.
-
#order ⇒ Integer
The order of the question within its lesson.
-
#question_text ⇒ String
The text of the question.
-
#question_type ⇒ Symbol, WhopSDK::Models::AssessmentQuestionTypes
The type of the question.
Instance Method Summary collapse
-
#initialize(id: , content_type: , filename: , url: ) ⇒ Object
constructor
Some parameter documentations has been truncated, see Image for more details.
Methods inherited from Internal::Type::BaseModel
==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml
Methods included from Internal::Type::Converter
#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info
Methods included from Internal::Util::SorbetRuntimeSupport
#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type
Constructor Details
#initialize(id: , content_type: , filename: , url: ) ⇒ Object
Some parameter documentations has been truncated, see Image for more details.
Optional image attachment for the question
127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 |
# File 'lib/whop_sdk/models/lesson.rb', line 127 class AssessmentQuestion < WhopSDK::Internal::Type::BaseModel # @!attribute id # The ID of the assessment question # # @return [String] required :id, String # @!attribute correct_answer # The correct answer for the question. Used for short answer questions. Only # visible to admins (users with courses:update permission) # # @return [String, nil] required :correct_answer, String, nil?: true # @!attribute created_at # When the question was created # # @return [Time] required :created_at, Time # @!attribute image # Optional image attachment for the question # # @return [WhopSDK::Models::Lesson::AssessmentQuestion::Image, nil] required :image, -> { WhopSDK::Lesson::AssessmentQuestion::Image }, nil?: true # @!attribute options # The answer options for multiple choice/select questions # # @return [Array<WhopSDK::Models::Lesson::AssessmentQuestion::Option>] required :options, -> { WhopSDK::Internal::Type::ArrayOf[WhopSDK::Lesson::AssessmentQuestion::Option] } # @!attribute order # The order of the question within its lesson # # @return [Integer] required :order, Integer # @!attribute question_text # The text of the question # # @return [String] required :question_text, String # @!attribute question_type # The type of the question # # @return [Symbol, WhopSDK::Models::AssessmentQuestionTypes] required :question_type, enum: -> { WhopSDK::AssessmentQuestionTypes } # @!method initialize(id:, correct_answer:, created_at:, image:, options:, order:, question_text:, question_type:) # Some parameter documentations has been truncated, see # {WhopSDK::Models::Lesson::AssessmentQuestion} for more details. # # An assessment question in a course quiz or knowledge check # # @param id [String] The ID of the assessment question # # @param correct_answer [String, nil] The correct answer for the question. Used for short answer questions. Only visib # # @param created_at [Time] When the question was created # # @param image [WhopSDK::Models::Lesson::AssessmentQuestion::Image, nil] Optional image attachment for the question # # @param options [Array<WhopSDK::Models::Lesson::AssessmentQuestion::Option>] The answer options for multiple choice/select questions # # @param order [Integer] The order of the question within its lesson # # @param question_text [String] The text of the question # # @param question_type [Symbol, WhopSDK::Models::AssessmentQuestionTypes] The type of the question # @see WhopSDK::Models::Lesson::AssessmentQuestion#image class Image < WhopSDK::Internal::Type::BaseModel # @!attribute id # The ID of the attachment # # @return [String] required :id, String # @!attribute content_type # The attachment's content type (e.g., image/jpg, video/mp4) # # @return [String, nil] required :content_type, String, nil?: true # @!attribute filename # The name of the file # # @return [String, nil] required :filename, String, nil?: true # @!attribute url # This is the URL you use to render optimized attachments on the client. This # should be used for apps. # # @return [String, nil] required :url, String, nil?: true # @!method initialize(id:, content_type:, filename:, url:) # Some parameter documentations has been truncated, see # {WhopSDK::Models::Lesson::AssessmentQuestion::Image} for more details. # # Optional image attachment for the question # # @param id [String] The ID of the attachment # # @param content_type [String, nil] The attachment's content type (e.g., image/jpg, video/mp4) # # @param filename [String, nil] The name of the file # # @param url [String, nil] This is the URL you use to render optimized attachments on the client. This shou end class Option < WhopSDK::Internal::Type::BaseModel # @!attribute id # The ID of the assessment question option # # @return [String] required :id, String # @!attribute is_correct # Whether this option is a correct answer. Only visible to admins (users with # courses:update permission) # # @return [Boolean, nil] required :is_correct, WhopSDK::Internal::Type::Boolean, nil?: true # @!attribute option_text # The text of the answer option # # @return [String] required :option_text, String # @!attribute order # The order of this option within the question # # @return [Integer] required :order, Integer # @!method initialize(id:, is_correct:, option_text:, order:) # Some parameter documentations has been truncated, see # {WhopSDK::Models::Lesson::AssessmentQuestion::Option} for more details. # # An answer option for a multiple choice or multiple select assessment question # # @param id [String] The ID of the assessment question option # # @param is_correct [Boolean, nil] Whether this option is a correct answer. Only visible to admins (users with cour # # @param option_text [String] The text of the answer option # # @param order [Integer] The order of this option within the question end end |
Instance Attribute Details
#correct_answer ⇒ String?
The correct answer for the question. Used for short answer questions. Only visible to admins (users with courses:update permission)
139 |
# File 'lib/whop_sdk/models/lesson.rb', line 139 required :correct_answer, String, nil?: true |
#created_at ⇒ Time
When the question was created
145 |
# File 'lib/whop_sdk/models/lesson.rb', line 145 required :created_at, Time |
#id ⇒ String
The ID of the assessment question
132 |
# File 'lib/whop_sdk/models/lesson.rb', line 132 required :id, String |
#image ⇒ WhopSDK::Models::Lesson::AssessmentQuestion::Image?
Optional image attachment for the question
151 |
# File 'lib/whop_sdk/models/lesson.rb', line 151 required :image, -> { WhopSDK::Lesson::AssessmentQuestion::Image }, nil?: true |
#options ⇒ Array<WhopSDK::Models::Lesson::AssessmentQuestion::Option>
The answer options for multiple choice/select questions
157 |
# File 'lib/whop_sdk/models/lesson.rb', line 157 required :options, -> { WhopSDK::Internal::Type::ArrayOf[WhopSDK::Lesson::AssessmentQuestion::Option] } |
#order ⇒ Integer
The order of the question within its lesson
163 |
# File 'lib/whop_sdk/models/lesson.rb', line 163 required :order, Integer |
#question_text ⇒ String
The text of the question
169 |
# File 'lib/whop_sdk/models/lesson.rb', line 169 required :question_text, String |
#question_type ⇒ Symbol, WhopSDK::Models::AssessmentQuestionTypes
The type of the question
175 |
# File 'lib/whop_sdk/models/lesson.rb', line 175 required :question_type, enum: -> { WhopSDK::AssessmentQuestionTypes } |