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

AICC API data storing failure

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • 1.9.8
    • 1.9.5
    • SCORM
    • None
    • MOODLE_19_STABLE
    • MOODLE_19_STABLE
    • Easy

      We've found that AICC API data storing not working at all.

      Error in file /mod/scorm/datamodels/aicc.js.php
      scoid and attempt params aren't passed to http request in function StoreData, so request returns 404 error

      function StoreData(data,storetotaltime) {
      if (storetotaltime) {
      if (cmi.core.lesson_mode == 'normal') {
      if (cmi.core.credit == 'credit') {
      cmi.core.lesson_status = 'completed';
      if (cmi.student_data.mastery_score != '') {
      if (cmi.core.score.raw >= cmi.student_data.mastery_score)

      { cmi.core.lesson_status = 'passed'; }

      else

      { cmi.core.lesson_status = 'failed'; }

      }
      }
      }
      if (cmi.core.lesson_mode == 'browse') {
      if (datamodel['cmi.core.lesson_status'].defaultvalue == '')

      { cmi.core.lesson_status = 'browsed'; }

      }
      datastring = CollectData(data,'cmi');
      datastring += TotalTime();
      } else

      { datastring = CollectData(data,'cmi'); }

      + datastring += '&attempt=<?php echo $attempt ?>';
      + datastring += '&scoid=<?php echo $scoid ?>';

      //popupwin(datastring);
      var myRequest = NewHttpReq();
      result = DoRequest(myRequest,"<?php p($CFG->wwwroot) ?>/mod/scorm/datamodel.php","id=<?php p($id) ?>&sesskey=<?php p($USER->sesskey) ?>"+datastring);

      • results = String(result).split('\n');
        errorCode = results[1];
        return results[0];
        }

      Strings started with "+" should be added
      String started with "*" should be updated

            danmarsden Dan Marsden
            cps CPS User
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

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