This files describes API changes for the qbank_tagassistant plugin.

=== v3.0.1 (Build: 2026080801) ===

* Fixed hardcoded user-facing text in the AMD module: the expansion button
  label was written literally as '+ N weitere' (German) and the chip
  aria-label literally in English, regardless of site language. Both now use
  `core/str` with the `moretags` and `addtagaria` strings that already
  existed in the language packs but were never referenced. The
  `qbank_tagassistant/tag_chips` module therefore depends on `core/str`
  again. No API or database changes; a cache purge is enough.

=== v3.0.0 (Build: 2026080800) ===

* CRITICAL FIX: the PSR-14 hook registration named a hook class that does not
  exist in Moodle core. `db/hooks.php` registered
  `\core\hook\output\before_standard_html_head`; the real hook is
  `\core\hook\output\before_standard_head_html_generation`. In v1.x/v2.x this
  went unnoticed because the tag chips were in fact rendered by the
  *deprecated* `qbank_tagassistant_before_standard_html_head()` callback in
  `lib.php`, which core still invoked (core only suppresses a deprecated
  callback once the component registers a listener for the replacing hook,
  see `\core\hook\manager::is_deprecating_hook_present()`). So v2.x worked,
  but never through the hooks-only architecture it claimed.
  This release registers the correct hook, so the plugin now genuinely runs
  on PSR-14 hooks. The listener moved to
  `classes/hook/before_standard_head_html_generation_listener.php` with a
  matching class name, per Moodle's filename-must-match-classname
  autoloading rule. No action is required from site admins beyond the normal
  upgrade + cache purge, and there is no double-render risk: core suppresses
  the deprecated callback automatically now that the hook is registered.
* Pagetype matching fixed: `mod_quiz-edit` corrected to `mod-quiz-edit`, and
  `question-edit` (the pagetype Moodle derives for `/question/edit.php`)
  added to the whitelist.
* BREAKING: Minimum supported Moodle version is now 5.1 (branch requirement
  raised from 2024100700 to 2025100605). Moodle 4.5 and 5.0 are no longer
  supported.
* The legacy `lib.php` callback fallback for `before_standard_html_head` has
  been removed. The plugin now relies exclusively on the PSR-14 hook
  registered in `db/hooks.php`, which is guaranteed to be available on the
  new 5.1+ minimum.
* The `context_tags` application cache is now invalidated automatically via
  event observers (`db/events.php`, `classes/observer.php`) on
  `\core\event\question_created`, `\core\event\question_updated`, and
  `\core\event\question_deleted`, instead of relying solely on a 1-hour TTL.
  The TTL is now 300 seconds and serves only as a fallback safety net.
* The cache key structure changed from one entry per (context, limit) pair
  to a single entry per context (sliced to the requested limit in PHP). Any
  previously cached entries in the old key format are purged automatically
  during upgrade; no admin action is required.
* Fixed: `helper::purge_context_tags_cache()` could orphan cache entries for
  any `$limit` value other than 10, 15, or 20. This is no longer possible
  now that there is one cache entry per context.
* `amd/build/tag_chips.min.js` is now a genuinely minified build artifact
  (previously an unminified verbatim copy of the source). See
  `package.json` / `npm run build:amd` to regenerate it.
* The AMD module `qbank_tagassistant/tag_chips` no longer depends on jQuery
  and no longer imports the unused `core/str`.
* Fixed a memory-accumulation issue where every opened question-edit modal
  left behind a permanent, never-disconnected `MutationObserver`.
