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

course/resources.php displays resources in stealth sections or 'stealth resources'.

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 2.7.10, 2.8.8, 2.9.2, 3.0
    • Fix Version/s: None
    • Component/s: Course
    • Testing Instructions:
      Hide
      1. In an 'Editing teacher' role.
      2. In a course, set the number of sections to two.
      3. Set the format to 'Topics'.
      4. Turn editing on and add a resource of any type to each section.
      5. Using the minus sign at the end of the section list and click to reduce by one.
      6. Confirm that section two is now stated as a 'Stealth' section being 'Orphaned activities (section 2)'.
      7. Add an 'Activities' block to the course page.
      8. Turn editing off.
      9. Confirm that the resource in section two is no longer displayed.
      10. Navigate to the 'Activities' block and click on 'Resources'.
      11. Confirm that only the resource in section one is displayed.
      12. Using the 'Administration' block, turn editing on.
      13. Confirm that the resources in section one and two are displayed.
      14. Using the 'Administration' block, switch role to 'Student'.
      15. Confirm that only the resource in section one is displayed.
      Show
      In an 'Editing teacher' role. In a course, set the number of sections to two. Set the format to 'Topics'. Turn editing on and add a resource of any type to each section. Using the minus sign at the end of the section list and click to reduce by one. Confirm that section two is now stated as a 'Stealth' section being 'Orphaned activities (section 2)'. Add an 'Activities' block to the course page. Turn editing off. Confirm that the resource in section two is no longer displayed. Navigate to the 'Activities' block and click on 'Resources'. Confirm that only the resource in section one is displayed. Using the 'Administration' block, turn editing on. Confirm that the resources in section one and two are displayed. Using the 'Administration' block, switch role to 'Student'. Confirm that only the resource in section one is displayed.
    • Workaround:
      Hide

      None.

      Show
      None.
    • Affected Branches:
      MOODLE_27_STABLE, MOODLE_28_STABLE, MOODLE_29_STABLE, MOODLE_30_STABLE

      Description

      When resources are placed in a 'stealth section' they are only shown when editing is on. However if you have an 'Activities' block (Activity Module Block) and access via the 'Resources' link the file '/course/resources.php' then the resources are shown to the user.

      A user will place activities / resources in a stealth section to 'hide' them from the user such that only a link etc. will gain them access when perhaps some activity has been completed.

      Therefore stealth resources on this page should only be presented to users with the 'moodle/course:update' capability and when editing is on as they are in 'print_multiple_section_page' of '/course/format/renderer.php'.

      Discovered in M2.9 but suspect affects M2.8 too.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

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

                  Dates

                  • Created:
                    Updated: