Skip to content

Package: topic-types

Generated from api/packages/topic-types

Source: api/packages/topic-types · imported version 0.2.53. The sections after the README are extracted from the code on every docs build.

Extending package for courses

This repository stores code for Ulams Content Topic types. At the moment there are the following types:

Those types are used for building headless Course.

This package is installing with package course - See TopicTypes

It’s possible to add any new content type, for example HTML Text.

See Courses readme for tutorial

Run ./vendor/bin/phpunit --filter 'Ulams\\TopicTypes\\Tests' to run tests. See tests folder as it’s quite good staring point as documentation appendix.

Test details codecov phpunit

  • Ulams\TopicTypes\Events\TopicTypeChanged => Event is dispatched when topic type value is changed.

Add topic type to lesson

TopicType

  • Audio
  • Video
  • Image
  • RichText
  • H5P
  • OEmbed
  • PDF
  • ScormSco
  • Cmi5Au

None.

None.

Registered with AdministrableConfig::registerConfig (editable in the admin panel under Configuration → Settings).

None.

Event Description Notification templates
TopicTypeChanged Email

None.

Command Description Signature
ulams:fill-topic-types-metadata Fill the metadata for the specific model ulams:fill-topic-types-metadata {model}
ulams:fix-topic-types-paths Fixes all topic types paths so they are always in courses/{id} folder ulams:fix-topic-types-paths
ulams:fix-type-column-name Fixes Topicable DBs column name from old Ulams\Courses\Models\TopicContent\XXX to Ulams\TopicTypes\Models\TopicContent\XXX ulams:fix-type-column-name

None.

None.