Uploaded image for project: 'Moodle app'
  1. Moodle app
  2. MOBILE-2211

sco.launch doesn't include parameters

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Minor
    • 3.3.2
    • 3.3.1
    • SCORM add-on
    • Moodle Mobile 3.3.2

    Description

      As part of SCORM 1.2 ADL Standard, "parameters" is "Static parameters to be passed to the content 0 or 1 file at launch time." (References: SCORM 1.2 Technical Specification)

      We've noticed that parameters included as element of items are included in "extradata" array (with isvisible element) but is not included in "launch" field in sco objects, so SCORMS doesn't have same behavior in Moodle Mobile app as in Moodle 3.3.1 (and in previous versions since 1.9 we've tested).

      However, app loads correctly in "sco.launch" parameters included as part of field href in resources.

      To reproduce: Include compulsory parameters for correct behavior of the scorm in the field parameters of an item, and add parameters in href field of the resource of another item (a clone without field parameters) and compare.

       

      We think it must works like it works in Moodle 3.3.1. 

      // mod/scorm/locallib.php:2182
       
      $connector = '';
      $version = substr($scorm->version, 0, 4);
      if ((isset($sco->parameters) && (!empty($sco->parameters))) || ($version == 'AICC')) {
          if (stripos($sco->launch, '?') !== false) {
              $connector = '&';
          } else {
              $connector = '?';
          }
          if ((isset($sco->parameters) && (!empty($sco->parameters))) && ($sco->parameters[0] == '?')) {
              $sco->parameters = substr($sco->parameters, 1);
          }
      }
       
      if ($version == 'AICC') {
          require_once("$CFG->dirroot/mod/scorm/datamodels/aicclib.php");
          $aiccsid = scorm_aicc_get_hacp_session($scorm->id);
          if (empty($aiccsid)) {
              $aiccsid = sesskey();
          }
          $scoparams = '';
          if (isset($sco->parameters) && (!empty($sco->parameters))) {
              $scoparams = '&'. $sco->parameters;
          }
          $launcher = $sco->launch.$connector.'aicc_sid='.$aiccsid.'&aicc_url='.$CFG->wwwroot.'/mod/scorm/aicc.php'.$scoparams;
      } else {
          if (isset($sco->parameters) && (!empty($sco->parameters))) {
              $launcher = $sco->launch.$connector.$sco->parameters;
          } else {
              $launcher = $sco->launch;
          }
      }

       

      Attachments

        Activity

          People

            dpalou Dani Palou
            alvaro.marfil Álvaro Marfil
            Pau Ferrer Pau Ferrer
            Juan Leyva Juan Leyva
            Berta Maroto Berta Maroto
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Clockify

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