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

Removing a group assignment submission does not trigger event

XMLWordPrintable

    • MOODLE_311_STABLE, MOODLE_400_STABLE, MOODLE_401_STABLE
    • MOODLE_400_STABLE, MOODLE_401_STABLE
    • MDL-74433_401
    • Hide

      Test removal of user submission

      1. Create an assignment.
      2. Log in as a student and submit something.
      3. Click "Remove submission" on the submission status page and confirm.
      4. Log in as a teacher and look at the course logs.
      5. Verify that you see an event called "Submission removed".
      6. Verify that you see an event called "The status of the submission has been updated" directly above that.
      7. Filter the logs by the "Delete" action.
      8. Verify that you still see the "Submission removed" event.

      Test removal of group submission

      1. Create a group called "Foo" and add a student to it.
      2. Create a new assignment with group submission enabled.
      3. Log in as the student and submit something in the new assignment.
      4. Click "Remove submission" on the submission status page and confirm.
      5. Log in as a teacher and look at the course logs.
      6. Verify that you see a new event called "Submission removed" mentioning the group name "Foo".
      7. Verify that you see a new event called "The status of the submission has been updated" directly above that.
      8. Filter the logs by the "Delete" action.
      9. Verify that you still see the "Submission removed" event.
      Show
      Test removal of user submission Create an assignment. Log in as a student and submit something. Click "Remove submission" on the submission status page and confirm. Log in as a teacher and look at the course logs. Verify that you see an event called "Submission removed". Verify that you see an event called "The status of the submission has been updated" directly above that. Filter the logs by the "Delete" action. Verify that you still see the "Submission removed" event. Test removal of group submission Create a group called "Foo" and add a student to it. Create a new assignment with group submission enabled. Log in as the student and submit something in the new assignment. Click "Remove submission" on the submission status page and confirm. Log in as a teacher and look at the course logs. Verify that you see a new event called "Submission removed" mentioning the group name "Foo". Verify that you see a new event called "The status of the submission has been updated" directly above that. Filter the logs by the "Delete" action. Verify that you still see the "Submission removed" event.

      When a user removes a submission by his group to an assignment (referring to mod_assign), no event is triggered and thus no log entry is generated. This is due to this line in the remove_submission method, which triggers the submission_status_updated event, if the user ID of the submission is nonzero. In a group submission the user ID is zero; there is only a group ID. Unfortunately that if-statement is not followed by any logic that triggers a corresponding event, when the submission was made by a group. The method simply exits.

      I consider this a bug, and a serious one at that. The log shows removal of (user) submissions for good reason. That way a student cannot claim that his submission simply "disappeared", after he received confirmation of his submission. Failing to show this event in the log, simply because it is a group submission makes no sense. It is still a user (from that group or otherwise) that actively removes a submission. This must be logged.

      We just spent an entire day trying to figure out, why a submission seemingly "vanished" before realizing that it was, in fact, removed by a group participant, since the Moodle log did not show this event and the webserver access logs merely provided clues. This is not to nag, just to underscore why this is a serious problem.

      The solution should simply be to trigger an event when a group submission is removed.

        1. 400_group.png
          358 kB
          Ron Carl Alfon Yu
        2. 400.png
          338 kB
          Ron Carl Alfon Yu
        3. 401_group.png
          438 kB
          Ron Carl Alfon Yu
        4. 401.png
          417 kB
          Ron Carl Alfon Yu
        5. master_group.png
          440 kB
          Ron Carl Alfon Yu
        6. master.png
          361 kB
          Ron Carl Alfon Yu

            bonczek Lars Bonczek
            danberg Daniil Fajnberg
            Mathew May Mathew May
            Ilya Tregubov Ilya Tregubov
            Ron Carl Alfon Yu Ron Carl Alfon Yu
            Votes:
            5 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 4 hours, 2 minutes
                4h 2m

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