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

Admin/Cron.php Broken in Master

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Blocker Blocker
    • 2.2
    • 2.2
    • SCORM
    • MOODLE_22_STABLE
    • MOODLE_22_STABLE
    • MDL-30293-master
    • Hide

      This needs changes in code to force cron to work.

      1. change line 498 on mod/scorm/lib.php to something like

        if ($CFG->scorm_updatetimelast < $updatetime and $timenow > $updatetime) {

        to

        if (1) {

      2. login as admin and go to Site administration settings > Plugins > Activity modules > SCORM package and enable 'Enable IMS package' type
      3. enter http://mymoodle/admin/cron.php manually on the browser
      4. No error should be generated

      Note: it might be necessary to wait for couple of minutes before reloading the cron page.

      Show
      This needs changes in code to force cron to work. change line 498 on mod/scorm/lib.php to something like if ($CFG->scorm_updatetimelast < $updatetime and $timenow > $updatetime) { to if (1) { login as admin and go to Site administration settings > Plugins > Activity modules > SCORM package and enable 'Enable IMS package' type enter http://mymoodle/admin/cron.php manually on the browser No error should be generated Note: it might be necessary to wait for couple of minutes before reloading the cron page.

      admin/cron.php is breaking heavily (not always only when scorm_cron is run)

      Processing module function scorm_cron ...Updating scorm packages which require daily update
      !!! Error writing to database !!!
      !! You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE timemodified &lt; '1321328466'' at line 1
      DELETE FROM mdl_scorm_aicc_session WHERE WHERE timemodified &lt; ?
      [array (
        0 =&gt; 1321328466,
      )] !!
      !! Stack trace: * line 397 of \lib\dml\moodle_database.php: dml_write_exception thrown
      * line 1096 of \lib\dml\mysqli_native_moodle_database.php: call to moodle_database-&gt;query_end()
      * line 513 of \mod\scorm\lib.php: call to mysqli_native_moodle_database-&gt;delete_records_select()
      * line 258 of \lib\cronlib.php: call to scorm_cron()
      * line 85 of \admin\cron.php: call to cron_run()
       !!

      I traced it back to line 513 on scorm/lib.php

      $DB->delete_records_select('scorm_aicc_session', 'WHERE timemodified < ?', array($expiretime));

      Looks like a regression cause by the aicc changes this week.
      Thanks

            ankit_frenz Ankit Agarwal
            ankit_frenz Ankit Agarwal
            Rossiani Wijaya Rossiani Wijaya
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Dan Marsden Dan Marsden
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

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