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

Assign grading table throws an error when selecting an empty group in separate groups mode

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 2.6.3, 2.7
    • Fix Version/s: None
    • Component/s: Assignment
    • Affected Branches:
      MOODLE_26_STABLE, MOODLE_27_STABLE

      Description

      When assign is configured to use separate groups, and team submission is switched off, then you once you try to switch to an empty group in a grading table, you get an error 'Coding error detected, it must be fixed by a programmer: moodle_database::get_in_or_equal() does not accept empty arrays'.

      Steps to reproduce:

      1. Create a group with no members
      2. Create a grouping that includes that group
      3. Create an assignment with the following settings.
        • Switch 'Team submission' to 'Off'
        • Switch 'Group mode' to 'Separate groups'
        • Select the grouping you created
        • Make sure that 'available for group members only' is checked.
      4. Click Save and display
      5. Go to Grading table
      6. Choose your empty group in group selector

      Expected result: It should display "Nothing to display"

      Actual result: The following error occurs on a broken page.

      Coding error detected, it must be fixed by a programmer: moodle_database::get_in_or_equal() does not accept empty arrays
       
      More information about this error
      Debug info:
      Error code: codingerror
      Stack trace:
       
          line 693 of \lib\dml\moodle_database.php: coding_exception thrown
          line 869 of \lib\grouplib.php: call to moodle_database->get_in_or_equal()
          line 1339 of \mod\assign\locallib.php: call to groups_filter_users_by_course_module_visible()
          line 122 of \mod\assign\gradingtable.php: call to assign->list_participants()
          line 3155 of \mod\assign\locallib.php: call to assign_grading_table->__construct()
          line 3197 of \mod\assign\locallib.php: call to assign->view_grading_table()
          line 518 of \mod\assign\locallib.php: call to assign->view_grading_page()
          line 53 of \mod\assign\view.php: call to assign->view()
      

      The error also occurs when you select "None" as the grouping in the assignment settings. Then the error occurs immediately when you go to the grading page.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              pavel.m.sokolov Pavel Sokolov
              Participants:
              Component watchers:
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias
              Votes:
              18 Vote for this issue
              Watchers:
              14 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: