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

Cohort action menu should not be added for managed cohorts

XMLWordPrintable

    • MOODLE_400_STABLE, MOODLE_401_STABLE
    • MOODLE_401_STABLE, MOODLE_402_STABLE
    • MDL-78071-401
    • Hide

      Pre-requisites

      1. Requires access to your database to simulate a "managed cohort" (e.g. one whose component field is non-empty)

      Test

      1. Log in as admin
      2. Navigate to Users > Cohorts in site administration
      3. Create two new cohorts
      4. Open your database editor tool, view the mdl_cohort table
      5. Amend the component field of the second cohort you created to: tool_uploaduser
      6. View the list of cohorts in Moodle
      7. Confirm you see an action menu (Edit, Show, etc) for your first cohort
      8. Confirm you do not see an action menu for your second cohort (the "managed" cohort)
      Show
      Pre-requisites Requires access to your database to simulate a "managed cohort" (e.g. one whose component field is non-empty) Test Log in as admin Navigate to Users > Cohorts in site administration Create two new cohorts Open your database editor tool, view the mdl_cohort table Amend the component field of the second cohort you created to: tool_uploaduser View the list of cohorts in Moodle Confirm you see an action menu (Edit, Show, etc) for your first cohort Confirm you do not see an action menu for your second cohort (the "managed" cohort)

      Steps to reproduce:

      • Login as admin
      • Create a managed cohort. These are cohorts which have an entry != null in the 'component' column of the 'mdl_cohort' table. These cohorts are managed by a plugin and cannot be managed manually by an admin. If you do not know how to create such a managed cohort in a realistic way, you can use these steps:
      • Install the https://moodle.org/plugins/local_profilecohort plugin
      • Go to Site administration -> Cohorts
      • Add a new cohort with the name 'Managed cohort'
      • Go to Site administration -> Users -> User profile fields
      • Add a new 'text input' profile field with an arbitrary name
      • Go to Site administration -> Profile field based cohort membership
      • Click "Add new rule"
      • Select the user profile field from the dropdown and configure an arbitrary rule
      • Click "Save changes"
      • Go to Site administration -> Cohorts
      • Verify that the 'Source' column of your cohort row says 'Profile field based cohort membership' and not 'Created manually'
      • Add another cohort with the name "Manual cohort'
      • Have a look at the actions column (the last column) in the cohort list

      Expected result:

      • The 'Manual cohort' has an action menu with the Menu items Hide, Edit, Delete and Assign.
      • The 'Managed cohort' does not have any action menu as it is fully managed

      Actual result:

      • The 'Manual cohort' has an action menu with the Menu items Hide, Edit, Delete and Assign.
      • The 'Managed cohort' has an action menu with the same menu items as well.
      • If you click any of these action menu items, you are redirected to the same page again but nothing else seems to have happened.

      Regression analysis:
      In Moodle 3, managed cohorts did not show any menu items in the cohorts list and appeared as fully managed.
      Against this background, I would say that this is a regression in Moodle 4.

            pholden Paul Holden
            abias Alexander Bias
            David Carrillo David Carrillo
            Andrew Lyons Andrew Lyons
            Kim Jared Lucas Kim Jared Lucas
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 hour, 20 minutes
                1h 20m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.