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

Availability: Editing interface broken in IE8

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      Using a modern browser:

      0. Ensure 'enableavailability' is turned on for server.
      1. Go to a course and edit settings for any activity.
      2. Expand Restrict Access section
      3. Click the Add button to add a restriction, then click Date button on the popup.
      4. Look at the newly-added date item - check the icons are OK.
      5. Save changes.
      6. Using IE8, edit the activity and expand Restrict Access. Look at the icons.

      EXPECTED: Eye and Delete icons should show a picture
      BEFORE FIX: Error images show in place of these icons

      7. Click on the eye icon to toggle it into the other state.
      EXPECTED: Icon still shows a picture.

      Show
      Using a modern browser: 0. Ensure 'enableavailability' is turned on for server. 1. Go to a course and edit settings for any activity. 2. Expand Restrict Access section 3. Click the Add button to add a restriction, then click Date button on the popup. 4. Look at the newly-added date item - check the icons are OK. 5. Save changes. 6. Using IE8, edit the activity and expand Restrict Access. Look at the icons. EXPECTED: Eye and Delete icons should show a picture BEFORE FIX: Error images show in place of these icons 7. Click on the eye icon to toggle it into the other state. EXPECTED: Icon still shows a picture.
    • Affected Branches:
      MOODLE_27_STABLE
    • Fixed Branches:
      MOODLE_27_STABLE
    • Pull Master Branch:
      MDL-47380-master

      Description

      This happens in SVG unsupported browser like IE7,IE8 or old chrome/firefox browsers.
      Steps to reproduce
      -------------------------
      1. Go to Course > click on an activity (e.g. Quiz)
      2. Under the Administration block > Quiz Administration > Edit Settings
      3. Expand Restrict Access section
      4. The Eye icon and Delete icon will show a error picture.

      Background
      ----------------
      On IE8, the eye icon and delete icon has the src specified as "http://localhost/theme/image.php/clean/core/-1/i/show"

      The icon image is not being resolved properly as they are being hardcoded in the \availability\yui\src\form\js\form.js file.

      Workaround
      ----------------
      Use M.util.image_url function to resolve image path!
      1. Go to \availability\yui\src\form\js\form.js
      2. Under the function M.core_availability.EyeIcon change the following:
      // Set up button text and icon.
      var suffix = individual ? '_individual' : '_all';
      var setHidden = function()

      { icon.set('src', M.util.image_url('i/show', 'core')); // icon.set('src', iconBase + '/i/show'); icon.set('alt', M.str.availability['hidden' + suffix]); this.span.set('title', M.str.availability['hidden' + suffix] + ' \u2022 ' + M.str.availability.show_verb); }

      ;
      var setShown = function()

      { icon.set('src', M.util.image_url('i/hide', 'core')); // icon.set('src', iconBase + '/i/hide'); icon.set('alt', M.str.availability['shown' + suffix]); this.span.set('title', M.str.availability['shown' + suffix] + ' \u2022 ' + M.str.availability.hide_verb); }

      ;
      3. Under M.core_availability.DeleteIcon ,change the following:
      var img = Y.Node.create('<img src="' + M.util.image_url('t/delete', 'core') +
      //M.cfg.wwwroot + '/theme/image.php/' + M.cfg.theme + '/core/' + M.cfg.themerev +
      //'/t/delete"
      '" alt="' + M.str.moodle['delete'] + '" />');
      4. Shifter \availability\yui\src\form
      5. Purge the Cache.
      6. Cheers. Fix is tested with Win7, IE8.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  10/Nov/14