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

SCORM - PHP notice during execution of cron.php - undefined $scorm_updatetime

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 1.9.5
    • Component/s: SCORM
    • Labels:
      None
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE

      Description

      I happened across the following notice when executing cron:

      Notice: Undefined property: stdClass::$scorm_updatetime in /home/arborrow/Moodle/code/cvshead/mod/scorm/lib.php on line <i>422

      Peace - Anthony

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            danmarsden Dan Marsden added a comment -

            Thanks Anthony,

            I think it's probably a typo and should be scorm_updatetimelast

            although, there's also some weird old code in locallib.php outside a function that also uses the same name... Piers have you seen this before?

            $stdoptions = '';
            foreach (scorm_get_popup_options_array() as $popupopt => $value) {
            $stdoptions .= $popupopt.'='.$value;
            if ($popupopt != 'status')

            { $stdoptions .= ','; }

            }

            if (!isset($CFG->scorm_updatetime)) {
            set_config('scorm_updatetime','2');
            }

            if (!isset($CFG->scorm_advancedsettings)) {
            set_config('scorm_advancedsettings','0');
            }

            if (!isset($CFG->scorm_windowsettings)) {
            set_config('scorm_windowsettings','0');
            }

            Show
            danmarsden Dan Marsden added a comment - Thanks Anthony, I think it's probably a typo and should be scorm_updatetimelast although, there's also some weird old code in locallib.php outside a function that also uses the same name... Piers have you seen this before? $stdoptions = ''; foreach (scorm_get_popup_options_array() as $popupopt => $value) { $stdoptions .= $popupopt.'='.$value; if ($popupopt != 'status') { $stdoptions .= ','; } } if (!isset($CFG->scorm_updatetime)) { set_config('scorm_updatetime','2'); } if (!isset($CFG->scorm_advancedsettings)) { set_config('scorm_advancedsettings','0'); } if (!isset($CFG->scorm_windowsettings)) { set_config('scorm_windowsettings','0'); }
            Hide
            piers Piers Harding added a comment -

            It looks like it was renamed at some stage. I've set it to updatetimelast and commited.

            Cheers.

            Show
            piers Piers Harding added a comment - It looks like it was renamed at some stage. I've set it to updatetimelast and commited. Cheers.
            Hide
            danmarsden Dan Marsden added a comment -

            looks like someone "tried" to fix this typo by adding the line in this diff:
            http://cvs.moodle.org/moodle/mod/scorm/locallib.php?r1=1.27&r2=1.28

            I've removed the code from locallib.php - will create a new tracker issue to remove that other rubbish from 1.9Stable locallib.php - it's already been removed in HEAD - thanks for the report Anthony!

            Show
            danmarsden Dan Marsden added a comment - looks like someone "tried" to fix this typo by adding the line in this diff: http://cvs.moodle.org/moodle/mod/scorm/locallib.php?r1=1.27&r2=1.28 I've removed the code from locallib.php - will create a new tracker issue to remove that other rubbish from 1.9Stable locallib.php - it's already been removed in HEAD - thanks for the report Anthony!
            Hide
            skodak Petr Skoda added a comment -

            thanks

            Show
            skodak Petr Skoda added a comment - thanks

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  13/May/09