Moodle
  1. Moodle
  2. MDL-5749

Scorm object addition causes Script timeout (with fix.)

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Trivial Trivial
    • Resolution: Fixed
    • Affects Version/s: 1.6
    • Fix Version/s: None
    • Component/s: SCORM
    • Labels:
      None
    • Environment:
      All
    • Affected Branches:
      MOODLE_16_STABLE
    • Rank:
      14864

      Description

      We've got a couple of larger SCORM objects that we have tried to import into Moodle - I notice there are a couple of other people in the scorm forums with similar issues. - we saw the timeout appear in the Scorm_delete_files function around Line 483 in scorm/lib.php

      heres a fix which could be implemented in other areas as well.:

      add the line:

      set_time_limit(10);

      • probably doesn't need to be 10seconds, could probably be decreased a bit - we added it here:function scorm_delete_files($directory) {

      if (is_dir($directory)) {

      $files=scorm_scandir($directory);

      foreach($files as $file) {

      if (($file != '.') && ($file != '..')) {

      if (!is_dir($directory.'/'.$file))

      { unlink($directory.'/'.$file); }

      else

      { scorm_delete_files($directory.'/'.$file); }

      }

      set_time_limit(10);

      }

      rmdir($directory);

      return true;

      }

      return false;

      }

        Activity

        Hide
        Martin Dougiamas added a comment -

        From Dan Marsden (dan at digitalclay.co.nz) Monday, 24 July 2006, 07:53 AM:

        now fixed in HEAD and 1.6_STABLE

        Show
        Martin Dougiamas added a comment - From Dan Marsden (dan at digitalclay.co.nz) Monday, 24 July 2006, 07:53 AM: now fixed in HEAD and 1.6_STABLE

          People

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

            Dates

            • Created:
              Updated:
              Resolved: