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

Forum does not honor capabilities at module context (namely viewhiddenactivities)

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.7, 2.7.1, 2.7.2
    • Fix Version/s: 2.6.6, 2.7.3
    • Component/s: Forum
    • Labels:
    • Database:
      Any
    • Testing Instructions:
      Hide
      1. For each of the affected modules:
        • forum
        • glossary
        • scorm
      2. Create an instance of the activity
      3. Hide that activity
      4. Assign the role of "Teacher" to at student within the module context
      5. Login as the student
        • Confirm that you can view those hidden activities
      6. Change the course format to Single Activity Format and select Forum
      7. Save changes
        • Confirm that you can view the course as the student
      8. Login as Admin
      9. Switch to the front page
      10. Create an instance of the activity
      11. Hide that activity
      12. Assign the role of "Teacher" to at student within the module context
      13. Login as the student
        • Confirm that you can view those hidden activities
      Show
      For each of the affected modules: forum glossary scorm Create an instance of the activity Hide that activity Assign the role of "Teacher" to at student within the module context Login as the student Confirm that you can view those hidden activities Change the course format to Single Activity Format and select Forum Save changes Confirm that you can view the course as the student Login as Admin Switch to the front page Create an instance of the activity Hide that activity Assign the role of "Teacher" to at student within the module context Login as the student Confirm that you can view those hidden activities
    • Affected Branches:
      MOODLE_27_STABLE
    • Fixed Branches:
      MOODLE_26_STABLE, MOODLE_27_STABLE
    • Pull Master Branch:
      MDL-47183-master

      Description

      Steps to reproduce:
      1. create a forum
      2. hide forum
      3. assing local role of "teacher" or "non-editing teacher" in this forum to a student
      4. student should be able to use forum.

      Cause:
      post.php checks course context, it should check module context.

      Solution:
      check attached patch

      Might be related to:
      MDL-18094 and MDLSITE-464

      This kind of check error might exist in other components.

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                10/Nov/14