Moodle
  1. Moodle
  2. MDL-37522

Students unable to open published submissions

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.3.4, 2.4.1, 2.5
    • Fix Version/s: 2.3.5, 2.4.2
    • Component/s: Workshop
    • Labels:
    • Testing Instructions:
      Hide

      Testing difficulty: easy

      1. Prepare a workshop activity with at least two students (let us call them Arnold and Sylvester) participating. Make sure to set "Submission settings > Maximum number of submission attachments" to a number higher than 0.
      2. During the Submission phase, log in as Arnold and submit a work containing files both embedded into the submission text and attached to the submission.
      3. Log in as Sylvester and again, submit your work containing files in both areas.
      4. Close the workshop activity and publish Arnold's submission.
      5. TEST: Make sure that Sylvester is able to see Arnold's submission including all images.
      6. TEST: Make sure Arnold is not able to see Sylvester's submission nor files in it (using direct URL).
      Show
      Testing difficulty: easy Prepare a workshop activity with at least two students (let us call them Arnold and Sylvester) participating. Make sure to set "Submission settings > Maximum number of submission attachments" to a number higher than 0. During the Submission phase, log in as Arnold and submit a work containing files both embedded into the submission text and attached to the submission. Log in as Sylvester and again, submit your work containing files in both areas. Close the workshop activity and publish Arnold's submission. TEST: Make sure that Sylvester is able to see Arnold's submission including all images. TEST: Make sure Arnold is not able to see Sylvester's submission nor files in it (using direct URL).
    • Affected Branches:
      MOODLE_23_STABLE, MOODLE_24_STABLE, MOODLE_25_STABLE
    • Fixed Branches:
      MOODLE_23_STABLE, MOODLE_24_STABLE
    • Pull from Repository:
    • Pull 2.4 Branch:
      MDL-37522-published-attachment_24
    • Pull Master Branch:
      MDL-37522-published-attachment
    • Rank:
      47169

      Description

      Published submissions throw an error if student is not submitter or reviewer.

      Steps to reproduce:

      • Enable "Publish submission" for a submission in workshop
      • With a participant (student role) who is neither the submitter nor reviewer try to open the submission.
      • The user gets a "Sorry, the requested file could not be found" error

      As far as I understand the user should be allowed to open the submission if the submission is published and the user has the capability mod/workshop:viewpublishedsubmissions. However, there is no such condition in mod/workshop/lib.php.

      The error is thrown in mod/workshop/lib.php, line 1254 (Version 2.3.4 (Build: 20130114))
      http://git.moodle.org/gw?p=moodle.git;a=blob;f=mod/workshop/lib.php;h=cf37a23521b7c60fd48e70665e6af16a0fd7269d;hb=refs/heads/MOODLE_23_STABLE#l1254

      This issue is related to MDL-32638.

        Issue Links

          Activity

          Hide
          David Mudrak added a comment -

          Well spotted! Thanks a lot for the report. Increasing the priority of this and will look at this asap.

          Show
          David Mudrak added a comment - Well spotted! Thanks a lot for the report. Increasing the priority of this and will look at this asap.
          Hide
          David Mudrak added a comment -

          Submitting for integration.

          Show
          David Mudrak added a comment - Submitting for integration.
          Hide
          Heiko Schach added a comment -

          Great. Thanks for fixing this.
          Just tested it on our site. Works just as it should.

          Show
          Heiko Schach added a comment - Great. Thanks for fixing this. Just tested it on our site. Works just as it should.
          Hide
          David Mudrak added a comment -

          Thanks a lot Heiko for confirming the fix. And thanks also for that Dublin pub suggestion Unfortunately I have not managed to get there, so I have to leave it for the next time.

          Show
          David Mudrak added a comment - Thanks a lot Heiko for confirming the fix. And thanks also for that Dublin pub suggestion Unfortunately I have not managed to get there, so I have to leave it for the next time.
          Hide
          Eloy Lafuente (stronk7) added a comment -

          I don't like specially the harcoded phase = 50, but I bet you've a good reason for not including locallib there, have you?

          Show
          Eloy Lafuente (stronk7) added a comment - I don't like specially the harcoded phase = 50, but I bet you've a good reason for not including locallib there, have you?
          Hide
          David Mudrak added a comment -

          I don't like the hardcoded value too, for sure. However, including the whole locallib.php for each served file just to have that class constant available would be worse IMHO.

          Show
          David Mudrak added a comment - I don't like the hardcoded value too, for sure. However, including the whole locallib.php for each served file just to have that class constant available would be worse IMHO.
          Hide
          Eloy Lafuente (stronk7) added a comment -

          Integrated (23, 24 & master), thanks!

          Show
          Eloy Lafuente (stronk7) added a comment - Integrated (23, 24 & master), thanks!
          Hide
          Ankit Agarwal added a comment -

          This works as described. However I was not able to see the publish option as admin during assessment phase, was able to see only in evaluation phase. David is looking into it. Since this is not related passing this issue.
          Thanks

          Show
          Ankit Agarwal added a comment - This works as described. However I was not able to see the publish option as admin during assessment phase, was able to see only in evaluation phase. David is looking into it. Since this is not related passing this issue. Thanks
          Hide
          Eloy Lafuente (stronk7) added a comment -

          This is valid for unlimited entries to the, soon to be unveiled, Moodle Codebase Gardens. It includes free access to all facilities.

          Personal and non-transferable to all assignees, reviewers and testers in this issue. Valid until switching to Blackboard (100000€ penalization will be applied).

          Thanks, closing as fixed!

          Show
          Eloy Lafuente (stronk7) added a comment - This is valid for unlimited entries to the, soon to be unveiled, Moodle Codebase Gardens. It includes free access to all facilities. Personal and non-transferable to all assignees, reviewers and testers in this issue. Valid until switching to Blackboard (100000€ penalization will be applied). Thanks, closing as fixed!

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: