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

Portfolio "export whole discussion" button should not be visible if the user has inadequate permissions

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.7
    • Fix Version/s: None
    • Component/s: Forum
    • Affected Branches:
      MOODLE_37_STABLE

      Description

      When portfolios are enabled on the forum, there is a button to "Export whole discussion to portfolio". If the user is a student with default permissions, clicking on this button will result in the following being displayed:

      Sorry but you do not have the required permissions to export files from this area
      

      Really this button should not be visible if the user does not have adequate permissions.

      Edit by Kathrin Osswald:
      Steps to reproduce

      Prerequisites: Course with teacher T and student S enrolled.

      1. Login as admin
      2. Enable setting enableportfolios
      3. Go to Site administration > Plugins > Portfolios > Manage portfolios and set the value for the portfolio plugin File download to Enabled and visible
      4. Logout
      5. Login as as teacher T
      6. Go to the course, turn editing mode on and add a forum to the course
      7. Create a new topic
      8. Open this topic and click on the button "Export whole discussion to portfolio"
      9. See that a new export page is showed
      10. Logout
      11. Login as student S
      12. Go to the course
      13. Open the forum
      14. Open the topic
      15. Click on the button "Export whole discussion to portfolio"
      16. Then you should see the error message "Sorry but you do not have the required permissions to export files from this area"

      Error Message

      Debug info: Error code: nopermissions
      Stack trace: line 188 of /portfolio/add.php: portfolio_caller_exception thrown
      

      Expected Behavior
      The button should not be visible to users without the capability mod/forum:exportdiscussion

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated: