Moodle
  1. Moodle
  2. MDL-35754

Quiz in Javascript Popup not working

    Details

    • Testing Instructions:
      Hide

      Test pre-requisites

      • To be tested on IE8, IE9, Firefox, Chrome
      • Debug level has to be set to developer
      • A quiz with setting Browser security set to "Full screen pop-up with some JavaScript security"

      Test steps

      1. Save the file test_popup.php in the root of your Moodle, and access it in your browser
      2. Make sure the invalid buttons throw an error but still open the popup
      3. Make sure the valid ones open a popup
      4. Disable the debug
      5. Make sure all buttons open a popup without throwing an error
      1. As a student, attempt the quiz
      2. Make sure it opens in a popup without errors
      Show
      Test pre-requisites To be tested on IE8, IE9, Firefox, Chrome Debug level has to be set to developer A quiz with setting Browser security set to "Full screen pop-up with some JavaScript security" Test steps Save the file test_popup.php in the root of your Moodle, and access it in your browser Make sure the invalid buttons throw an error but still open the popup Make sure the valid ones open a popup Disable the debug Make sure all buttons open a popup without throwing an error As a student, attempt the quiz Make sure it opens in a popup without errors
    • Affected Branches:
      MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_22_STABLE, MOODLE_23_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-35754-master
    • Rank:
      44503

      Description

      Checked on PC in IE, Chrome, and FF. All generate a js error around javascript-static.js line 89. FF says args.name is undefined. Chrome and IE say 'match' is undefined or null.
      This is only in the 20120927 build. Hasn't been a problem previously.

      I'll look at the changes to javascript-static.js to see if I can trace it down.

      1. test_popup.php
        0.9 kB
        Frédéric Massart

        Issue Links

          Activity

          Hide
          Jeff Rader added a comment -

          The fix for MDL-31499 seems to have broken this. Commenting out lines 1194-1200 cleans up the bug. I'll see if I can get around that though.

          Show
          Jeff Rader added a comment - The fix for MDL-31499 seems to have broken this. Commenting out lines 1194-1200 cleans up the bug. I'll see if I can get around that though.
          Hide
          Jeff Rader added a comment -

          Can someone take a look and see if this works? It works for me.
          Tested on Win7 with IE9, FF15 and Chrome 22.
          https://github.com/coderader/moodle_23/commit/4f9b4f044c0a5ae23a8d494f67e117352a8df75c

          Show
          Jeff Rader added a comment - Can someone take a look and see if this works? It works for me. Tested on Win7 with IE9, FF15 and Chrome 22. https://github.com/coderader/moodle_23/commit/4f9b4f044c0a5ae23a8d494f67e117352a8df75c
          Hide
          Tim Hunt added a comment -

          Michael, please can someone from HQ look at this, since it is a JS thing, not really specifically a quiz thing.

          Show
          Tim Hunt added a comment - Michael, please can someone from HQ look at this, since it is a JS thing, not really specifically a quiz thing.
          Hide
          Tim Hunt added a comment -

          Adding people from MDL-31499 as watchers.

          Show
          Tim Hunt added a comment - Adding people from MDL-31499 as watchers.
          Hide
          Frédéric Massart added a comment -

          Actually this is a regression caused by MDL-26940. My bad on that... I apparently even had the wrong MDL in the commit message...

          Show
          Frédéric Massart added a comment - Actually this is a regression caused by MDL-26940 . My bad on that... I apparently even had the wrong MDL in the commit message...
          Hide
          Andrew Davis added a comment -

          [Y] Syntax
          [NA] Output
          [Y] Whitespace
          [NA] Language
          [NA] Databases
          [N] Testing (Where does the tester find test_popup.php?)
          [Y] Security
          [NA] Documentation
          [Y] Git
          [Y] Sanity check

          Provided that typeof check works in the various browsers the fix seems fine.

          Show
          Andrew Davis added a comment - [Y] Syntax [NA] Output [Y] Whitespace [NA] Language [NA] Databases [N] Testing (Where does the tester find test_popup.php?) [Y] Security [NA] Documentation [Y] Git [Y] Sanity check Provided that typeof check works in the various browsers the fix seems fine.
          Hide
          Frédéric Massart added a comment -

          Thanks Andrew, added the test file and pushing for integration.

          Show
          Frédéric Massart added a comment - Thanks Andrew, added the test file and pushing for integration.
          Hide
          Dan Poltawski added a comment -

          Thanks, i've integrated this now

          Show
          Dan Poltawski added a comment - Thanks, i've integrated this now
          Hide
          Dan Poltawski added a comment -

          Huh, something coming from 08eab8970, which seems to be completely unrelated to this!

          Warning: array_key_exists(): The first argument should be either a string or an integer in /Users/danp/git/integration/lib/blocklib.php on line 291
          Skip to main content

          Show
          Dan Poltawski added a comment - Huh, something coming from 08eab8970, which seems to be completely unrelated to this! Warning: array_key_exists(): The first argument should be either a string or an integer in /Users/danp/git/integration/lib/blocklib.php on line 291 Skip to main content
          Hide
          Dan Poltawski added a comment -

          This is looking good on Chrome, Firefox, IE9, Safari. Need to find an IE8 tester

          Show
          Dan Poltawski added a comment - This is looking good on Chrome, Firefox, IE9, Safari. Need to find an IE8 tester
          Hide
          Dan Poltawski added a comment -

          Opera too.

          Show
          Dan Poltawski added a comment - Opera too.
          Hide
          Rajesh Taneja added a comment -

          Works fine on ie8, although I am seeing strange behaviour on ie8 (Not related).
          My page is shifting towards left top and clipping left portion of site, it's not consistent but happening frequently.
          Will open another issue to investigate.

          Show
          Rajesh Taneja added a comment - Works fine on ie8, although I am seeing strange behaviour on ie8 (Not related). My page is shifting towards left top and clipping left portion of site, it's not consistent but happening frequently. Will open another issue to investigate.
          Hide
          Dan Poltawski added a comment -

          Thanks Raj for that final test, passing this

          Show
          Dan Poltawski added a comment - Thanks Raj for that final test, passing this
          Hide
          Eloy Lafuente (stronk7) added a comment -

          Closing as fixed, many thanks for your awesome collaboration.

          Show
          Eloy Lafuente (stronk7) added a comment - Closing as fixed, many thanks for your awesome collaboration.
          Hide
          Alan Kmiecik added a comment -

          Can somebody help clarify what the fix is? Did the text_popup.php file. Click all six buttons in there (nothing happened with the "invalids"
          Copied the lib/javascript-static.js file from https://github.com/coderader/moodle_23/commit/4f9b4f044c0a5ae23a8d494f67e117352a8df75c.
          Neither fixed the issue (Popup confirmation before quiz is popping up corrupted)

          Show
          Alan Kmiecik added a comment - Can somebody help clarify what the fix is? Did the text_popup.php file. Click all six buttons in there (nothing happened with the "invalids" Copied the lib/javascript-static.js file from https://github.com/coderader/moodle_23/commit/4f9b4f044c0a5ae23a8d494f67e117352a8df75c . Neither fixed the issue (Popup confirmation before quiz is popping up corrupted)
          Hide
          Frédéric Massart added a comment -

          Hi Alan,

          you can use test_popup.php to check if you correctly pulled the patch, which you did by copying javascript-static.js. Although I would not recommend copying an entire file, as you could create random issues/conflicts. As this has been integrated, I'd suggest you to update to the latest Moodle 2.3.2+.

          Before trying the patch, make sure

          • you purged Moodle cache
          • you cleaned your Browser cache
          • you enabled the config setting to DEVELOPER (if you want to see the alert)

          Hope this helps,

          Cheers,
          Fred

          Show
          Frédéric Massart added a comment - Hi Alan, you can use test_popup.php to check if you correctly pulled the patch, which you did by copying javascript-static.js. Although I would not recommend copying an entire file, as you could create random issues/conflicts. As this has been integrated, I'd suggest you to update to the latest Moodle 2.3.2+. Before trying the patch, make sure you purged Moodle cache you cleaned your Browser cache you enabled the config setting to DEVELOPER (if you want to see the alert) Hope this helps, Cheers, Fred

            People

            • Votes:
              2 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: