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

Quiz uses legacy cron

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.3, 3.7
    • Fix Version/s: 3.7
    • Component/s: Quiz
    • Labels:
    • Testing Instructions:
      Hide

      Check scheduled tasks execute on schedule (every minute)

      1. Run cron repeatedly. The following command will cause it to be run 5 times with a 30 second gap between each:

        for x in `seq 1 5`; do php admin/cli/cron.php; sleep 30; done
        

      2. Login as admin
      3. Navigate to Site administration > Server > Tasks > Task logs
      4. Filter by "Quiz"
        1. Confirm that you see regular attempts to execute each of the following:
          1. "Updating overdue quiz attempts"
          2. "Legacy Cron Quiz Reports"
          3. "Legacy Cron Quiz Access Rules"

      Check scheduled tasks run correct when manually run.

      1. Open a console and run each of the following commands individually
        1. Confirm that all run without issue and do not fail

          php admin/tool/task/cli/scheduled_task.php --execute="\mod_quiz\task\update_overdue_attempts"
          php admin/tool/task/cli/scheduled_task.php --execute="\mod_quiz\task\legacy_quiz_reports_cron"
          php admin/tool/task/cli/scheduled_task.php --execute="\mod_quiz\task\legacy_quiz_accessrules_cron"
          

      Show
      Check scheduled tasks execute on schedule (every minute) Run cron repeatedly. The following command will cause it to be run 5 times with a 30 second gap between each: for x in `seq 1 5`; do php admin/cli/cron.php; sleep 30; done Login as admin Navigate to Site administration > Server > Tasks > Task logs Filter by " Quiz " Confirm that you see regular attempts to execute each of the following: " Updating overdue quiz attempts " " Legacy Cron Quiz Reports " " Legacy Cron Quiz Access Rules " Check scheduled tasks run correct when manually run. Open a console and run each of the following commands individually Confirm that all run without issue and do not fail php admin/tool/task/cli/scheduled_task.php --execute="\mod_quiz\task\update_overdue_attempts" php admin/tool/task/cli/scheduled_task.php --execute="\mod_quiz\task\legacy_quiz_reports_cron" php admin/tool/task/cli/scheduled_task.php --execute="\mod_quiz\task\legacy_quiz_accessrules_cron"
    • Affected Branches:
      MOODLE_33_STABLE, MOODLE_37_STABLE
    • Fixed Branches:
      MOODLE_37_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-60683_cron_to_task

      Description

      quiz module is still using legacy cron task to close open events. This probably should be moved over to the Scheduled Tasks system

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                1 Vote for this issue
                Watchers:
                10 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  20/May/19

                  Time Tracking

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