Skip to Content

Development

JS Build

AMD module at amd/src/main.js. Handles create modal form + toast notifications.

# Build via Grunt grunt amd --root=public/local/shortlinks

Build output: amd/build/main.min.js.

CI

GitHub Actions (.github/workflows/moodle-ci.yaml):

  • PHP 8.3 & 8.4, Moodle 502, PostgreSQL 16
  • PHP Lint, PHPMD, PHPCS, PHPDoc
  • Validation, Savepoints, Mustache Lint
  • PHPUnit, Behat

Events

Listen to events like any Moodle plugin:

$observers = [ 'eventname' => '\local_shortlinks\event\link_created', 'callback' => '\myplugin\observer::shortlink_created', ];

Known Gaps

  • local/shortlinks:edit capability defined but no edit UI yet.
  • tag area callback local_shortlinks_get_tagged_links() is a stub.
  • Report builder delete action uses a shim URL because actions don’t support path params yet.