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

When adding a new Scorm object, issues can arise if moddata contains data from a previous install.

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 1.8, 1.9
    • Fix Version/s: 1.8.7, 1.9.3, 2.0
    • Component/s: SCORM
    • Labels:
      None
    • Affected Branches:
      MOODLE_18_STABLE, MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_18_STABLE, MOODLE_19_STABLE, MOODLE_20_STABLE

      Description

      to reproduce - create a new moodle install. create a course and add a scorm object.

      delete the database, and reinstall moodle, create a course and add a scorm object.

      "rename" fails, as it tries to rename to a folder that already exists.

      in function scorm_add_instance() for scorm/lib.php

      before this line is called:
      rename($scorm->dir.$scorm->datadir,$scorm->dir.'/'.$id);

      a check should be made to see if ($scorm->dir.'/'.$id) exists and if so delete it's contents before continuing.

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            danmarsden Dan Marsden added a comment -

            fix now in 1.8stable, 1.9stable and HEAD

            Show
            danmarsden Dan Marsden added a comment - fix now in 1.8stable, 1.9stable and HEAD
            Hide
            piers Piers Harding added a comment -

            code reviewed.

            Show
            piers Piers Harding added a comment - code reviewed.

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  15/Oct/08