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

minnormalizedmeasure can be a negative floating-point value. Alter database table scorm_seq_objective structure

    XMLWordPrintable

Details

    • Sub-task
    • Status: Closed
    • Minor
    • Resolution: Won't Fix
    • 2.1
    • None
    • SCORM
    • Any
    • MOODLE_21_STABLE
    • master_MDL-28707
    • Hide

      To reproduce this issue follow the steps -
      1. Download the ADL SCORM Test package DMB. You can download them from here - https://github.com/mayankgupta/moodle_scorm_test_harness/tree/master/ADL2004/LMSTestCourseZipPackages
      2. Add the SCORM package as activity inside a course.
      3. Fill in the instructions and save.
      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: Out of range value for column 'minnormalizedmeasure' at row 1
      INSERT INTO mdl_scorm_seq_objective (scoid,primaryobj,objectiveid,minnormalizedmeasure) VALUES(?,?,?,?)
      [array (
      0 => 17,
      1 => 1,
      2 => 'SEQSUCCESSSTATUSOVERRIDE01',
      3 => '-0.5',
      )]
      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 120 of \mod\scorm\lib.php: call to scorm_parse()
      line 410 of \course\modedit.php: call to scorm_add_instance()

      Show
      To reproduce this issue follow the steps - 1. Download the ADL SCORM Test package DMB. You can download them from here - https://github.com/mayankgupta/moodle_scorm_test_harness/tree/master/ADL2004/LMSTestCourseZipPackages 2. Add the SCORM package as activity inside a course. 3. Fill in the instructions and save. 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: Out of range value for column 'minnormalizedmeasure' at row 1 INSERT INTO mdl_scorm_seq_objective (scoid,primaryobj,objectiveid,minnormalizedmeasure) VALUES(?,?,?,?) [array ( 0 => 17, 1 => 1, 2 => 'SEQSUCCESSSTATUSOVERRIDE01', 3 => '-0.5', )] 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 120 of \mod\scorm\lib.php: call to scorm_parse() line 410 of \course\modedit.php: call to scorm_add_instance()

    Description

      In SCORM 2004 Packages minNormalizedMeasure can be a negative floating point number and is not always a positive value.
      ADL SCORM 2004 Test package DMB has minNormalizedMeasure value -0.5 in the imsmanifest.xml file. The minnormalizedmeasure field in scorm_seq_objective table has attribute - UNSIGNED, due to which while adding minnormalizedmeasure value to the scorm_seq_objective table a dml_write_exception is thrown.
      The imsmanifest.xml file for test package DMB can be found here - imsmanifest.xml

      Attachments

        Activity

          People

            danmarsden Dan Marsden
            mayank_gupta2005 Mayank Gupta
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Dan Marsden, Matteo Scaramuccia, Ilya Tregubov, Kevin Percy, Mathew May, Mihail Geshoski, Shamim Rezaie
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: