Affects Version/s: 2.2, 2.2.4, 2.4.9, 2.5.5, 2.6.2, 2.7
Component/s: Wiki (2.x)
- As a teacher, create a collaborative wiki activity
- As a student...
- Make a few different modifications to a page
- Look at the history tab and click on version 1
- Restore this version, make sure new the content is restored and new revision is created
Affected Branches:MOODLE_22_STABLE, MOODLE_24_STABLE, MOODLE_25_STABLE, MOODLE_26_STABLE, MOODLE_27_STABLE
Fixed Branches:MOODLE_25_STABLE, MOODLE_26_STABLE
Pull from Repository:
Pull Master Branch:wip-
Pull Master Diff URL:
The "restore this version" link, on a page viewed via the wiki history, gives an error when clicked by a student.
Since students are able, by default, to edit wiki pages as much as they like, they should also be able to restore pages from the history.
However, line 1864 of /mod/wiki/pagelib.php forbids this, because it requires the mod/wiki:managewiki capability, which is normally used to restrict access to the wiki settings.
Steps to reproduce
1. As editor, create a new wiki, Wiki-1, and add some content to it
2. As student, make some changes to the content of Wiki-1
3. As student, click History, then click on version 1
4. Click the "restore this version" link
Previous version should be successfully restored.
Error message: "Manage wiki permission needed"