-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
3.10.3
-
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:
- Log in as a teacher and create a wiki.
- Edit the first page and add some text with at least one heading 2 in the content.
- Edit the wiki permissions and remove student as a role with the capability mod/wiki:createpage and mod/wiki:editpage.
- 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()