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
The datetime the assessment question was created.
-
#id ⇒ String
The unique identifier for 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
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 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 |
# File 'lib/whop_sdk/models/lesson.rb', line 144 class AssessmentQuestion < WhopSDK::Internal::Type::BaseModel # @!attribute id # The unique identifier for 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 # The datetime the assessment 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 unique identifier for 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] The datetime the assessment 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 # Represents a unique identifier that is Base64 obfuscated. It is often used to # refetch an object or as key for a cache. The ID type appears in a JSON response # as a String; however, it is not intended to be human-readable. When expected as # an input type, any string (such as `"VXNlci0xMA=="`) or integer (such as `4`) # input value will be accepted as an ID. # # @return [String] required :id, String # @!attribute content_type # The MIME type of the uploaded file (e.g., image/jpeg, video/mp4, audio/mpeg). # # @return [String, nil] required :content_type, String, nil?: true # @!attribute filename # The original filename of the uploaded attachment, including its file extension. # # @return [String, nil] required :filename, String, nil?: true # @!attribute url # A pre-optimized URL for rendering this attachment on the client. This should be # used for displaying attachments in 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] Represents a unique identifier that is Base64 obfuscated. It is often used to re # # @param content_type [String, nil] The MIME type of the uploaded file (e.g., image/jpeg, video/mp4, audio/mpeg). # # @param filename [String, nil] The original filename of the uploaded attachment, including its file extension. # # @param url [String, nil] A pre-optimized URL for rendering this attachment on the client. This should be end class Option < WhopSDK::Internal::Type::BaseModel # @!attribute id # The unique identifier for 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 unique identifier for 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)
156 |
# File 'lib/whop_sdk/models/lesson.rb', line 156 required :correct_answer, String, nil?: true |
#created_at ⇒ Time
The datetime the assessment question was created.
162 |
# File 'lib/whop_sdk/models/lesson.rb', line 162 required :created_at, Time |
#id ⇒ String
The unique identifier for the assessment question.
149 |
# File 'lib/whop_sdk/models/lesson.rb', line 149 required :id, String |
#image ⇒ WhopSDK::Models::Lesson::AssessmentQuestion::Image?
Optional image attachment for the question
168 |
# File 'lib/whop_sdk/models/lesson.rb', line 168 required :image, -> { WhopSDK::Lesson::AssessmentQuestion::Image }, nil?: true |
#options ⇒ Array<WhopSDK::Models::Lesson::AssessmentQuestion::Option>
The answer options for multiple choice/select questions
174 |
# File 'lib/whop_sdk/models/lesson.rb', line 174 required :options, -> { WhopSDK::Internal::Type::ArrayOf[WhopSDK::Lesson::AssessmentQuestion::Option] } |
#order ⇒ Integer
The order of the question within its lesson
180 |
# File 'lib/whop_sdk/models/lesson.rb', line 180 required :order, Integer |
#question_text ⇒ String
The text of the question
186 |
# File 'lib/whop_sdk/models/lesson.rb', line 186 required :question_text, String |
#question_type ⇒ Symbol, WhopSDK::Models::AssessmentQuestionTypes
The type of the question
192 |
# File 'lib/whop_sdk/models/lesson.rb', line 192 required :question_type, enum: -> { WhopSDK::AssessmentQuestionTypes } |