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

SCORM does not write to cmi.interactions properly

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Duplicate
    • 2.0.3
    • None
    • SCORM
    • MOODLE_20_STABLE

    Description

      Basically, a scorm activity with embedded quizzes that writes the results of those quizzes to cmi.interactions_n.xxxx only works properly for cmi.interactions_0. For all higher values cmi.interactions_n.id is written to the database, .type and .result (and others) are missing.

      The debug mode shows that the API is (trying to) correctly set them. An example scorm is attached. And the log is as follows...

      Tue, 24 May 2011 10:54:27 GMT: Moodle SCORM 1.2 API Loaded, Activity: test scorm, SCO: CourseItem01
      Tue, 24 May 2011 10:54:28 GMT: LMSInitialize("", "") => 0
      Tue, 24 May 2011 10:54:28 GMT: LMSGetValue("cmi.core.lesson_status") - incomplete => 0
      Tue, 24 May 2011 10:54:28 GMT: LMSGetValue("cmi.core.lesson_status") - incomplete => 0
      Tue, 24 May 2011 10:54:28 GMT: LMSGetValue("cmi.core.lesson_location") - 0 => 0
      Tue, 24 May 2011 10:54:28 GMT: LMSSetValue("cmi.core.lesson_status", "incomplete") => 0
      Tue, 24 May 2011 10:54:29 GMT: Commit("", "") => 0
      Tue, 24 May 2011 10:54:29 GMT: LMSCommit("AJAXResult", "true") => 0
      Tue, 24 May 2011 10:54:29 GMT: LMSCommit("result", "true") => 0
      Tue, 24 May 2011 10:54:29 GMT: LMSCommit("errorCode", "0") => 0
      Tue, 24 May 2011 10:54:29 GMT: LMSSetValue("cmi.core.lesson_location", "0") => 0
      Tue, 24 May 2011 10:54:29 GMT: Commit("", "") => 0
      Tue, 24 May 2011 10:54:29 GMT: LMSCommit("AJAXResult", "true") => 0
      Tue, 24 May 2011 10:54:29 GMT: LMSCommit("result", "true") => 0
      Tue, 24 May 2011 10:54:29 GMT: LMSCommit("errorCode", "0") => 0
      Tue, 24 May 2011 10:54:52 GMT: LMSSetValue("cmi.core.lesson_location", "1") => 0
      Tue, 24 May 2011 10:54:52 GMT: Commit("", "") => 0
      Tue, 24 May 2011 10:54:52 GMT: LMSCommit("AJAXResult", "true") => 0
      Tue, 24 May 2011 10:54:52 GMT: LMSCommit("result", "true") => 0
      Tue, 24 May 2011 10:54:52 GMT: LMSCommit("errorCode", "0") => 0
      Tue, 24 May 2011 10:55:44 GMT: LMSSetValue("cmi.core.lesson_location", "2") => 0
      Tue, 24 May 2011 10:55:45 GMT: Commit("", "") => 0
      Tue, 24 May 2011 10:55:45 GMT: LMSCommit("AJAXResult", "true") => 0
      Tue, 24 May 2011 10:55:45 GMT: LMSCommit("result", "true") => 0
      Tue, 24 May 2011 10:55:45 GMT: LMSCommit("errorCode", "0") => 0
      Tue, 24 May 2011 10:56:12 GMT: LMSSetValue("cmi.core.lesson_location", "3") => 0
      Tue, 24 May 2011 10:56:14 GMT: Commit("", "") => 0
      Tue, 24 May 2011 10:56:14 GMT: LMSCommit("AJAXResult", "true") => 0
      Tue, 24 May 2011 10:56:14 GMT: LMSCommit("result", "true") => 0
      Tue, 24 May 2011 10:56:14 GMT: LMSCommit("errorCode", "0") => 0
      Tue, 24 May 2011 10:57:19 GMT: LMSSetValue("cmi.core.lesson_location", "4") => 0
      Tue, 24 May 2011 10:57:20 GMT: Commit("", "") => 0
      Tue, 24 May 2011 10:57:20 GMT: LMSCommit("AJAXResult", "true") => 0
      Tue, 24 May 2011 10:57:20 GMT: LMSCommit("result", "true") => 0
      Tue, 24 May 2011 10:57:20 GMT: LMSCommit("errorCode", "0") => 0
      Tue, 24 May 2011 10:58:11 GMT: LMSSetValue("cmi.core.lesson_location", "5") => 0
      Tue, 24 May 2011 10:58:11 GMT: Commit("", "") => 0
      Tue, 24 May 2011 10:58:11 GMT: LMSCommit("AJAXResult", "true") => 0
      Tue, 24 May 2011 10:58:11 GMT: LMSCommit("result", "true") => 0
      Tue, 24 May 2011 10:58:11 GMT: LMSCommit("errorCode", "0") => 0
      Tue, 24 May 2011 10:58:19 GMT: LMSSetValue("cmi.interactions_0.id", "Q4") => 0
      Tue, 24 May 2011 10:58:19 GMT: LMSSetValue("cmi.interactions_0.type", "choice") => 0
      Tue, 24 May 2011 10:58:19 GMT: LMSSetValue("cmi.interactions_0.result", "wrong") => 0
      Tue, 24 May 2011 10:58:20 GMT: Commit("", "") => 0
      Tue, 24 May 2011 10:58:20 GMT: LMSCommit("AJAXResult", "true") => 0
      Tue, 24 May 2011 10:58:20 GMT: LMSCommit("result", "true") => 0
      Tue, 24 May 2011 10:58:20 GMT: LMSCommit("errorCode", "0") => 0
      Tue, 24 May 2011 10:58:33 GMT: LMSSetValue("cmi.interactions_1.id", "Q2") => 0
      Tue, 24 May 2011 10:58:33 GMT: LMSSetValue("cmi.interactions_1.type", "choice") => 0
      Tue, 24 May 2011 10:58:33 GMT: LMSSetValue("cmi.interactions_1.result", "correct") => 0
      Tue, 24 May 2011 10:58:33 GMT: Commit("", "") => 0
      Tue, 24 May 2011 10:58:33 GMT: LMSCommit("AJAXResult", "true") => 0
      Tue, 24 May 2011 10:58:33 GMT: LMSCommit("result", "true") => 0
      Tue, 24 May 2011 10:58:33 GMT: LMSCommit("errorCode", "0") => 0
      Tue, 24 May 2011 10:58:37 GMT: LMSSetValue("cmi.interactions_2.id", "Q3") => 0
      Tue, 24 May 2011 10:58:37 GMT: LMSSetValue("cmi.interactions_2.type", "choice") => 0
      Tue, 24 May 2011 10:58:37 GMT: LMSSetValue("cmi.interactions_2.result", "correct") => 0
      Tue, 24 May 2011 10:58:38 GMT: Commit("", "") => 0
      Tue, 24 May 2011 10:58:38 GMT: LMSCommit("AJAXResult", "true") => 0
      Tue, 24 May 2011 10:58:38 GMT: LMSCommit("result", "true") => 0
      Tue, 24 May 2011 10:58:38 GMT: LMSCommit("errorCode", "0") => 0
      Tue, 24 May 2011 10:58:44 GMT: LMSSetValue("cmi.interactions_3.id", "Q5") => 0
      Tue, 24 May 2011 10:58:44 GMT: LMSSetValue("cmi.interactions_3.type", "choice") => 0
      Tue, 24 May 2011 10:58:44 GMT: LMSSetValue("cmi.interactions_3.result", "correct") => 0
      Tue, 24 May 2011 10:58:44 GMT: Commit("", "") => 0
      Tue, 24 May 2011 10:58:44 GMT: LMSCommit("AJAXResult", "true") => 0
      Tue, 24 May 2011 10:58:44 GMT: LMSCommit("result", "true") => 0
      Tue, 24 May 2011 10:58:44 GMT: LMSCommit("errorCode", "0") => 0
      Tue, 24 May 2011 10:58:50 GMT: LMSSetValue("cmi.interactions_4.id", "Q1") => 0
      Tue, 24 May 2011 10:58:51 GMT: LMSSetValue("cmi.interactions_4.type", "choice") => 0
      Tue, 24 May 2011 10:58:51 GMT: LMSSetValue("cmi.interactions_4.result", "correct") => 0
      Tue, 24 May 2011 10:58:52 GMT: Commit("", "") => 0
      Tue, 24 May 2011 10:58:52 GMT: LMSCommit("AJAXResult", "true") => 0
      Tue, 24 May 2011 10:58:52 GMT: LMSCommit("result", "true") => 0
      Tue, 24 May 2011 10:58:52 GMT: LMSCommit("errorCode", "0") => 0
      Tue, 24 May 2011 10:58:52 GMT: LMSSetValue("cmi.core.score.min", "0") => 0
      Tue, 24 May 2011 10:58:53 GMT: Commit("", "") => 0
      Tue, 24 May 2011 10:58:53 GMT: LMSCommit("AJAXResult", "true") => 0
      Tue, 24 May 2011 10:58:53 GMT: LMSCommit("result", "true") => 0
      Tue, 24 May 2011 10:58:53 GMT: LMSCommit("errorCode", "0") => 0
      Tue, 24 May 2011 10:58:53 GMT: LMSSetValue("cmi.core.score.max", "100") => 0
      Tue, 24 May 2011 10:58:53 GMT: Commit("", "") => 0
      Tue, 24 May 2011 10:58:53 GMT: LMSCommit("AJAXResult", "true") => 0
      Tue, 24 May 2011 10:58:53 GMT: LMSCommit("result", "true") => 0
      Tue, 24 May 2011 10:58:53 GMT: LMSCommit("errorCode", "0") => 0
      Tue, 24 May 2011 10:58:53 GMT: LMSSetValue("cmi.core.score.raw", "80") => 0
      Tue, 24 May 2011 10:58:54 GMT: Commit("", "") => 0
      Tue, 24 May 2011 10:58:54 GMT: LMSCommit("AJAXResult", "true") => 0
      Tue, 24 May 2011 10:58:54 GMT: LMSCommit("result", "true") => 0
      Tue, 24 May 2011 10:58:54 GMT: LMSCommit("errorCode", "0") => 0
      Tue, 24 May 2011 10:58:54 GMT: LMSSetValue("cmi.core.lesson_status", "passed") => 0
      Tue, 24 May 2011 10:58:54 GMT: Commit("", "") => 0
      Tue, 24 May 2011 10:58:54 GMT: LMSCommit("AJAXResult", "true") => 0
      Tue, 24 May 2011 10:58:54 GMT: LMSCommit("result", "true") => 0
      Tue, 24 May 2011 10:58:54 GMT: LMSCommit("errorCode", "0") => 0
      Tue, 24 May 2011 10:58:54 GMT: LMSSetValue("cmi.core.exit", "logout") => 0
      Tue, 24 May 2011 10:58:55 GMT: LMSFinish("AJAXResult", "true") => 0
      Tue, 24 May 2011 10:58:55 GMT: LMSFinish("result", "true") => 0
      Tue, 24 May 2011 10:58:55 GMT: LMSFinish("", "") => 0

      DB Table

      -----------------------------------------------------------------------------+

      id userid scormid scoid attempt element value timemodified

      -----------------------------------------------------------------------------+

      1 3 1 2 1 x.start.time 1306231276 1306231276
      2 3 1 2 1 cmi.core.lesson_status passed 1306234734
      3 3 1 2 1 cmi.core.lesson_location 5 1306234691
      4 3 1 2 1 cmi.interactions_0.id Q4 1306234735
      5 3 1 2 1 cmi.interactions_0.type choice 1306234700
      6 3 1 2 1 cmi.interactions_0.result wrong 1306234735
      7 3 1 2 1 cmi.interactions_1.id Q2 1306234735
      8 3 1 2 1 cmi.interactions_1.result correct 1306234735
      9 3 1 2 1 cmi.interactions_2.id Q3 1306234735
      10 3 1 2 1 cmi.interactions_3.id Q5 1306234735
      11 3 1 2 1 cmi.interactions_4.id Q1 1306234735
      12 3 1 2 1 cmi.core.score.min 0 1306234733
      13 3 1 2 1 cmi.core.score.max 100 1306234733
      14 3 1 2 1 cmi.core.score.raw 80 1306234734
      15 3 1 2 1 cmi.core.exit logout 1306234735
      16 3 1 2 1 cmi.core.total_time 00:00:00.00 1306234735

      -----------------------------------------------------------------------------+

      Attachments

        Issue Links

          Activity

            People

              danmarsden Dan Marsden
              howardsmiller Howard Miller
              Dan Marsden, Matteo Scaramuccia, Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Sujith Haridasan
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: