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

SCORM auto update everyday not working

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.9.7
    • Fix Version/s: 1.9.10
    • Component/s: SCORM
    • Labels:
      None
    • Environment:
      All
    • Database:
      Any
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE

      Description

      The SCORM module offers an option "Auto-update frequency" in at both global activity and instance settings. This should refresh the contents of a scorm package if the uploaded ZIP has changed.

      I found 2 issues with this feature:

      1. The function scorm_get_updatefreq_array(), called when rendering the settings forms, is not returning the correct values. So, the value saved to the DB when this setting is changed does not correspond to the constants defined at the top of locallib.php (UPDATE_EVERYDAY, UPDATE_EVERYTIME).
      Attached patch mod_scorm_locallib.php.patch resolves this.
      N.B. I have left the update onchanges option commented out as it does not seem to be supported yet as far as I can tell.

      2. The scorm cron to run the updates will never run.
      mod/scorm/lib.php:~408 has a check which I believe is supposed to let the scorm update run once daily after midnight. The code generates a very large value for $updatetime causing the equation to always result in false. (unless it's the first run when scorm_updatetimelast is 0 ).
      Attached mod_scorm_lib.php.patch resolves this.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  25/Oct/10