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

mod/wiki:managewiki required to restore a page from Wiki history

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.2, 2.2.4, 2.4.9, 2.5.5, 2.6.2, 2.7
    • Fix Version/s: 2.5.6, 2.6.3
    • Component/s: Wiki (2.x)
    • Labels:
    • Testing Instructions:
      Hide
      1. As a teacher, create a collaborative wiki activity
      2. As a student...
        1. Make a few different modifications to a page
        2. Look at the history tab and click on version 1
        3. Restore this version, make sure new the content is restored and new revision is created
      Show
      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 Master Branch:
      wip-MDL-32699-master

      Description

      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

      Expected behaviour
      ==================
      Previous version should be successfully restored.

      Actual behaviour
      ================
      Error message: "Manage wiki permission needed"

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                12/May/14