Skip to content

Conversation

@mikeJKU
Copy link
Contributor

@mikeJKU mikeJKU commented Jan 19, 2026

🔀 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:

  • Step deletes backups from database and file system.
  • Step has one setting: "Delete all backups that are older than x days". You can also set it to -1, which will automatically delete ALL backups.
  • Output in scheduled task logs: Record id: {recordid} (deleted: 0, 1 or -1), file: {full path to backup file} (deleted: 0 or 1)
    Explanation: 1 = successfully deleted; 0 = could not be deleted; -1 = DB: Entry was not deleted, because backup file could not be deleted, Backup file: Should not happen unless an error occurs in the plugin

📋 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


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

Screenshot of scheduled task log of step deletebackup:
step_deletebackup_scheduled_task_log


* Step deletes backups from database and file system.
* Step has one setting: "Delete all backups that are older than x days". You can also set it to -1, which will automatically delete ALL backups.
* Output in scheduled task logs: Record id: {recordid} (deleted: 0, 1 or -1), file: {full path to backup file} (deleted: 0 or 1)
-> 1 = successfully deleted; 0 = could not be deleted; -1 = DB: Entry was not deleted, because backup file could not be deleted, Backup file: Should not happen unless an error occurs in the plugin
@bluetom bluetom merged commit 2b78b46 into learnweb:main Jan 22, 2026
18 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.

2 participants