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

AICC - Mastery_Score, Max_Time_Allowed and Time_Limit_Action not correctly returned to courses

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.8.5
    • Fix Version/s: 2.0
    • Component/s: SCORM
    • Labels:
      None
    • Environment:
      Moodle 1.8.5, XAMPP 1.6.6, Windows
    • Database:
      MySQL
    • Affected Branches:
      MOODLE_18_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE

      Description

      The mod/scorm/AICC.PHP pages and mod/scorm/datamodels/aicc.js.php are not correctly returning from the LMS the values fro mastery_score, max_time_allowed and time_limit_action.

      The issue is because in the code the object element references are wrong, for example in aicc.php:

      //Martin Holden, SkillSoft
      //Corrected references to masteryscore, should be mastery_score
      //Corrected references to maxtimeallowed, should be max_time_allowed
      //Corrected references to timelimitaction, should be time_limit_action
      //22nd April 2008
      //
      //$userdata->masteryscore = isset($sco->masteryscore)?$sco->masteryscore:'';
      //$userdata->maxtimeallowed = isset($sco->maxtimeallowed)?$sco->maxtimeallowed:'';
      //$userdata->timelimitaction = isset($sco->timelimitaction)?$sco->timelimitaction:'';
      $userdata->mastery_score = isset($sco->mastery_score)?$sco->mastery_score:'';
      $userdata->max_time_allowed = isset($sco->max_time_allowed)?$sco->max_time_allowed:'';
      $userdata->time_limit_action = isset($sco->time_limit_action)?$sco->time_limit_action:'';
      // END

      Also in the code that actually generates the response to the course the changes need to be reflected:

      //Martin Holden, SkillSoft
      //Corrected references to masteryscore, should be mastery_score
      //Corrected references to maxtimeallowed, should be max_time_allowed
      //Corrected references to timelimitaction, should be time_limit_action
      //22nd April 2008
      //
      //echo 'Mastery_Score = '.$userdata->masteryscore."\n";
      //echo 'Max_Time_Allowed = '.$userdata->maxtimeallowed."\n";
      //echo 'Time_Limit_Action = '.$userdata->timelimitaction."\n";
      echo 'Mastery_Score = '.$userdata->mastery_score."\n";
      echo 'Max_Time_Allowed = '.$userdata->max_time_allowed."\n";
      echo 'Time_Limit_Action = '.$userdata->time_limit_action."\n";
      // END

      The changes in datamodels/aicc.js.php are in the code that defines the JavaScript object:

      Original:
      //Martin Holden, SkillSoft
      //Corrected references to masteryscore, should be mastery_score
      //Corrected references to maxtimeallowed, should be max_time_allowed
      //Corrected references to timelimitaction, should be time_limit_action
      //22nd April 2008
      //
      // Original lines below where:
      // 'cmi.student_data.mastery_score':

      {'defaultvalue':'<?php echo isset($userdata->masteryscore)?$userdata->masteryscore:'' ?>', 'mod':'r', 'writeerror':'403'}

      ,
      // 'cmi.student_data.max_time_allowed':

      {'defaultvalue':'<?php echo isset($userdata->maxtimeallowed)?$userdata->maxtimeallowed:'' ?>', 'mod':'r', 'writeerror':'403'}

      ,
      // 'cmi.student_data.time_limit_action':

      {'defaultvalue':'<?php echo isset($userdata->timelimitaction)?$userdata->timelimitaction:'' ?>', 'mod':'r', 'writeerror':'403'}

      ,
      // END

      Replace with:

      'cmi.student_data.mastery_score':

      {'defaultvalue':'<?php echo isset($userdata->mastery_score)?$userdata->mastery_score:'' ?>', 'mod':'r', 'writeerror':'403'}

      ,
      'cmi.student_data.max_time_allowed':

      {'defaultvalue':'<?php echo isset($userdata->max_time_allowed)?$userdata->max_time_allowed:'' ?>', 'mod':'r', 'writeerror':'403'}

      ,
      'cmi.student_data.time_limit_action':

      {'defaultvalue':'<?php echo isset($userdata->time_limit_action)?$userdata->time_limit_action:'' ?>', 'mod':'r', 'writeerror':'403'}

      ,

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                piers Piers Harding
                Reporter:
                martin_holden@skillsoft.com Martin Holden
                Tester:
                Dan Marsden
                Participants:
                Component watchers:
                Damyon Wiese, Dan Marsden, Matteo Scaramuccia, Adrian Greeve, Mihail Geshoski, Peter Dias
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  24/Nov/10