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

expand/collide problem in firefox

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.6
    • Fix Version/s: 1.6, 1.7, 1.8, 1.9
    • Component/s: SCORM
    • Labels:
      None
    • Environment:
      Mozilla Firefox
    • Database:
      Any
    • Affected Branches:
      MOODLE_16_STABLE
    • Fixed Branches:
      MOODLE_16_STABLE, MOODLE_17_STABLE, MOODLE_18_STABLE, MOODLE_19_STABLE

      Description

      Expand/Collide feature can not be used in mozilla firefox. A javascript error occurs (like img4 not found) when expandable list item clicked.
      A solution I create is as follows:
      I made changes in locallib.php under scorm directory:
      I changed code at line 1348: which is
      $result->toc .= '<a href="javascript:expandCollide(img'.$sublist.','.$sublist.','.$nextsco->id.');">
      into
      $result->toc .= '<a href="javascript:expandCollide(\'img'.$sublist.'\','.$sublist.','.$nextsco->id.');">

      I add a line after line 1440:
      which = which.substring(0,4);
      to get rid of single quote ( ' ) beginning and end of the name

      I changed the line 1447:
      which is
      which.src = "'.$scormpixdir.'/plus.gif";
      into
      document.getElementById(which).src = "'.$scormpixdir.'/plus.gif";

      and line 145:
      which is
      which.src = "'.$scormpixdir.'/minus.gif";
      into
      document.getElementById(which).src = "'.$scormpixdir.'/minus.gif";

      After mading these changes it works fine on IE and firefox.
      If my description above is not clear please contact me to explain in again.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  20/Jun/06