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

SCORM popup crashes if currentorg param has ampersand in it

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 2.6.6, 3.1.3
    • Fix Version/s: None
    • Component/s: SCORM
    • Labels:
    • Affected Branches:
      MOODLE_26_STABLE, MOODLE_31_STABLE

      Description

      If an "organization" attribute has an ampersand in SCO settings, it gets passed to the popup window's GET string unaltered, which destroys the functionality. Only blank white window pops up, displaying nothing because $scoes array doesn't get populated.

      The following helps:

      --- a/mod/scorm/view.php
      +++ b/mod/scorm/view.php
      @@ -99,7 +99,7 @@ if ($scorm->popup == 1) {
           }
       
           $PAGE->requires->data_for_js('scormplayerdata', Array('launch' => $launch,
      -                                                           'currentorg' => $orgidentifier,
      +                                                           'currentorg' => rawurlencode($orgidentifier),
                                                                  'sco' => $scoid,
                                                                  'scorm' => $scorm->id,
                                                                  'courseurl' => $courseurl,
      

      There may be other places in code where currentorg does not get URL-encoded.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              sergeyandro Sergey Vidusov
              Participants:
              Component watchers:
              Dan Marsden, Matteo Scaramuccia, Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Sujith Haridasan
              Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated: