Moodle
  1. Moodle
  2. MDL-38090

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

    Details

    • 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:
    • Rank:
      47890

      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.

        Activity

        Hide
        Andrew Nicols added a comment -

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

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

        Thanks Andrew. That looks good and works for me.

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

        Cheers Tim,

        Submitting for integration.

        Show
        Andrew Nicols added a comment - Cheers Tim, Submitting for integration.
        Hide
        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
        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
        Andrew Nicols added a comment -

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

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

        I like both changes, thanks a lot!

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

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

        Show
        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 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 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
        Eloy Lafuente (stronk7) added a comment -

        Integrated, thanks!

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

        This is working as expected.

        Tested with Chrome, FF and IE8.

        Test passed.

        Show
        Rossiani Wijaya added a comment - This is working as expected. Tested with Chrome, FF and IE8. Test passed.
        Hide
        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
        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: