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

SCORM 2004 Data Model Validation

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.9.9
    • Fix Version/s: 1.9.11
    • Component/s: SCORM
    • Labels:
      None
    • Environment:
      Debian Linux, Apache, Moodle 1.9.9
    • Database:
      MySQL
    • Difficulty:
      Moderate
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE

      Description

      During the hand-in phase of our SCORM 2004 3rd Edition content Moodle presents a "not enough choices: cmi.interactions.N6.correct_responses.N0.pattern" JavaScript alert box and then many consequential ones such as error 408 "Data Model Element Collection Set Out Of Order".

      The first alert box appears within Moodle's validation when setting the CMI data model property cmi.interactions.N6.correct_responses.N0.pattern

      This happens with a multiple choice question (4 choices) with a single correct response ("D").

      elementmodel = "cmi.interactions.n.correct_responses.n.pattern"
      element = "cmi.interactions.N6.correct_responses.N0.pattern"
      value = "D";
      interactiontype = "choice"

      The code presenting the error uses the following logic, given that the nodes array in this case represents the possible correct responses of which a single item is sufficient to fulfil the multiple-choice interaction type:

      if (interactiontype == 'choice' && nodes.length == 1) {
      alert('not enough choices: ' + element);
      }

      To replicate, try the attached package on the Moodle demo site or a local instance and proceed to the final page from the combo-box at the bottom. Click the 'Submit' button on the right, agree to Hand-in and await the errors.

      The faulting code resides within /mod/scorm/datamodels/scorm_13.js.php (around line 582)

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

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

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    21/Feb/11