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

Warning error message when adding cohort roles with no user selected

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.1
    • Fix Version/s: 3.1
    • Component/s: Competencies
    • Labels:
    • Testing Instructions:
      Hide
      1. Login as admin.
      2. Create cohorts and add users to it https://docs.moodle.org/30/en/Cohorts.
      3. And add a new role (i.e. Parent role).
      4. Go to Site administration ► Users ► Permissions ► Assign user roles for entire cohort.
      5. Without entering anything, click Assign.
        • Confirm that there is no PHP warning message shown.
        • Confirm that a notification message is shown: No cohort role assignments were saved.
      6. Click on Continue to go back.
      7. Select one or more users in the Select users to assign role field.
      8. Select the created role for the Select role field.
      9. Select the cohort that was created in Select cohorts field.
      10. Click Assign
        • Confirm that you are able to successfully perform the operation.
      Show
      Login as admin. Create cohorts and add users to it https://docs.moodle.org/30/en/Cohorts . And add a new role (i.e. Parent role ). Go to Site administration ► Users ► Permissions ► Assign user roles for entire cohort. Without entering anything, click Assign . Confirm that there is no PHP warning message shown. Confirm that a notification message is shown: No cohort role assignments were saved. Click on Continue to go back. Select one or more users in the Select users to assign role field. Select the created role for the Select role field. Select the cohort that was created in Select cohorts field. Click Assign Confirm that you are able to successfully perform the operation.
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_31_STABLE
    • Fixed Branches:
      MOODLE_31_STABLE
    • Pull Master Branch:
      MDL-53918-master

      Description

      I'm seeing the warning message Warning: Invalid argument supplied for foreach() in /home/jun/moodles/integration_master/moodle/admin/tool/cohortroles/index.php on line 60 when I click "Assign" in Assign user roles for entire cohort with no user selected.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              jpataleta Jun Pataleta
              Reporter:
              jpataleta Jun Pataleta
              Peer reviewer:
              Frédéric Massart
              Integrator:
              David Monllaó
              Tester:
              Jake Dallimore
              Participants:
              Component watchers:
              Jean-Philippe Gaudreau, Steve Massicotte, Serge Gauthier, Issam Taboubi, Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Sujith Haridasan
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                23/May/16