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

test_get_submission_status_in_submission_status_for_teacher fails when groups are 9 and 10

    XMLWordPrintable

    Details

    • Sprint:
      Moppies Kanban

      Description

      The mentioned unittest fails when the groups which it creates during its execution are named "group_9" and "group_10". Also see MDL-70110#comment-828621 where the issue was discovered.

      After first testing this issue does not happen when the group numbers are 1 higher ("group_10"/"group_11") or when they are padded with zeros ("group_09"/"group_10") suggesting that this is due to some sorting.

      Furthermore the tests seem to be run with a teacher as the active user. The method call leading to the error (mod_assign_external::get_submission_status) tries to get the status without passing a groupid or userid. According to the documentation the function then auto-selects the group based on user id. I assume this mechanism somehow sorts the groups and (as the teacher has access to both groups) returns the first (alphabetically).

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              amaia Amaia Anabitarte
              Reporter:
              septatrix septatrix
              Peer reviewer:
              Carlos Escobedo
              Integrator:
              Andrew Nicols
              Tester:
              Andrew Nicols
              Participants:
              Component watchers:
              Andrew Nicols, Dongsheng Cai, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, Andrew Nicols, Dongsheng Cai, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                10/May/21

                  Time Tracking

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