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

Folder resource content not visible for anonymous user (guest access)

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.3.1, 2.4
    • Fix Version/s: 2.3.3
    • Component/s: Filepicker, Resource
    • Labels:
    • Testing Instructions:
      Hide
      1. Create folder module on the front page and add some image and non-image files in it
      2. Create course accessible to users and add folder in it also with image and non-image files
      3. Log out and attempt to view those modules, make sure all files are displayed and can be downloaded
      Show
      Create folder module on the front page and add some image and non-image files in it Create course accessible to users and add folder in it also with image and non-image files Log out and attempt to view those modules, make sure all files are displayed and can be downloaded
    • Affected Branches:
      MOODLE_23_STABLE, MOODLE_24_STABLE
    • Fixed Branches:
      MOODLE_23_STABLE
    • Pull Master Branch:
      wip-MDL-34338-master

      Description

      In courses where Guest access enrolment method enabled, content of folder resources is not displayed for guest user. However, content of folder is accessible via URL (one can download files when knowing the URL).

      Steps to reproduce:

      1. Create a course and enable Guest access enrolment method
      2. As a teacher, create a Folder resource in the course and upload a file in it
      3. Take note of the direct URL of the uploaded file in the folder resource
      4. Logout
      5. Without logging in, go to the above created course home page and click on the link to the folder resource
      6. Observe that no files are displayed and the folder seems empty
      7. Paste URL (copied previously) in URL browser field
      8. Observe that the file can be downloaded

      Expected behaviour: The folder resource should display all files and subfolders of the folder resource, even for guests

      Actual behaviour: No folder content is displayed and the following error is shown.

      Fatal error: Call to a member function get_url() on a non-object in D:\xampp\htdocs\moodle_testing\mod\folder\renderer.php on line 70

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Votes:
                  16 Vote for this issue
                  Watchers:
                  20 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    12/Nov/12