Moodle
  1. Moodle
  2. MDL-23848

Assignments for students without submit capability can not view previous submissions

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 1.9.9
    • Fix Version/s: 1.9.10
    • Component/s: Assignment (2.2)
    • Labels:
      None
    • Database:
      Any
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE

      Description

      When a student has both the assignment:view and assignment:submit capability, they are allowed to do both for assignments, as expected. However, when a student is no longer allowed to submit (eg: assignment:submit capability removed), and they still are allowed to assignment:view, they are still not allowed to see previous submissions for assignment as expected.

      Provided is a patch Created by Manuel Garcia for the assignment module, as well as patches for the online and upload assignment types (which were the only types in the standard Moodle build that required patching). This patch was created using MOODLE_199 build.

      Related Issues:

      Potentially Related Issues:

      Please review this patch and provide feedback.

      Thanks!

      • Michael Avelar

        Gliffy Diagrams

        1. assignment_patch_2010082500.diff
          7 kB
          Michael Avelar
        2. assignment_patch_2010082500.diff
          6 kB
          Michael Avelar
        3. assignment_patch.diff
          6 kB
          Michael Avelar
        4. MDL-23848.19.patch
          9 kB
          Sam Hemelryk

          Issue Links

            Activity

            Hide
            Michael Avelar added a comment -

            Fixed a bug where teachers and admins were being displayed in assignment submission report. Now only displays users with gradebook roles.

            Show
            Michael Avelar added a comment - Fixed a bug where teachers and admins were being displayed in assignment submission report. Now only displays users with gradebook roles.
            Hide
            Sam Hemelryk added a comment -

            Hi guys,

            First up thank you for the report and the patch.

            I've just been through the patch and tidied a couple of things up such as capability checks that were not required (due to preceding require_cap calls) and some general logic, and I've just attached the revised patch.
            I've done a bit of testing on it and thinks seem ok presently and still appear secure, however I think it is best we get an OK on the patch from Martin or Petr before it gets commit. I've added both as watchers on this issue.
            The patch I've attached guys is for M1.9, I'll commit and merge to head if one of you two is happy with it.

            Cheers
            Sam

            Show
            Sam Hemelryk added a comment - Hi guys, First up thank you for the report and the patch. I've just been through the patch and tidied a couple of things up such as capability checks that were not required (due to preceding require_cap calls) and some general logic, and I've just attached the revised patch. I've done a bit of testing on it and thinks seem ok presently and still appear secure, however I think it is best we get an OK on the patch from Martin or Petr before it gets commit. I've added both as watchers on this issue. The patch I've attached guys is for M1.9, I'll commit and merge to head if one of you two is happy with it. Cheers Sam
            Hide
            Petr Skoda added a comment -

            The assignment:view was meant to allow viewing of the text that tells you what to do, not the submission itself. Ideally we should have a separate DB field for assignment description and "instructions". At present there is still the nasty problem with description hiding in calendar.

            Maybe we could do something like this:
            all guests and students - read the assignment description (could be empty)
            mod/assignment:view - read the instructions before the submission period starts and after it ends (current description would be migrated here)
            mod/assignment:submit + time restrictions - send text or file
            mod/assignment:reviewownsubmission - look at own submission after the submission ends

            my -1 for HEAD for now

            Show
            Petr Skoda added a comment - The assignment:view was meant to allow viewing of the text that tells you what to do, not the submission itself. Ideally we should have a separate DB field for assignment description and "instructions". At present there is still the nasty problem with description hiding in calendar. Maybe we could do something like this: all guests and students - read the assignment description (could be empty) mod/assignment:view - read the instructions before the submission period starts and after it ends (current description would be migrated here) mod/assignment:submit + time restrictions - send text or file mod/assignment:reviewownsubmission - look at own submission after the submission ends my -1 for HEAD for now
            Hide
            Petr Skoda added a comment -

            Anyway, please discuss it with Martin or any other newly appointed module maintainer. Above is my personal view explaining the history of the code and my previous plans only.

            Show
            Petr Skoda added a comment - Anyway, please discuss it with Martin or any other newly appointed module maintainer. Above is my personal view explaining the history of the code and my previous plans only.
            Hide
            Sam Hemelryk added a comment -

            Hi Petr, thanks for the feedback.

            I had wondered whether introducing new caps would be a better solution, I'm happy to hold off on this until we have a plan on how assignment will change in 2.1.
            Will see what Martin has to say.

            Cheers
            Sam

            Show
            Sam Hemelryk added a comment - Hi Petr, thanks for the feedback. I had wondered whether introducing new caps would be a better solution, I'm happy to hold off on this until we have a plan on how assignment will change in 2.1. Will see what Martin has to say. Cheers Sam
            Hide
            Martin Dougiamas added a comment -

            I can't see any problem allowing students to view their own previous submissions on the view page. I think it's what people would expect and I can't see any security issues there. We can easily split it to a new cap later in 2.1 if required.

            Show
            Martin Dougiamas added a comment - I can't see any problem allowing students to view their own previous submissions on the view page. I think it's what people would expect and I can't see any security issues there. We can easily split it to a new cap later in 2.1 if required.
            Hide
            Ryan Smith added a comment -

            It looks like a fix for this was committed to MOODLE_19_STABLE today. With this update, using the drop-down menu for groups no longer works. It always shows all participants, and not the specific group you've selected.

            Show
            Ryan Smith added a comment - It looks like a fix for this was committed to MOODLE_19_STABLE today. With this update, using the drop-down menu for groups no longer works. It always shows all participants, and not the specific group you've selected.
            Hide
            Sam Hemelryk added a comment -

            Thanks for reporting that Ryan, I'll look into first thing this morning.

            Show
            Sam Hemelryk added a comment - Thanks for reporting that Ryan, I'll look into first thing this morning.
            Hide
            Sam Hemelryk added a comment -

            Hi guys,

            I have fixed up the regression now (thanks for spotting Ryan) and have merged to head.

            Cheers
            Sam

            Show
            Sam Hemelryk added a comment - Hi guys, I have fixed up the regression now (thanks for spotting Ryan) and have merged to head. Cheers Sam
            Hide
            Ryan Smith added a comment -

            I just tested the new file and groups work great now. Thanks Sam!

            Show
            Ryan Smith added a comment - I just tested the new file and groups work great now. Thanks Sam!
            Hide
            Petr Skoda added a comment -

            Looks like this caused a serious regression reported in MDL-24469, please evaluate the report.

            Show
            Petr Skoda added a comment - Looks like this caused a serious regression reported in MDL-24469 , please evaluate the report.
            Hide
            Sam Hemelryk added a comment -

            Resolving again.
            The linked blocker is now resolved. It was an issue with that arose if a site had no gradeable roles.

            Cheers
            Sam

            Show
            Sam Hemelryk added a comment - Resolving again. The linked blocker is now resolved. It was an issue with that arose if a site had no gradeable roles. Cheers Sam

              People

              • Votes:
                1 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: