Skip to content

Topic types

Generated from Topic::registerContentClass calls in api/packages

A topic’s content is one of these classes, registered by its package with Topic::registerContentClass (package courses). The API identifies a type by its full class name (topicable_type). How to use each one: Content creators; how to add one: New topic type.

Type Package Validation rules Model
InteractiveTopic interactive value: required, integer, exists:interactive_packages,id; version: nullable, integer, min:1; follow_latest: sometimes, boolean; start_step: nullable, string, max:64; end_step: nullable, string, max:64; completion_rule: sometimes, in: . implode(,, array_column(CompletionRule::cases(), value)); pass_score: nullable, integer, between:0,100, required_if:completion_rule,on_score; display: sometimes, in: . implode(,, array_column(DisplayMode::cases(), value)); height: sometimes, integer, between:240,2000; text: nullable, string, max:20000 source
LiaScriptTopic liascript value: required, integer, exists:liascript_documents,id source
LtiLink lti lti_tool_id: required, integer, exists:lti_tools,id; url: nullable, url, max:2048; custom: nullable, array; custom.*: string, max:1024; presentation: nullable, in:iframe,window; score_maximum: nullable, numeric, min:0.01 source
GiftQuiz topic-type-gift value: required, string; max_attempts: nullable, integer, min:1; max_execution_time: nullable, integer, min:1; min_pass_score: nullable, numeric, min:0; counts_to_grade: boolean; weight: integer, min:0, max:100; randomize_order: boolean source
LayoutTopic topic-type-layout document: required, new ValidLayoutDocument(); schema_version: sometimes, in: . self::SCHEMA_VERSION; markdown_fallback: required, string, max:100000 source
Project topic-type-project value: required, string; notify_users: array; counts_to_grade: boolean; weight: integer, min:0, max:100; max_score: nullable, numeric, min:1 source
Audio topic-types value: required, mimes:mp3,ogg; length: sometimes, integer source
Video topic-types value: required, mimes:mp4,ogg,webm,mov; poster: file, image:allow_svg source
Image topic-types value: required, image:allow_svg; width: sometimes, integer; height: sometimes, integer source
RichText topic-types value: required, string source
H5P topic-types value: required, integer, exists:H5PContent,id source
OEmbed topic-types value: required, string source
PDF topic-types value: required, mimes:pdf source
ScormSco topic-types value: required, integer, exists:scorm_sco,id source
Cmi5Au topic-types value: required, integer, exists:cmi5_aus,id source