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

sco.launch doesn't include parameters

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.3.1
    • Fix Version/s: 3.3.2
    • Component/s: SCORM add-on
    • Labels:
    • Sprint:
      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

            Assignee:
            dpalou Dani Palou
            Reporter:
            alvaro.marfil Álvaro Marfil
            Peer reviewer:
            Pau Ferrer
            Integrator:
            Juan Leyva
            Tester:
            Berta Maroto
            Participants:
            Component watchers:
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              29/Sep/17