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

migrate scorm_cron into new tasks API

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.1, 3.2.2, 3.3
    • Fix Version/s: 3.3
    • Component/s: SCORM
    • Labels:
    • Testing Instructions:
      Hide

      Testing Instructions:

      1. Apply the patch.

      On Site:

      1. update scorm plugin.

      2. Goto: site administration > server > scheduled tasks.

      3. make sure task is present and runs without error.

      Script:

      Goto: admin/tool/task/cli/

      Run: php schedule_task.php --list

      • Make sure "\mod_scorm\task\cron_task */5 * * * * * ASAP" appears in the output list

      Run: php schedule_task.php --execute=\\mod_scorm\\task
      cron_task

      • Make sure it runs without errors

      Goto: admin/cli.

      Run: php cron.php (attached the output file output.txt)

      • Make sure the task is not run under legacy cron but by Scheduled Task API.
      Show
      Testing Instructions : 1. Apply the patch. On Site: 1. update scorm plugin. 2. Goto: site administration > server > scheduled tasks . 3. make sure task is present and runs without error. Script: Goto: admin/tool/task/cli/ Run: php schedule_task.php --list Make sure "\mod_scorm\task\cron_task */5 * * * * * ASAP" appears in the output list Run: php schedule_task.php --execute=\\mod_scorm\\task cron_task Make sure it runs without errors Goto: admin/cli. Run: php cron.php (attached the output file output.txt) Make sure the task is not run under legacy cron but by Scheduled Task API.
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_31_STABLE, MOODLE_32_STABLE, MOODLE_33_STABLE
    • Fixed Branches:
      MOODLE_33_STABLE
    • Pull Master Branch:
      scorm-task

      Description

      There are 2 processes in mod/scorm/lib.php scorm_cron() which should be migrated to use the newer tasks API

      1) Daily Package updates

      2) AICC session table clean-up

      Both should be separate tasks and we shouldn't need to rely on scorm_updatetimelast anymore but rely on the schedule set by the task.

        Attachments

        1. output.png
          output.png
          166 kB
        2. output.txt
          13 kB
        3. Screenshot (24).png
          Screenshot (24).png
          166 kB
        4. Screenshot (25).png
          Screenshot (25).png
          134 kB
        5. testing instructions.txt
          0.6 kB

          Issue Links

            Activity

              People

              Assignee:
              ganitgenius Abhishek kumar
              Reporter:
              danmarsden Dan Marsden
              Peer reviewer:
              Ankit Agarwal
              Integrator:
              Eloy Lafuente (stronk7)
              Tester:
              Mark Nelson
              Participants:
              Component watchers:
              Damyon Wiese, Dan Marsden, Matteo Scaramuccia, Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Sujith Haridasan
              Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                15/May/17