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

Wiki 2.0 does not respect 'visible groups' functionality.

    Details

    • Database:
      Any
    • Testing Instructions:
      Hide

      See duplication instructions.

      Show
      See duplication instructions.
    • Affected Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE, MOODLE_22_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE

      Description

      The wiki tool no longer works for visible groups.

      To reproduce:

      1. Set up some groups and enrol some students in the course & groups.
      2. Set up a new wiki and set to 'visible groups' mode.
      3. Log in as one of the students.
      4. Edit a page in your group's wiki - no problem, I can edit it, which is good.
      5. Change the group in the drop-down to show another group page.
      => You can edit this other group's page, even though its a Visible Group - very NOT GOOD as it should only allow you to view, but not edit, as it did in Moodle 1.9.

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            tsala Helen Foster added a comment -

            Mark, thanks for your report with clear steps to reproduce. Increasing priority and hoping this issue can be fixed soon.

            Show
            tsala Helen Foster added a comment - Mark, thanks for your report with clear steps to reproduce. Increasing priority and hoping this issue can be fixed soon.
            Hide
            nebgor Aparup Banerjee added a comment -

            just linking a similar issue.

            Show
            nebgor Aparup Banerjee added a comment - just linking a similar issue.
            Hide
            mayank_gupta2005 Mayank Gupta added a comment -

            Hello, I created two patches [1], [2] to allow only group members to edit the Wiki in 'visible groups' mode.

            [1] - In this patch the edit tab is not disabled, i.e., when a group member changes group to 'other group' the edit tab still shows up (though, he/she is not allowed to edit the same).
            This patch has no dependency on the fix for MDL-26577.

            [2] - In this patch the edit tab is disabled, i.e., when a group member changes to 'other group' the edit tab does not show up (as he/she is not allowed to edit the same. Care has been taken to allow, users with capability - mod/wiki:manage 'and' mod/wiki:editpage to be able to edit the same.)
            This patch has dependency on the fix for MDL-26577. If the members toggle between the groups the edit tab will not be disabled/enabled but restores to the required on a page refresh.

            [1] - https://github.com/mayankgupta/moodle/commit/98f493f6e69a090355efa3bd70e01d5242a79d21

            [2] - https://github.com/mayankgupta/moodle/commit/2eaf4b36acc0c3efd2af8d16a47ea0732beb5a42

            I will be happy to modify it, if required.

            Thanks,
            Mayank.

            Show
            mayank_gupta2005 Mayank Gupta added a comment - Hello, I created two patches [1] , [2] to allow only group members to edit the Wiki in 'visible groups' mode. [1] - In this patch the edit tab is not disabled, i.e., when a group member changes group to 'other group' the edit tab still shows up (though, he/she is not allowed to edit the same). This patch has no dependency on the fix for MDL-26577. [2] - In this patch the edit tab is disabled, i.e., when a group member changes to 'other group' the edit tab does not show up (as he/she is not allowed to edit the same. Care has been taken to allow, users with capability - mod/wiki:manage 'and' mod/wiki:editpage to be able to edit the same.) This patch has dependency on the fix for MDL-26577. If the members toggle between the groups the edit tab will not be disabled/enabled but restores to the required on a page refresh. [1] - https://github.com/mayankgupta/moodle/commit/98f493f6e69a090355efa3bd70e01d5242a79d21 [2] - https://github.com/mayankgupta/moodle/commit/2eaf4b36acc0c3efd2af8d16a47ea0732beb5a42 I will be happy to modify it, if required. Thanks, Mayank.
            Hide
            tsala Helen Foster added a comment -

            Mayank, thanks for your patches. Adding groups expert Petr as a watcher and hoping he has chance to review the patches.

            Show
            tsala Helen Foster added a comment - Mayank, thanks for your patches. Adding groups expert Petr as a watcher and hoping he has chance to review the patches.
            Hide
            mayank_gupta2005 Mayank Gupta added a comment -

            Helen, Thanks for adding Petr. As discussed with you, while writing the patch above I noticed a couple of more issues with the Wiki in visiblegroups.
            To reproduce the issues -
            1. Create a Wiki, in 'visiblegroups' group mode and Wiki mode individual or collaborative.
            2. Just 'save and return', do not create subwiki pages.
            3. Login with a student enrolled in a group say A.
            4. Switch Group to 'othergroup' say Group B, the student can create a wiki page for 'other group' B. (For wiki in collaborative mode). It should not be able to create a page for the 'other group'.
            5. If wiki is in individual mode, the student can then also create a wiki page for 'other students'.

            I have worked on a patch for it -

            https://github.com/mayankgupta/moodle/commit/95fa6fddca66a30ca659011b6699d6efe121e144

            Thanks,
            Mayank.

            Show
            mayank_gupta2005 Mayank Gupta added a comment - Helen, Thanks for adding Petr. As discussed with you, while writing the patch above I noticed a couple of more issues with the Wiki in visiblegroups. To reproduce the issues - 1. Create a Wiki, in 'visiblegroups' group mode and Wiki mode individual or collaborative. 2. Just 'save and return', do not create subwiki pages. 3. Login with a student enrolled in a group say A. 4. Switch Group to 'othergroup' say Group B, the student can create a wiki page for 'other group' B. (For wiki in collaborative mode). It should not be able to create a page for the 'other group'. 5. If wiki is in individual mode, the student can then also create a wiki page for 'other students'. I have worked on a patch for it - https://github.com/mayankgupta/moodle/commit/95fa6fddca66a30ca659011b6699d6efe121e144 Thanks, Mayank.
            Hide
            skodak Petr Skoda added a comment -

            After a few minutes I have discovered a lot more issues in mod/wiki, I am sorry I have to give up because it is in my opinion not fixable. The details are described in MDL-27218 (security issue with restricted access, sorry).

            Petr

            Show
            skodak Petr Skoda added a comment - After a few minutes I have discovered a lot more issues in mod/wiki, I am sorry I have to give up because it is in my opinion not fixable. The details are described in MDL-27218 (security issue with restricted access, sorry). Petr
            Hide
            stuart Peter Ruthven-Stuart added a comment -

            Mark, Thanks for your report. I posted a similar one (MDL-27306) before realising it duplicated your report.

            Personally, I think the priority of this issue should be promoted to 'Blocker'. This issue, coupled with the fact that wiki pages can't be deleted (MDL-27335) makes the Wiki module even less viable.

            Despite its problems, at least the standard wiki module in 1.9 allowed for this 'core feature' (i.e. the ability of groups to edit a single wiki but not that of other groups). To have it taken away is seriously disappointing.

            Show
            stuart Peter Ruthven-Stuart added a comment - Mark, Thanks for your report. I posted a similar one ( MDL-27306 ) before realising it duplicated your report. Personally, I think the priority of this issue should be promoted to 'Blocker'. This issue, coupled with the fact that wiki pages can't be deleted ( MDL-27335 ) makes the Wiki module even less viable. Despite its problems, at least the standard wiki module in 1.9 allowed for this 'core feature' (i.e. the ability of groups to edit a single wiki but not that of other groups). To have it taken away is seriously disappointing.
            Hide
            tsala Helen Foster added a comment -

            Increasing priority as suggested.

            Show
            tsala Helen Foster added a comment - Increasing priority as suggested.
            Show
            granludo Ludo ( Marc Alier) added a comment - Reviewing the patch provided https://github.com/mayankgupta/moodle/commit/95fa6fddca66a30ca659011b6699d6efe121e144
            Hide
            granludo Ludo ( Marc Alier) added a comment -

            Looks like this bug was originated during the changes introduced in the wiki during its move to core. We can either take back our code from may 2010 or apply the patch provided
            at
            https://github.com/mayankgupta/moodle/commit/95fa6fddca66a30ca659011b6699d6efe121e144
            We have reviewed it and it work fine pus solves another bug related.

            Show
            granludo Ludo ( Marc Alier) added a comment - Looks like this bug was originated during the changes introduced in the wiki during its move to core. We can either take back our code from may 2010 or apply the patch provided at https://github.com/mayankgupta/moodle/commit/95fa6fddca66a30ca659011b6699d6efe121e144 We have reviewed it and it work fine pus solves another bug related.
            Hide
            mblake Michael Blake added a comment -

            This issue is affecting MP clients. Please give it priority.

            Show
            mblake Michael Blake added a comment - This issue is affecting MP clients. Please give it priority.
            Hide
            rajeshtaneja Rajesh Taneja added a comment -

            Patch https://github.com/mayankgupta/moodle/commit/95fa6fddca66a30ca659011b6699d6efe121e144 seems to be good and solving the issue, hence pushing it for integration review

            Show
            rajeshtaneja Rajesh Taneja added a comment - Patch https://github.com/mayankgupta/moodle/commit/95fa6fddca66a30ca659011b6699d6efe121e144 seems to be good and solving the issue, hence pushing it for integration review
            Hide
            nebgor Aparup Banerjee added a comment -

            This has been cleaned, cherry-picked onto 20, 21 and master. Up for testing.

            Show
            nebgor Aparup Banerjee added a comment - This has been cleaned, cherry-picked onto 20, 21 and master. Up for testing.
            Hide
            abgreeve Adrian Greeve added a comment -

            This fixes the editing problems. It is no longer possible to edit a page that is in another group. Tested in 2.2

            Show
            abgreeve Adrian Greeve added a comment - This fixes the editing problems. It is no longer possible to edit a page that is in another group. Tested in 2.2
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            Yes, you got this finally upstream, just in time for Moodle 2.2beta. Congrats and thanks!

            Ciao

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - Yes, you got this finally upstream, just in time for Moodle 2.2beta. Congrats and thanks! Ciao
            Hide
            mayank_gupta2005 Mayank Gupta added a comment -

            Thats great!
            Thanks all for integrating, testing and closing the issue!

            Show
            mayank_gupta2005 Mayank Gupta added a comment - Thats great! Thanks all for integrating, testing and closing the issue!
            Hide
            nebgor Aparup Banerjee added a comment -

            Hi MichaeldR,
            perhaps a comment would be useful here when we remove security statuses for closed issues. Otherwise it just seems so out of the blue.
            cheers,
            Aparup

            Show
            nebgor Aparup Banerjee added a comment - Hi MichaeldR, perhaps a comment would be useful here when we remove security statuses for closed issues. Otherwise it just seems so out of the blue. cheers, Aparup
            Hide
            salvetore Michael de Raadt added a comment -

            Sorry, I should have commented earlier. I am currently preparing the security releases and reflecting on security releases.

            I've converted this to an issue on its own and removed the security as it is minor compared to the other wiki issues that it was reported with, and also in relation to the other issues that will be reported in the security release.

            Apologies for the confusion.

            Show
            salvetore Michael de Raadt added a comment - Sorry, I should have commented earlier. I am currently preparing the security releases and reflecting on security releases. I've converted this to an issue on its own and removed the security as it is minor compared to the other wiki issues that it was reported with, and also in relation to the other issues that will be reported in the security release. Apologies for the confusion.
            Hide
            nebgor Aparup Banerjee added a comment -

            Thanks Michael.

            Show
            nebgor Aparup Banerjee added a comment - Thanks Michael.
            Hide
            leblangi Gilles-Philippe Leblanc added a comment -

            We try to use this fix in our version 2.1.2 and when testing, the edit option in the menu is now gone but not the one in the navigation menu. It is normal ?

            Show
            leblangi Gilles-Philippe Leblanc added a comment - We try to use this fix in our version 2.1.2 and when testing, the edit option in the menu is now gone but not the one in the navigation menu. It is normal ?
            Hide
            nebgor Aparup Banerjee added a comment -

            Hi Gilles-Philippe Leblanc
            certainly does not seem normal to me - i've created MDL-31708

            Show
            nebgor Aparup Banerjee added a comment - Hi Gilles-Philippe Leblanc certainly does not seem normal to me - i've created MDL-31708
            Hide
            nebgor Aparup Banerjee added a comment -

            Linking created issue, thanks for the report Gilles !

            Show
            nebgor Aparup Banerjee added a comment - Linking created issue, thanks for the report Gilles !
            Hide
            leblangi Gilles-Philippe Leblanc added a comment -

            No problem! Thank you for creating the new task. I do not have much time to spend but I will still try to see if I can fix this quickly.

            Show
            leblangi Gilles-Philippe Leblanc added a comment - No problem! Thank you for creating the new task. I do not have much time to spend but I will still try to see if I can fix this quickly.

              People

              • Votes:
                15 Vote for this issue
                Watchers:
                19 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  28/Nov/11