Skip to content

Clear cache after changing wwwroot#68

Merged
bluetom merged 2 commits into
mainfrom
fix/qrcode-clear-cache
Jun 29, 2026
Merged

Clear cache after changing wwwroot#68
bluetom merged 2 commits into
mainfrom
fix/qrcode-clear-cache

Conversation

@lenaherf

@lenaherf lenaherf commented Jun 24, 2026

Copy link
Copy Markdown

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 an issue where QR codes were not updated after changing the custom wwwroot setting.

Before this change, Moodle could keep using old cached QR code images, so the QR codes still pointed to the previous URL. This was not how it should be because the setting had changed, but the generated QR codes did not. Now, when the custom wwwroot setting is changed, the QR code cache is cleared. The next time a QR code is shown, it is generated again with the new URL.


📋 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.

🔍 Related Issues

  • Related to #66

🧾📸🌐 Additional Information (like screenshots, documentation, links, etc.)

Any other relevant information.


@lenaherf lenaherf marked this pull request as ready for review June 24, 2026 14:40
@dlmsr dlmsr linked an issue Jun 25, 2026 that may be closed by this pull request
@bluetom bluetom merged commit c839a4f into main Jun 29, 2026
12 checks passed
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.

Cached state does not change when changing the custom wwwroot

2 participants