Details

    • Testing Instructions:
      Hide

      I apologise in advance

      1. Look at the diff and access each form
      2. Make sure the sections are collapsed as they should be
        • Everything is collapsed
        • Except the first section which is always expanded
        • When the whole form has only 2 sections, none of them is collapsible, but expanded
      3. Make sure you don't see any PHP error or JS error
      Show
      I apologise in advance Look at the diff and access each form Make sure the sections are collapsed as they should be Everything is collapsed Except the first section which is always expanded When the whole form has only 2 sections, none of them is collapsible, but expanded Make sure you don't see any PHP error or JS error
    • Affected Branches:
      MOODLE_25_STABLE
    • Fixed Branches:
      MOODLE_25_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-38005-master
    • Rank:
      47787

      Description

      This is happening in the latest integration branch.

      Replication steps:

      1. Open Firefox, turn on Firebug and click on the errors panel.
      2. Visit a course settings page, either edit an existing course or add a new course.
      3. Expand a settings area by clicking on the arrow next to the heading, such as 'Groups'.

      The following JS error will occur...

      TypeError: statuselement.get is not a function
      
      statuselement.set('value', Math.abs(Number(statuselement.get('value'))-1));
      

        Issue Links

          Activity

          Hide
          Rajesh Taneja added a comment -

          Linking this to MDL-30637, which introduced this.

          Show
          Rajesh Taneja added a comment - Linking this to MDL-30637 , which introduced this.
          Hide
          Michael de Raadt added a comment -

          I can't replicate this. I wonder if there are some conditions needed on the form to trigger this.

          Show
          Michael de Raadt added a comment - I can't replicate this. I wonder if there are some conditions needed on the form to trigger this.
          Hide
          Michael de Raadt added a comment -

          Thanks for clarifying that. I can replicate the error now.

          Show
          Michael de Raadt added a comment - Thanks for clarifying that. I can replicate the error now.
          Hide
          Frédéric Massart added a comment -

          Though the problem was not there any more (but a the JS console was getting a debug message), this was happening because the form was missing the hidden field containing the collapsed status of the section. In order to have a proper hidden field, a section needs a name. I have added missing names in core, and enforced the logic not to prompt with an ugly error when the section didn't have any.

          Show
          Frédéric Massart added a comment - Though the problem was not there any more (but a the JS console was getting a debug message), this was happening because the form was missing the hidden field containing the collapsed status of the section. In order to have a proper hidden field, a section needs a name. I have added missing names in core, and enforced the logic not to prompt with an ugly error when the section didn't have any.
          Hide
          Adrian Greeve added a comment -

          [Y] Syntax
          [Y] Output
          [Y] Whitespace
          [-] Language
          [-] Databases
          [Y] Testing
          [-] Security
          [-] Documentation
          [Y] Git
          [Y] Sanity check

          Hello Fred,

          I think that each of the headings should have a name. So I'm +1 for this addition.

          Some of the lines that you changed, are getting a bit long, perhaps you could break them onto two lines.

          Thanks.

          Show
          Adrian Greeve added a comment - [Y] Syntax [Y] Output [Y] Whitespace [-] Language [-] Databases [Y] Testing [-] Security [-] Documentation [Y] Git [Y] Sanity check Hello Fred, I think that each of the headings should have a name. So I'm +1 for this addition. Some of the lines that you changed, are getting a bit long, perhaps you could break them onto two lines. Thanks.
          Hide
          Frédéric Massart added a comment -

          Thanks Adrian, pushing forward.

          Show
          Frédéric Massart added a comment - Thanks Adrian, pushing forward.
          Hide
          Damyon Wiese added a comment -

          I created an issue to disable shortforms completely for one of the forms affected by this patch (it is way too confusing on that form).

          Show
          Damyon Wiese added a comment - I created an issue to disable shortforms completely for one of the forms affected by this patch (it is way too confusing on that form).
          Hide
          Damyon Wiese added a comment -

          I had to fix the changes in "question/type/calculated/datasetitems_form.php" as there were sections being created with identical names. Other than that this patch looks fine - integrated to master.

          Thanks Fred.

          Show
          Damyon Wiese added a comment - I had to fix the changes in "question/type/calculated/datasetitems_form.php" as there were sections being created with identical names. Other than that this patch looks fine - integrated to master. Thanks Fred.
          Hide
          Frédéric Massart added a comment -

          Thanks for fixing this Damyon!

          Show
          Frédéric Massart added a comment - Thanks for fixing this Damyon!
          Hide
          David Monllaó added a comment -

          It passes.

          The only issue I've noticed is when configuring a equella instance, I can't see the role names, I'm not sure if it is related with my instance, anyway I don't think is related with this issue.

          Show
          David Monllaó added a comment - It passes. The only issue I've noticed is when configuring a equella instance, I can't see the role names, I'm not sure if it is related with my instance, anyway I don't think is related with this issue.
          Hide
          Damyon Wiese added a comment -

          This issue has been integrated upstream and is now available via git (and in some hours, via mirrors and downloads).

          Thanks for your contributions!

          Show
          Damyon Wiese added a comment - This issue has been integrated upstream and is now available via git (and in some hours, via mirrors and downloads). Thanks for your contributions!

            People

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

              Dates

              • Created:
                Updated:
                Resolved: