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

Users without the permission to edit wiki pages should not see edit links

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • 3.10.3
    • Wiki (2.x)
    • MOODLE_310_STABLE

      As reported by James Thomas in the discussion Edit buttons when students can't edit and reproduced on the Sandbox demo site:

      1. Log in as a teacher and create a wiki.
      2. Edit the first page and add some text with at least one heading 2 in the content.
      3. Edit the wiki permissions and remove student as a role with the capability mod/wiki:createpage and mod/wiki:editpage.
      4. Log out then log in as a student and go to the wiki.

      Expected result: The student can view the wiki but, because they can't edit pages, there are no edit links shown.

      Actual result: There is no edit tab, however there are edit links in the table of contents and next to the headings in the page (as shown in the attached screenshot). If you click an edit link you get the following error:

      You can not edit this page.

      ×Debug info:
      Error code: cannoteditpage
      ×Stack trace:
      line 498 of /lib/setuplib.php: moodle_exception thrown
      line 80 of /mod/wiki/edit.php: call to print_error()

            Unassigned Unassigned
            tsala Helen Foster
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.