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

Availability restriction elements interfere with mod form submission

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      Setup

      1. Login as admin
      2. Create a new course
        • Group mode: Visible groups
        • Force group mode: No

      With group/grouping availability enabled

      1. Navigate to test course
      2. Press Add an activity or resource > Forum
      3. Expand Common module settings section
      4. Confirm Add group/grouping access restriction button is present
      5. Enter some text in the Forum name field
      6. Hit return
      7. Confirm form submits
      8. Confirm forum isn't created with Restricted Not available unless: You belong to any group restriction

      With group/grouping availability disabled

      1. Navigate to Plugins > Availability restrictions > Manage restrictions in site administration
      2. Disable the following (click the eye icon)
        • Restriction by group
        • Restriction by grouping
      3. Navigate to test course
      4. Press Add an activity or resource > Forum
      5. Expand Common module settings section
      6. Confirm Add group/grouping access restriction button is not present
      7. Enter some text in the Forum name field
      8. Hit return
      9. Confirm form submits without validation error about Missing restriction plugin
      Show
      Setup Login as admin Create a new course Group mode: Visible groups Force group mode: No With group/grouping availability enabled Navigate to test course Press Add an activity or resource > Forum Expand Common module settings section Confirm Add group/grouping access restriction button is present Enter some text in the Forum name field Hit return Confirm form submits Confirm forum isn't created with Restricted Not available unless: You belong to any group restriction With group/grouping availability disabled Navigate to Plugins > Availability restrictions > Manage restrictions in site administration Disable the following (click the eye icon) Restriction by group Restriction by grouping Navigate to test course Press Add an activity or resource > Forum Expand Common module settings section Confirm Add group/grouping access restriction button is not present Enter some text in the Forum name field Hit return Confirm form submits without validation error about Missing restriction plugin
    • Affected Branches:
      MOODLE_310_STABLE, MOODLE_39_STABLE
    • Fixed Branches:
      MOODLE_310_STABLE, MOODLE_39_STABLE
    • Pull 3.9 Branch:
    • Pull 3.10 Branch:
      MDL-71402-310
    • Pull 3.11 Branch:
      MDL-71402-311
    • Pull Master Branch:

      Description

      There are a couple of issues with the Add group/grouping access restriction button found under Common module settings:

      1. It adds itself regardless of the enabled state of the Restriction by group availability restriction;
      2. It intercepts the enter keypress in other elements because it is behaving like a submit button

        Attachments

        1. MDL-71402.jpg
          39 kB
          Anna Carissa Sadia
        2. Screenshot from 2021-04-22 08-26-57.png
          46 kB
          Paul Holden

          Issue Links

            Activity

              People

              Assignee:
              pholden Paul Holden
              Reporter:
              pholden Paul Holden
              Peer reviewer:
              Ruslan Kabalin Ruslan Kabalin
              Integrator:
              Víctor Déniz Falcón Víctor Déniz Falcón
              Tester:
              Anna Carissa Sadia Anna Carissa Sadia
              Participants:
              Component watchers:
              Sam Marshall, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona), Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona)
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                10/May/21

                  Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 3 hours, 50 minutes
                  3h 50m