Skip to content

Conversation

@TamaroWalter
Copy link
Member

@TamaroWalter TamaroWalter commented Dec 14, 2025

Note: Please fill out all relevant sections and remove irrelevant ones.

🔀 Purpose of this PR:

  • Fixes a bug
  • Updates for a new Moodle version
  • Adds a new feature of functionality
  • Improves or enhances existing features
  • Refactoring: restructures code for better performance or maintainability
  • Testing: add missing or improve existing tests
  • Miscellaneous: code cleaning (without functional changes), documentation, configuration, ...

📝 Description:

This PR fixes all current phpcs errors. The commits are separated for review and can/should be rebased to one "code cleaning" commit before merging.


📋 Checklist

Please confirm the following (check all that apply):

  • I have phpunit and/or behat tests that cover my changes or additions.
  • Code passes the code checker without errors and warnings.
  • Code passes the moodle-ci/cd pipeline on all supported Moodle versions or the ones the plugin supports.
  • Code does not have var_dump() or var_export or any other debugging statements (or commented out code) that
    should not appear on the productive branch.
  • Code only uses language strings instead of hard-coded strings.
  • If there are changes in the database: I updated/created the necessary upgrade steps in db/upgrade.php and
    updated the version.php.
  • If there are changes in javascript: I build new .min files with the grunt amd command.
  • If it is a Moodle update PR: I read the release notes, updated the version.php and the CHANGES.md.
    I ran all tests thoroughly checking for errors. I checked if bootstrap had any changes/deprecations that require
    changes in the plugins UI.

TamaroWalter and others added 12 commits December 12, 2025 14:49
Add missing docblocks and format comments like moodle wants them.
Fix missing or irrelevant moodle internal checks. Replace include with require_once statements
Move the $CFG call from the language file to the lib.php where all other params for the string are build.
Replace deprecated print_error() with throw new moodle_exception()
Reformat lines that are longer than 132 characters by using helper variables or spreading a statement over multiple lines
Replace long strings with plugin language string
This function is particularly long and should be reviewed separatedly due to a higher risk of errors
Another particularly long lines that are separated from other commits for the code review
@TamaroWalter TamaroWalter requested a review from dlmsr December 14, 2025 21:05
@TamaroWalter TamaroWalter force-pushed the misc/codecleaning branch 2 times, most recently from 24ef2ce to c9818b6 Compare December 31, 2025 22:28
@TamaroWalter
Copy link
Member Author

Until this point the code is technically fine. Now the businesslogic fails, which will be fixed in the next commits

The original email body was not suitable for testing
@TamaroWalter TamaroWalter requested review from dlmsr and removed request for dlmsr January 1, 2026 23:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants