Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-7068 META: SCORM 2004 compliance + issues
  3. MDL-28493

objectiveID in SCORM 2004 packages can be text/string type. Alter Database table prefix_scorm_seq_objective structure

XMLWordPrintable

    • Icon: Sub-task Sub-task
    • Resolution: Fixed
    • Icon: Minor Minor
    • 2.2
    • 2.1
    • SCORM
    • Any
    • MOODLE_21_STABLE
    • MOODLE_22_STABLE
    • master_MDL-28493
    • Hide

      To reproduce this issue follow the steps(with debugging turned on) -
      1. Download the ADL SCORM Test packages CM-02a or CM-02b or CM-03a. You can download them from here - https://github.com/mayankgupta/moodle_scorm_test_harness/tree/master/ADL2004/LMSTestCourseZipPackages
      2. Add these SCORM package as activity inside a course.
      3. Fill in the instructions and save
      4. Check to make sure no debugging messages appear as mention in the description of this issue.

      NOTE: Many other errors are reported by this test package - this patch only addresses the issues mentioned.

      Show
      To reproduce this issue follow the steps(with debugging turned on) - 1. Download the ADL SCORM Test packages CM-02a or CM-02b or CM-03a. You can download them from here - https://github.com/mayankgupta/moodle_scorm_test_harness/tree/master/ADL2004/LMSTestCourseZipPackages 2. Add these SCORM package as activity inside a course. 3. Fill in the instructions and save 4. Check to make sure no debugging messages appear as mention in the description of this issue. NOTE: Many other errors are reported by this test package - this patch only addresses the issues mentioned.

      SCORM 2004 Packages can have objectiveID's as text/string type and not necessary int.
      The ADL SCORM 2004 Test packages have objectiveID as a string value in the imsmanifest.xml file. The objectvieid field in prefix_scorm_seq_objective table has type bigint(10), due to which while adding objectiveid to the scorm_seq_objective table a dml_write_exception is thrown.
      The imsmanifest.xml file for test package CM-02a can be found here - https://github.com/mayankgupta/moodle_scorm_test_harness/blob/master/ADL2004/LMSTestCoursePackageSrc/LMSTestPackage_CM-02a/imsmanifest.xml

      To reproduce this issue follow the steps -
      1. Download the ADL SCORM Test packages CM-02a or CM-02b or CM-03a. You can download them from here - https://github.com/mayankgupta/moodle_scorm_test_harness/tree/master/ADL2004/LMSTestCourseZipPackages
      2. Add these SCORM package as activity inside a course.
      3. Fill in the instructions and save the
      4. You will come across the error - "Error writing to database"
      5. If you have debugging turned on you would get the following debug info

      Debug info: Incorrect integer value: 'obj1' for column 'objectiveid' at row 1
      INSERT INTO mdl_scorm_seq_objective (scoid,primaryobj,objectiveid,minnormalizedmeasure) VALUES(?,?,?,?)
      [array (
      0 => 88,
      1 => 0,
      2 => 'obj1',
      3 => 1,
      )]
      Stack trace:
      line 397 of \lib\dml\moodle_database.php: dml_write_exception thrown
      line 878 of \lib\dml\mysqli_native_moodle_database.php: call to moodle_database->query_end()
      line 920 of \lib\dml\mysqli_native_moodle_database.php: call to mysqli_native_moodle_database->insert_record_raw()
      line 590 of \mod\scorm\datamodels\scormlib.php: call to mysqli_native_moodle_database->insert_record()
      line 238 of \mod\scorm\locallib.php: call to scorm_parse_scorm()
      line 119 of \mod\scorm\lib.php: call to scorm_parse()
      line 410 of \course\modedit.php: call to scorm_add_instance()

            danmarsden Dan Marsden
            mayank_gupta2005 Mayank Gupta
            Sam Hemelryk Sam Hemelryk
            David Mudrák (@mudrd8mz) David Mudrák (@mudrd8mz)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

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