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

showadvanced/shortforms JS should be more tolerant of non-existent fields

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.5
    • Fix Version/s: 2.5
    • Component/s: JavaScript
    • Labels:
    • Testing Instructions:
      Hide
      • Open a form which actively uses the new shortforms code (e.g. new Multichoice quiz question)
      • Ensure that all of the form elements can be opened and closed
      • Ensure that the Show more/Show less links work as expected
      Show
      Open a form which actively uses the new shortforms code (e.g. new Multichoice quiz question) Ensure that all of the form elements can be opened and closed Ensure that the Show more/Show less links work as expected
    • Affected Branches:
      MOODLE_25_STABLE
    • Fixed Branches:
      MOODLE_25_STABLE
    • Pull Master Branch:

      Description

      We should not break subsequent JS on the page if there's an issue with a form element.
      This is highlighted by MDL-37932.

      This issue also fixes an issue where Y.one is called as a new object rather than a static method.

        Gliffy Diagrams

          Activity

          Hide
          dobedobedoh Andrew Nicols added a comment -

          Tim, would you mind peer reviewing this as it was found whilst looking at one of your issues?

          Show
          dobedobedoh Andrew Nicols added a comment - Tim, would you mind peer reviewing this as it was found whilst looking at one of your issues?
          Hide
          timhunt Tim Hunt added a comment -

          Thanks Andrew. That looks good and works for me.

          Show
          timhunt Tim Hunt added a comment - Thanks Andrew. That looks good and works for me.
          Hide
          dobedobedoh Andrew Nicols added a comment -

          Cheers Tim,

          Submitting for integration.

          Show
          dobedobedoh Andrew Nicols added a comment - Cheers Tim, Submitting for integration.
          Hide
          dobedobedoh Andrew Nicols added a comment -

          After discussion with Tim, I've just modified the patch to additionally log a debug message to the JS console using Y.log().
          To benefit best from this, I've applied the debug setting to our YUI config. This ensures that we only display messages when we would do so within our PHP too.

          Show
          dobedobedoh Andrew Nicols added a comment - After discussion with Tim, I've just modified the patch to additionally log a debug message to the JS console using Y.log(). To benefit best from this, I've applied the debug setting to our YUI config. This ensures that we only display messages when we would do so within our PHP too.
          Hide
          dobedobedoh Andrew Nicols added a comment -

          Taking this out of integration review as I'd appreciate Petr Skoda's views on the YUI_config.debug change quickly.

          Show
          dobedobedoh Andrew Nicols added a comment - Taking this out of integration review as I'd appreciate Petr Skoda 's views on the YUI_config.debug change quickly.
          Hide
          skodak Petr Skoda added a comment -

          I like both changes, thanks a lot!

          Show
          skodak Petr Skoda added a comment - I like both changes, thanks a lot!
          Hide
          stronk7 Eloy Lafuente (stronk7) added a comment -

          wtf, i just pressed some key and this became assigned to me, sending back to Andrew, sorry.

          Show
          stronk7 Eloy Lafuente (stronk7) added a comment - wtf, i just pressed some key and this became assigned to me, sending back to Andrew, sorry.
          Hide
          damyon Damyon Wiese added a comment -

          The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week.

          Thanks!

          Show
          damyon Damyon Wiese added a comment - The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week. Thanks!
          Hide
          stronk7 Eloy Lafuente (stronk7) added a comment -

          Integrated, thanks!

          Show
          stronk7 Eloy Lafuente (stronk7) added a comment - Integrated, thanks!
          Hide
          rwijaya Rossiani Wijaya added a comment -

          This is working as expected.

          Tested with Chrome, FF and IE8.

          Test passed.

          Show
          rwijaya Rossiani Wijaya added a comment - This is working as expected. Tested with Chrome, FF and IE8. Test passed.
          Hide
          stronk7 Eloy Lafuente (stronk7) added a comment -

          Because

          A
          MARVELOUS
          A       U
          Z  YOU  P
          I  ARE  E
          N  PPL  R
          G       B
            TNKS! 
          

          Closing, ciao

          Show
          stronk7 Eloy Lafuente (stronk7) added a comment - Because A MARVELOUS A U Z YOU P I ARE E N PPL R G B TNKS! Closing, ciao

            People

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

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                14/May/13