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

Review and finish file API support in workshop

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.2
    • Fix Version/s: 2.3
    • Component/s: Workshop
    • Labels:
    • Testing Instructions:
      Hide

      Testing difficulty: easy, although can be a bit time consuming

      1. Prepare a course with at least one teacher and two students enrolled
      2. Prepare a new workshop instance (no need to define the assessment form). Embed some image into the workshop description (introduction) field, instructions for authors field and instructions for reviewers field. Switch the workshop into the submission phase.
      3. Log in as student #1 and submit their work. Use some embedded images in the submission text and attach some files to the submission.
      4. Log in as student #2 and let them submit their work including files, too.
      5. Log in as the teacher, invoke the filepicker somewhere in the course (eg. edit a section summary)
      6. TEST: Make sure that Server files repository provides access for the teacher to all files in the workshop (in intro, both instruction fields and the submissions)
      7. Copy the URL of the image embedded into the text submitted by student #1 (something like http://site/pluginfile.php?file=/42/mod_workshop/etc/etc)
      8. Log in as the student #2
      9. TEST: Paste the image URL into the address bar and make sure that the file is not loaded (file not found screen or something like that should appear)
      10. Log in as the teacher again. Using the manual allocation method, make the student #2 be the reviewer of the submission by student #1
      11. Log in as the student #2
      12. TEST: Repeat the TEST from the step 9 - paste the URL of the file into the address bar again. The file should be served normally as the logged in user is the reviewer of the submission now.

      This is enough to test to pass the issue. If you are interested, you can try other scenarios as a bonus:

      • Users with the capability "View all submissions" in the workshop should be able to see files from all submissions in the no groups and visible groups mode.
      • Users with the capability "View all submissions" and "Access all groups" should be able to see files from all submissions in the separate groups mode.
      • In the separate groups mode, users with the capability "View all submissions" that do not have access to all groups should be able to see files only from those submissions, where they share at least one group with the author of the submission.
      Show
      Testing difficulty: easy, although can be a bit time consuming 1. Prepare a course with at least one teacher and two students enrolled 2. Prepare a new workshop instance (no need to define the assessment form). Embed some image into the workshop description (introduction) field, instructions for authors field and instructions for reviewers field. Switch the workshop into the submission phase. 3. Log in as student #1 and submit their work. Use some embedded images in the submission text and attach some files to the submission. 4. Log in as student #2 and let them submit their work including files, too. 5. Log in as the teacher, invoke the filepicker somewhere in the course (eg. edit a section summary) 6. TEST: Make sure that Server files repository provides access for the teacher to all files in the workshop (in intro, both instruction fields and the submissions) 7. Copy the URL of the image embedded into the text submitted by student #1 (something like http://site/pluginfile.php?file=/42/mod_workshop/etc/etc ) 8. Log in as the student #2 9. TEST: Paste the image URL into the address bar and make sure that the file is not loaded (file not found screen or something like that should appear) 10. Log in as the teacher again. Using the manual allocation method, make the student #2 be the reviewer of the submission by student #1 11. Log in as the student #2 12. TEST: Repeat the TEST from the step 9 - paste the URL of the file into the address bar again. The file should be served normally as the logged in user is the reviewer of the submission now. This is enough to test to pass the issue. If you are interested, you can try other scenarios as a bonus: Users with the capability "View all submissions" in the workshop should be able to see files from all submissions in the no groups and visible groups mode. Users with the capability "View all submissions" and "Access all groups" should be able to see files from all submissions in the separate groups mode. In the separate groups mode, users with the capability "View all submissions" that do not have access to all groups should be able to see files only from those submissions, where they share at least one group with the author of the submission.
    • Affected Branches:
      MOODLE_22_STABLE
    • Fixed Branches:
      MOODLE_23_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-32638-workshop-files

      Description

      The File API support in workshop 2.x has some todos left and thing to fix:

      • files access control (at the moment, we do not check if the user is allowed to get the file which is pretty critical)
      • file browsing support (this used to work in 2.0dev but then some changes in the core made it non-working again)

        Gliffy Diagrams

          Attachments

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  25/Jun/12