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

moodle_exception can't be caught in course_backup_task class by missing courseid

XMLWordPrintable

    • MOODLE_310_STABLE, MOODLE_311_STABLE, MOODLE_39_STABLE, MOODLE_400_STABLE
    • MOODLE_310_STABLE, MOODLE_39_STABLE
    • MDL-71136_master
    • Hide

      1. Create "MDL-71136" course.

      2. Set Automated backup to manual:

      php admin/cli/cfg.php --component=backup --name=backup_auto_active --set=2

      3. Set the schedule:

      php admin/cli/cfg.php --component=backup --name=backup_auto_weekdays --set='1111111'

      4. Set execute time:

      php admin/cli/cfg.php --component=backup --name=backup_auto_hour --set=1

      5. Generate mdl_backup_courses records:

      php admin/cli/automated_backups.php

      6. Update nextstarttime:
      Postgres:

      update mdl_backup_courses set nextstarttime = round(extract(epoch from now()));

      MySQL:

      update mdl_backup_courses set nextstarttime = UNIX_TIMESTAMP();

      7. Generate ad-hoc task:

      php admin/cli/automated_backups.php

      8. Confirm, that ad-hoc task was created:

      select classname, nextruntime, faildelay, customdata from mdl_task_adhoc where classname = '\core\task\course_backup_task';

      9. Delete the course "MDL-71136":

      10. Run cron:

      php admin/cli/cron.php

      8. Confirm, that cron log has correct exception and looks like:

      Scheduled task complete: Background processing for scheduled allocation (workshopallocation_scheduled\task\cron_task)
      Execute adhoc task: core\task\course_backup_task
      ... started 03:26:52. Current memory use 42.5MB.
      Invalid course id: 3, task aborted.
      ... used 1 dbqueries
      ... used 0.00081300735473633 seconds
      Adhoc task complete: core\task\course_backup_task
      

       

      9. Run SQL:

      select classname, nextruntime, faildelay, customdata from mdl_task_adhoc where classname = '\core\task\course_backup_task';

      10. Confirm, that ad-hoc task has been finished (so the previous query return no rows).

       

      Show
      1. Create " MDL-71136 " course. 2. Set Automated backup to manual: php admin/cli/cfg.php --component=backup --name=backup_auto_active --set= 2 3. Set the schedule: php admin/cli/cfg.php --component=backup --name=backup_auto_weekdays --set= '1111111' 4. Set execute time: php admin/cli/cfg.php --component=backup --name=backup_auto_hour --set= 1 5. Generate mdl_backup_courses records: php admin/cli/automated_backups.php 6. Update nextstarttime: Postgres: update mdl_backup_courses set nextstarttime = round(extract(epoch from now())); MySQL: update mdl_backup_courses set nextstarttime = UNIX_TIMESTAMP(); 7. Generate ad-hoc task: php admin/cli/automated_backups.php 8. Confirm , that ad-hoc task was created: select classname, nextruntime, faildelay, customdata from mdl_task_adhoc where classname = '\core\task\course_backup_task' ; 9. Delete the course " MDL-71136 ": 10. Run cron: php admin/cli/cron.php 8. Confirm , that cron log has correct exception and looks like: Scheduled task complete: Background processing for scheduled allocation (workshopallocation_scheduled\task\cron_task) Execute adhoc task: core\task\course_backup_task ... started 03 : 26 : 52 . Current memory use 42 .5MB. Invalid course id: 3 , task aborted. ... used 1 dbqueries ... used 0.00081300735473633 seconds Adhoc task complete: core\task\course_backup_task   9. Run SQL: select classname, nextruntime, faildelay, customdata from mdl_task_adhoc where classname = '\core\task\course_backup_task' ; 10. Confirm , that ad-hoc task has been finished (so the previous query return no rows).  

      In the MDL-67502, the bug was fixed for missing 'backup_courses',

      But the bug is still appeared when 'course' is missing.

            tomotsuyuki Tomo Tsuyuki
            tomotsuyuki Tomo Tsuyuki
            Misha Golenkov Misha Golenkov
            Sara Arjona (@sarjona) Sara Arjona (@sarjona)
            Gladys Basiana Gladys Basiana
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

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

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