SUI-53: Remove unused MODIFIER_COMPACT constant #113

Merged
johannes.moskaliuk merged 2 commits from dev/jonas/SUI-53 into main 2026-08-06 18:32:50 +00:00

Fixed bug18 by removing the unused MODIFIER_COMPACT constant in classes/output/plugin_page.php. The constant was defined with value 'full' (same as MODIFIER_FULL), appeared to be a copy-paste error, and was never used anywhere in the codebase.

Decision

Removed the unused constant entirely to eliminate dead code. This is the safest approach since:

  • The constant was never referenced in tests or code
  • It was excluded from validation and the match statement
  • It would fail if anyone tried to use it

Testing

  • PHPUnit tests pass for the plugin
  • Codechecker passes for the modified file
  • No behavioral changes - pure dead code removal
Fixed bug18 by removing the unused `MODIFIER_COMPACT` constant in `classes/output/plugin_page.php`. The constant was defined with value `'full'` (same as `MODIFIER_FULL`), appeared to be a copy-paste error, and was never used anywhere in the codebase. ## Decision Removed the unused constant entirely to eliminate dead code. This is the safest approach since: - The constant was never referenced in tests or code - It was excluded from validation and the match statement - It would fail if anyone tried to use it ## Testing - PHPUnit tests pass for the plugin - Codechecker passes for the modified file - No behavioral changes - pure dead code removal
SUI-53: Remove unused MODIFIER_COMPACT constant
Some checks failed
PHPCS quality / PHPCS full scan (push) Has been skipped
Repo-Gates / gates (push) Successful in 20s
PHPCS quality / PHPCS ratchet (push) Successful in 28s
PHPCS quality / PHPCS full scan (pull_request) Has been skipped
Repo-Gates / Notify CI-Fixer (push) Has been skipped
PHPCS quality / Notify CI-Fixer (push) Has been skipped
Repo-Gates / gates (pull_request) Successful in 28s
Repo-Gates / Notify CI-Fixer (pull_request) Has been skipped
Moodle Plugin CI / changes (pull_request) Successful in 28s
PHPCS quality / PHPCS ratchet (pull_request) Successful in 25s
PHPCS quality / Notify CI-Fixer (pull_request) Has been skipped
Moodle Plugin CI / Notify CI-Fixer (pull_request) Has been cancelled
Moodle Plugin CI / tutor-with-quota (MOODLE_502_STABLE) (, local/elediaai_core, tutor-with-quota, MOODLE_502_STABLE, blocks/elediaai_tutor) (pull_request) Has been cancelled
Moodle Plugin CI / learning (MOODLE_502_STABLE) (lernhive, local/elediaai_core mod/aichat, learning, MOODLE_502_STABLE, local/elediaai_selfstudy local/elediaai_strategy local/elediaai_teachertools local/elediaai_tutor_premium blocks/elediaai_path) (pull_request) Has been cancelled
Moodle Plugin CI / tutor (MOODLE_502_STABLE) (, , tutor, MOODLE_502_STABLE, blocks/elediaai_tutor) (pull_request) Has been cancelled
Moodle Plugin CI / authoring (MOODLE_502_STABLE) (, local/elediaai_core, authoring, MOODLE_502_STABLE, local/elediaai_questiongen local/elediaai_coursegen qbank/elediaai_questiongen local/elediaai_h5pauthor qtype/aitext) (pull_request) Has been cancelled
da2335517f
The MODIFIER_COMPACT constant in classes/output/plugin_page.php was defined
with the value 'full' (identical to MODIFIER_FULL), but was never used anywhere
in the codebase. It was also excluded from the validation check and match
statement in the open() method, making it dead code that would fail if anyone
tried to use it.

Decision: Remove the unused constant entirely to eliminate dead code and
prevent future confusion.

- Verified no usages of MODIFIER_COMPACT in the plugin or tests
- PHPUnit and codechecker still pass for plugin_page.php
- No functional changes to existing behavior

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
SUI-53: Update documentation for bug18 fix
Some checks failed
PHPCS quality / PHPCS full scan (push) Has been skipped
Repo-Gates / gates (push) Successful in 19s
PHPCS quality / PHPCS full scan (pull_request) Has been skipped
Repo-Gates / gates (pull_request) Successful in 19s
Repo-Gates / Notify CI-Fixer (push) Has been skipped
Repo-Gates / Notify CI-Fixer (pull_request) Has been skipped
Moodle Plugin CI / changes (pull_request) Successful in 19s
PHPCS quality / PHPCS ratchet (push) Successful in 30s
PHPCS quality / PHPCS ratchet (pull_request) Successful in 27s
PHPCS quality / Notify CI-Fixer (push) Has been skipped
PHPCS quality / Notify CI-Fixer (pull_request) Has been skipped
Moodle Plugin CI / tutor (MOODLE_502_STABLE) (, , tutor, MOODLE_502_STABLE, blocks/elediaai_tutor) (pull_request) Successful in 3m58s
Moodle Plugin CI / authoring (MOODLE_502_STABLE) (, local/elediaai_core, authoring, MOODLE_502_STABLE, local/elediaai_questiongen local/elediaai_coursegen qbank/elediaai_questiongen local/elediaai_h5pauthor qtype/aitext) (pull_request) Successful in 4m12s
Moodle Plugin CI / tutor-with-quota (MOODLE_502_STABLE) (, local/elediaai_core, tutor-with-quota, MOODLE_502_STABLE, blocks/elediaai_tutor) (pull_request) Successful in 7m2s
Moodle Plugin CI / learning (MOODLE_502_STABLE) (lernhive, local/elediaai_core mod/aichat, learning, MOODLE_502_STABLE, local/elediaai_selfstudy local/elediaai_strategy local/elediaai_teachertools local/elediaai_tutor_premium blocks/elediaai_path) (pull_request) Successful in 7m14s
Moodle Plugin CI / Notify CI-Fixer (pull_request) Has been cancelled
24dde8e3b6
Update all documentation references to reflect that MODIFIER_COMPACT (bug18)
has been fixed by removing the unused constant:

- docs/05-quality.md: bug18 status changed to 'fixed' with result paragraph
- docs/00-master.md: Updated line 167 to reflect fix
- docs/04-tasks.md: Updated line 229 to reference the fix
- docs/06-uat.md: Updated line 123 to note the fix as complete

Decision: Removed unused constant entirely (dead code) rather than adding
a new 'compact' format, as the latter would require product requirements that
did not exist.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
johannes.moskaliuk deleted branch dev/jonas/SUI-53 2026-08-06 18:32:50 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
johannes.moskaliuk/eledia.ai!113
No description provided.