Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-81516

Course category filter for automated course backups

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • Future Dev, 4.5
    • Backup
    • MOODLE_405_STABLE
    • Hide

      Run unit tests backup/tests/automated_backup_test.php, especially test case test_backup_course_in_categories.

      For manual testing:

      1. Log in as admin
      2. create 3 categories called 'semester 1' and 'semester 2' and 'semester 3'
      3. Create 3 courses assign one to each of your new categories.
      4. Go to Site admin -> courses -> Backups -> Automated backup setup
      5. Set 'Active' to 'Enabled'
      6. Set any day on the 'Schedule' checkbox area and any time for 'Execute at'
      7. CONFIRM there is a new setting called 'Backup courses in this category only'
      8. Choose the 'semester 1' and  'semester 2' categories
      9. Save changes.
      10. Manually run the scheduled task in CLI with

        php admin/cli/scheduled_task.php --execute=\\core\\task\\automated_backup_task

      11. Go to Site admin -> Reports -> Backups
      12. CONFIRM you can see course that belong to 'semester 1' and 'semester 2' in the list.
      Show
      Run unit tests backup/tests/automated_backup_test.php, especially test case test_backup_course_in_categories. For manual testing: Log in as admin create 3 categories called 'semester 1' and 'semester 2' and 'semester 3' Create 3 courses assign one to each of your new categories. Go to Site admin -> courses -> Backups -> Automated backup setup Set 'Active' to 'Enabled' Set any day on the 'Schedule' checkbox area and any time for 'Execute at' CONFIRM there is a new setting called 'Backup courses in this category only' Choose the 'semester 1' and  'semester 2' categories Save changes. Manually run the scheduled task in CLI with php admin/cli/scheduled_task.php --execute=\\core\\task\\automated_backup_task Go to Site admin -> Reports -> Backups CONFIRM you can see course that belong to 'semester 1' and 'semester 2' in the list.
    • Hide

      Code verified against automated checks with warnings.

      Checked MDL-81516 using repository: https://github.com/jojoob/moodle.git

      Should these errors be fixed?

      Built on: Mon Feb 17 11:08:38 AM UTC 2025

      Show
      Code verified against automated checks with warnings. Checked MDL-81516 using repository: https://github.com/jojoob/moodle.git main (0 errors / 3 warnings) [branch: MDL-81516 | CI Job ] overview (0/0) , phplint (0/0) , phpcs (0/2) , js (0/0) , css (0/0) , phpdoc (0/0) , commit (0/1) , savepoint (0/0) , thirdparty (0/0) , externalbackup (0/0) , grunt (0/0) , shifter (0/0) , mustache (0/0) , gherkin (0/0) , Should these errors be fixed? Built on: Mon Feb 17 11:08:38 AM UTC 2025
    • Show
      Launching automatic jobs for branch MDL-81516 https://ci.moodle.org/view/Testing/job/DEV.02%20-%20Developer-requested%20PHPUnit/17210/ PHPUnit (sqlsrv) https://ci.moodle.org/view/Testing/job/DEV.01%20-%20Developer-requested%20Behat/58609/ Behat (NonJS - boost and classic) https://ci.moodle.org/view/Testing/job/DEV.01%20-%20Developer-requested%20Behat/58610/ Behat (Firefox - boost) https://ci.moodle.org/view/Testing/job/DEV.01%20-%20Developer-requested%20Behat/58611/ Behat (Firefox - classic) https://ci.moodle.org/view/Testing/job/DEV.01%20-%20Developer-requested%20Behat/58612/ App tests (stable app version) --> unrelated, reported to apps team. Built on: Fri Nov 1 04:30:13 AM UTC 2024

      We developed an improvement at our university for the automated course backups to make course categories selective.

      This is handy for example if you have one category for each semester and do only need to backup one semester. In this case the selection by course category is more explicit than relying on backup_auto_skip_modif_days.

      This has been suggested in MDL-20802 over 10 years ago.

        1. MDL-81516_categories.png
          19 kB
          Sara Arjona (@sarjona)
        2. MDL-81516_setting.png
          23 kB
          Sara Arjona (@sarjona)
        3. Screenshot 2025-01-16 at 10.27.04.png
          28 kB
          Julia Verdaguer
        4. Screenshot From 2025-02-13 12-05-12.png
          75 kB
          Johannes Burk

            jojoob Johannes Burk
            jojoob Johannes Burk
            David Woloszyn David Woloszyn
            Votes:
            8 Vote for this issue
            Watchers:
            13 Start watching this issue

              Created:
              Updated:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 hour, 9 minutes
                1h 9m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.