Moodle
  1. Moodle
  2. MDL-7516

expand/collide problem in firefox

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor 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
    • Rank (Obsolete):
      24521

      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.

        Activity

        Hide
        fatih tuna added a comment -

        Actually line 1440 should be :
        which = which.substring(0,(which.length));
        instead of
        which = which.substring(0,4);

        Show
        fatih tuna added a comment - Actually line 1440 should be : which = which.substring(0,(which.length)); instead of which = which.substring(0,4);
        Hide
        Martin Dougiamas added a comment -

        Assigning to Sadiel for prioritising and fixing.

        Show
        Martin Dougiamas added a comment - Assigning to Sadiel for prioritising and fixing.
        Hide
        Martin Dougiamas added a comment -

        Assigning to Jesús Rincón to organise and start working on.

        Show
        Martin Dougiamas added a comment - Assigning to Jesús Rincón to organise and start working on.
        Hide
        Jesús Rincón added a comment -

        This bug has already been fixed for the stable branch of the versions 1.6, 1.7, 1.8 and HEAD.

        Show
        Jesús Rincón added a comment - This bug has already been fixed for the stable branch of the versions 1.6, 1.7, 1.8 and HEAD.
        Hide
        Jesús Rincón added a comment -

        Fixed for the versions mentioned on the previous comment.

        Show
        Jesús Rincón added a comment - Fixed for the versions mentioned on the previous comment.

          People

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

            Dates

            • Created:
              Updated:
              Resolved: