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

Selecting a group which is not part of grouping throws error if separate group mode is enabled

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Blocker Blocker
    • 3.0.7, 3.1.3
    • 2.8.12, 2.9.6, 3.0.4, 3.1, 3.1.2
    • Assignment
    • MOODLE_28_STABLE, MOODLE_29_STABLE, MOODLE_30_STABLE, MOODLE_31_STABLE
    • MOODLE_30_STABLE, MOODLE_31_STABLE
    • MDL-56753-master
    • Hide
      SETUP
      1. Log in as admin
      2. Go to a course, or create a new one.
      3. Create at least 3 groups (G1, G2, G3) with some members.
      4. Create a grouping (G1_G2) that includes 2 groups. There should be at least 1 group(G3(1)) which is not part of grouping and not an empty group.
      SEPARATED GROUPS
      1. Create an assignment with the following settings :
      • Submission types
        • Check online text
      • Group submission settings :
        • Students submit in groups: Yes
        • Grouping for student groups: select grouping you created(G1_G2)
      • Common module settings :
        • Group mode - separated groups
      1. Click save and display.
      2. Go to the assignment view page.
      3. Choose group G3 (not included in grouping G1_G2) on Separate groups dropdown above to Grading summary.
      4. Verify the no coding errors are displayed on grading summary.
      5. Make sure submitted is 0 and Groups count is 1 on grading summary table.
      6. Change to All participants, make sure the Groups count matches the number of groups you have created.
      7. Log in as student of the group 1 (G1) in a incognito window.
      8. Go to the assignment and do a submission.
      9. In the admin tab, select (G1) and reload, make sure Submitted count is now 1.
      10. Switch the filter to other groups, make sure Submitted still 0 for (G2 and G3).
      11. Log in as a student of group (G3) and do a submission.
      12. In the admin tab, select (G3) and reload, make sure Submitted count is now 1.
      13. Switch the filter to group 2 (G2), make sure Submitted still 0 for (G2) and 1 for (G1).
      14. Change to All participants, make sure the Submitted count matches the number of submissions you have created.
      VISIBLE GROUPS
      1. Create an assignment with the following settings :
      • Submission types
        • Check online text
      • Group submission settings :
        • Students submit in groups: Yes
        • Grouping for student groups: select grouping you created(G1_G2)
      • Common module settings :
        • Group mode - visible groups
      1. Click save and display.
      2. Go to the assignment view page.
      3. Choose group G3 (not included in grouping G1_G2) on Visible groups dropdown above to Grading summary.
      4. Verify the no coding errors are displayed on grading summary.
      5. Make sure submitted is 0 and Groups count is 1 on grading summary table.
      6. Change to All participants, make sure the Groups count matches the number of groups you have created.
      7. Log in as student of the group 1 (G1) in a incognito window.
      8. Go to the assignment and do a submission.
      9. In the admin tab, select (G1) and reload, make sure Submitted count is now 1.
      10. Switch the filter to other groups, make sure Submitted still 0 for (G2 and G3).
      11. Log in as a student of group (G3) and do a submission.
      12. In the admin tab, select (G3) and reload, make sure Submitted count is now 1.
      13. Switch the filter to group 2 (G2), make sure Submitted still 0 for (G2) and 1 for (G1).
      14. Change to All participants, make sure the Submitted count matches the number of submissions you have created.
      NO GROUPS
      1. Create another assignment, this time using no groups.
      2. Log in with different students and submit something.
      3. Log in as admin make sure you don't get any coding error and the Submitted count matches the number of submission you have made.
      Show
      SETUP Log in as admin Go to a course, or create a new one. Create at least 3 groups (G1, G2, G3) with some members. Create a grouping (G1_G2) that includes 2 groups. There should be at least 1 group(G3(1)) which is not part of grouping and not an empty group. SEPARATED GROUPS Create an assignment with the following settings : Submission types Check online text Group submission settings : Students submit in groups : Yes Grouping for student groups : select grouping you created(G1_G2) Common module settings : Group mode - separated groups Click save and display. Go to the assignment view page. Choose group G3 (not included in grouping G1_G2) on Separate groups dropdown above to Grading summary . Verify the no coding errors are displayed on grading summary. Make sure submitted is 0 and Groups count is 1 on grading summary table. Change to All participants , make sure the Groups count matches the number of groups you have created. Log in as student of the group 1 (G1) in a incognito window. Go to the assignment and do a submission. In the admin tab, select (G1) and reload, make sure Submitted count is now 1 . Switch the filter to other groups, make sure Submitted still 0 for (G2 and G3). Log in as a student of group (G3) and do a submission. In the admin tab, select (G3) and reload, make sure Submitted count is now 1 . Switch the filter to group 2 (G2), make sure Submitted still 0 for (G2) and 1 for (G1). Change to All participants , make sure the Submitted count matches the number of submissions you have created. VISIBLE GROUPS Create an assignment with the following settings : Submission types Check online text Group submission settings : Students submit in groups : Yes Grouping for student groups : select grouping you created(G1_G2) Common module settings : Group mode - visible groups Click save and display. Go to the assignment view page. Choose group G3 (not included in grouping G1_G2) on Visible groups dropdown above to Grading summary . Verify the no coding errors are displayed on grading summary. Make sure submitted is 0 and Groups count is 1 on grading summary table. Change to All participants , make sure the Groups count matches the number of groups you have created. Log in as student of the group 1 (G1) in a incognito window. Go to the assignment and do a submission. In the admin tab, select (G1) and reload, make sure Submitted count is now 1 . Switch the filter to other groups, make sure Submitted still 0 for (G2 and G3). Log in as a student of group (G3) and do a submission. In the admin tab, select (G3) and reload, make sure Submitted count is now 1 . Switch the filter to group 2 (G2), make sure Submitted still 0 for (G2) and 1 for (G1). Change to All participants , make sure the Submitted count matches the number of submissions you have created. NO GROUPS Create another assignment, this time using no groups. Log in with different students and submit something. Log in as admin make sure you don't get any coding error and the Submitted count matches the number of submission you have made.

      • Coding error on view assignment if a group is selected which is not included in grouping, when students submit in groups is enabled and grouping is selected in 'Grouping for student groups' and group mode is separate groups.

      Steps to reproduce:

      • Create at least 3 groups (G1, G2, G3) with some members.
      • Create a grouping (G1_G2) that includes 2 groups. There should be at least 1 group(G3(1)) which is not part of grouping and not an empty group.
      • Create an assignment with the following settings :
        Group submission settings :
        Students submit in groups - yes
        Grouping for student groups - select grouping you created(G1_G2)
        Common module settings :
        Group mode - separate groups
      • Click save and display.
      • Assignment view page display grading summary for all participants by default.
      • Choose group G3 (not included in grouping G1_G2) form separate groups drop-down above to Grading summary.

      Expected result: It should display Grading summary.
      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
      × Debug info: 
      Error code: codingerror
      × Stack trace:
      line 726 of /lib/dml/moodle_database.php: coding_exception thrown
      line 1840 of /mod/assign/locallib.php: call to moodle_database->get_in_or_equal()
      line 4780 of /mod/assign/locallib.php: call to assign->count_submissions_with_status()
      line 4844 of /mod/assign/locallib.php: call to assign->get_assign_grading_summary_renderable()
      line 594 of /mod/assign/locallib.php: call to assign->view_submission_page()
      line 52 of /mod/assign/view.php: call to assign->view()
      
      

            lameze Simey Lameze
            pinky Pinky Sharma
            Adrian Greeve Adrian Greeve
            David Monllaó David Monllaó
            Mark Nelson Mark Nelson
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

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