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

Scorm 1.2 LMSSetValue no save values if it is equal to default value (initial value at lms init)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major Major
    • 1.9.10
    • 1.9.9
    • SCORM
    • None
    • Any platform
    • MOODLE_19_STABLE
    • MOODLE_19_STABLE
    • Easy

      The problem is lmsetvalue no save value if it's equal to inital/default value. This problem occur when the course save the scorm values (LMSCommit function) some times in the course learning. In scorm run-time enviroment book Version 1.2 there are no restrictions to call lmscommit function some times in the course, then the error you can reproduce with this steps.

      Steps to reproduce the problem with a scorm 1.2 course:

      1.- Init course and recover default values, in lesson_location there are default value 3
      2.- Go to lesson 5.
      3.- LMSSetValue lesson_location 5
      4.- LMSCommit. Then moodle check: if 5 not equals to 3 then save into database lesson_location to 5 else no save, in this case save to DataBase
      5.- Go to lesson 3
      6.- LMSSetValue lesson_location 3
      7.- LMSCommit. Then moodle check: if 3 not equals to 3 then save into database lesson_location to 3 else no save, in this case NO save to DataBase

      In this moments if you leave the course and enter in it anothertwelve, then you will have lesson_location to 3 but the last save value is 5 and it's incorrect because you leave the course in lesson 3.

      This check and problem is in line 544 of mod/scorm/datamodels/scorm_12.js.php

      if (eval('datamodel["'+elementmodel+'"].defaultvalue') != data[property] || eval('typeof(datamodel["'+elementmodel+'"].defaultvalue)') != typeof(data[property]) ) {

      There are some scorm data models must saved forever, as cmi.core.lesson_location, cmi.core.lesson_status, cmi.core.score.raw, cmi.core.score.min, cmi.core.score.max, cmi.core.session_time

            danmarsden Dan Marsden
            damiles David Millán Escrivá (Inactive)
            Nobody Nobody (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:

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