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

Availability restriction elements interfere with mod form submission

    XMLWordPrintable

Details

    • MOODLE_310_STABLE, MOODLE_39_STABLE
    • MOODLE_310_STABLE, MOODLE_39_STABLE
    • MDL-71402-311
    • 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

    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

        Issue Links

          Activity

            People

              pholden Paul Holden
              pholden Paul Holden
              Ruslan Kabalin Ruslan Kabalin
              Victor Déniz Falcón Victor Déniz Falcón
              Anna Carissa Sadia Anna Carissa Sadia
              Sam Marshall, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Laurent David, Raquel Ortega, Sara Arjona (@sarjona), Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Laurent David, Raquel Ortega, Sara Arjona (@sarjona)
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                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