Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.1.3, 2.2.2, 2.3
    • Fix Version/s: 2.1.6, 2.2.3
    • Component/s: Wiki (2.x)
    • Labels:
    • Database:
      PostgreSQL
    • Testing Instructions:
      Hide

      You could start by following the replication steps in the description and ensure that you don't get the same problem.

      • Make sure that you have at lease two groups for this course.
      • Create a collaborative wiki activity with visible groups.
      • As the admin create the first page for all participants - put content like 'all participants' in the body so that you can recognise which group you are in.
      • Now change over to another group. Make the first page for them (make sure that you can also identify this page).
      • Continue to switch between groups. Create new pages.
      • log in as students in the course and create new pages.

      [What to look out for]
      Ensure that the group drop down box is the same as the page that you are viewing.
      Make sure that even if you are view a page in a different group, that when you create a new page it's for your group.
      Try creating a wiki with separate groups and check that there are no problems there either.

      Show
      You could start by following the replication steps in the description and ensure that you don't get the same problem. Make sure that you have at lease two groups for this course. Create a collaborative wiki activity with visible groups. As the admin create the first page for all participants - put content like 'all participants' in the body so that you can recognise which group you are in. Now change over to another group. Make the first page for them (make sure that you can also identify this page). Continue to switch between groups. Create new pages. log in as students in the course and create new pages. [What to look out for] Ensure that the group drop down box is the same as the page that you are viewing. Make sure that even if you are view a page in a different group, that when you create a new page it's for your group. Try creating a wiki with separate groups and check that there are no problems there either.
    • Affected Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE, MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      wip-MDL-30478-master
    • Rank:
      33150

      Description

      When wiki page group mode is set to either 'Visible groups' or 'Separate groups'. The groups selector displayed on wiki/view.php page (a) does not reflect the current group (b) changing the groups does not bring you to correct group page.

      The investigation identified the following issues:

      1. The current activity group in wiki view page is not updated to selected
      group in most cases, making dropdown menu displaying the wrong group. Having
      said that, the displayed page may also belong to the the wrong group, I have seen a
      situation that after selecting group, both dropdown menu and page do not match
      neither each other nor the requested page.

      2. I guess the wiki title is sometimes malformed for groups (spaces in the original title are replaced with +), which makes it redirecting to the
      'first page', and even causes 'redirect loop' or prompting for group page creation (while it has been created already).

      3. The title used as hidden parameter in group dropdown always reflect the title of the previously selected page, so the attempt to switch group ends up with non-existing page and redirect user to 'first page' (which might even be not the main page either).

      Replication steps:
      (all steps are done as admin)

      1. Create collaborative wiki activity with 'Visible groups' and leave page name default ('First page name')
      2. You will be prompted to create the first page, write 'first page' in the content.
      3. Create two course groups, Group 1 and Group 2.
      4. Go to the wiki activity and select Group 1
      5. You will be prompted to create a new page 'First+page+name', write 'Group 1' in the page content.
      6. (observation 1) You are now on the main wiki view page, the page content belongs to group 1, but selector reads 'All participants'.
      7. Select 'Group 1' in dropdown selector.
      8. (observation 2) The content now switched to the 'first page' and the selector reads 'All participants' - 'Group 1' selection failed.
      9. Select 'Group 1' in dropdown selector again. Now display seems correct - Group 1 page is displayed and selector reads 'Group 1'
      10. Select 'All participants' in dropdown selector.
      11. (observation 3) Chrome browser reports 'This web page has a redirect loop'
      12. Get back to moodle from error page (just open the url and the course page), click on wiki activity we created.
      13. (observation 4) Wiki prompts you to create the new page 'First page name'
      14. Proceed creating it, the surprising thing is that it will belong to 'Group 1' as well under different name, so name it 'Group 1 new'.
      15. Now try switching between 'Group 1' and 'All participants' several time, you will be able to spot all three pages one after other, but in most cases the displayed page and selector will not be reflecting the one you have chosen.

      If you like to observe even more weirdness, you may introduce a second page by selecting 'Group 2' in the menu, and play switching between them.

        Issue Links

          Activity

          Ruslan Kabalin created issue -
          Ruslan Kabalin made changes -
          Field Original Value New Value
          Description When wiki page group mode is set to either 'Visible groups' or separate groups. The groups selector displayed on wiki/view.php page (a) does not reflect the current group (b) changing the groups does not bring you to correct group page.

          The short investigation identified the following issues:

          1. The current activity group in wiki view page is not updated to selected
          group in most cases, making dropdown menu displaying the wrong group. Having
          said that, the displayed page may also belong to the the wrong group, I have seen a
          situation that after selecting group, both dropdown menu and page do not match
          neither each other nor the requested page.

          2. I guess the wiki title is sometimes malformed for groups (spaces in the original title are replaced with +), which makes it redirecting to the
          'first page', and even causes 'redirect loop' or prompting for group page creation (while it has been created already).

          3. The title used as hidden parameter in group dropdown always reflect the title of the previously selected page, so the attempt to switch group ends up with non-existing page and redirect user to 'first page' (which might even be not the main page either).
          When wiki page group mode is set to either 'Visible groups' or 'Separate groups'. The groups selector displayed on wiki/view.php page (a) does not reflect the current group (b) changing the groups does not bring you to correct group page.

          The short investigation identified the following issues:

          1. The current activity group in wiki view page is not updated to selected
          group in most cases, making dropdown menu displaying the wrong group. Having
          said that, the displayed page may also belong to the the wrong group, I have seen a
          situation that after selecting group, both dropdown menu and page do not match
          neither each other nor the requested page.

          2. I guess the wiki title is sometimes malformed for groups (spaces in the original title are replaced with +), which makes it redirecting to the
          'first page', and even causes 'redirect loop' or prompting for group page creation (while it has been created already).

          3. The title used as hidden parameter in group dropdown always reflect the title of the previously selected page, so the attempt to switch group ends up with non-existing page and redirect user to 'first page' (which might even be not the main page either).
          Ruslan Kabalin made changes -
          Description When wiki page group mode is set to either 'Visible groups' or 'Separate groups'. The groups selector displayed on wiki/view.php page (a) does not reflect the current group (b) changing the groups does not bring you to correct group page.

          The short investigation identified the following issues:

          1. The current activity group in wiki view page is not updated to selected
          group in most cases, making dropdown menu displaying the wrong group. Having
          said that, the displayed page may also belong to the the wrong group, I have seen a
          situation that after selecting group, both dropdown menu and page do not match
          neither each other nor the requested page.

          2. I guess the wiki title is sometimes malformed for groups (spaces in the original title are replaced with +), which makes it redirecting to the
          'first page', and even causes 'redirect loop' or prompting for group page creation (while it has been created already).

          3. The title used as hidden parameter in group dropdown always reflect the title of the previously selected page, so the attempt to switch group ends up with non-existing page and redirect user to 'first page' (which might even be not the main page either).
          When wiki page group mode is set to either 'Visible groups' or 'Separate groups'. The groups selector displayed on wiki/view.php page (a) does not reflect the current group (b) changing the groups does not bring you to correct group page.

          The investigation identified the following issues:

          1. The current activity group in wiki view page is not updated to selected
          group in most cases, making dropdown menu displaying the wrong group. Having
          said that, the displayed page may also belong to the the wrong group, I have seen a
          situation that after selecting group, both dropdown menu and page do not match
          neither each other nor the requested page.

          2. I guess the wiki title is sometimes malformed for groups (spaces in the original title are replaced with +), which makes it redirecting to the
          'first page', and even causes 'redirect loop' or prompting for group page creation (while it has been created already).

          3. The title used as hidden parameter in group dropdown always reflect the title of the previously selected page, so the attempt to switch group ends up with non-existing page and redirect user to 'first page' (which might even be not the main page either).
          Andrew Nicols made changes -
          Labels wiki
          Hide
          Ruslan Kabalin added a comment - - edited

          I give it major status, as it potentially causes corrupted data.

          Show
          Ruslan Kabalin added a comment - - edited I give it major status, as it potentially causes corrupted data.
          Ruslan Kabalin made changes -
          Priority Minor [ 4 ] Major [ 3 ]
          Hide
          Michael de Raadt added a comment -

          Thanks for reporting this.

          I've put that on the backlog.

          In the meantime feel free to help us work on this issue. If you are able to provide a patch, please add a patch label so we will spot it.

          Show
          Michael de Raadt added a comment - Thanks for reporting this. I've put that on the backlog. In the meantime feel free to help us work on this issue. If you are able to provide a patch, please add a patch label so we will spot it.
          Michael de Raadt made changes -
          Fix Version/s STABLE backlog [ 10463 ]
          Testing Instructions (all steps are done as admin)
          # Create collaborative wiki activity with 'Visible groups' and leave page name default ('First page name')
          # You will be prompted to create the first page, write 'first page' in the content.
          # Create two course groups, Group 1 and Group 2.
          # Go to the wiki activity and select Group 1
          # You will be prompted to create a new page 'First+page+name', write 'Group 1' in the page content.
          # *(observation 1)* You are now on the main wiki view page, the page content belongs to group 1, but selector reads 'All participants'.
          # Select 'Group 1' in dropdown selector.
          # *(observation 2)* The content now switched to the 'first page' and the selector reads 'All participants' - 'Group 1' selection failed.
          # Select 'Group 1' in dropdown selector again. Now display seems correct - Group 1 page is displayed and selector reads 'Group 1'
          # Select 'All participants' in dropdown selector.
          # *(observation 3)* Chrome browser reports 'This web page has a redirect loop'
          # Get back to moodle from error page (just open the url and the course page), click on wiki activity we created.
          # *(observation 4)* Wiki prompts you to create the new page 'First page name'
          # Proceed creating it, the surprising thing is that it will belong to 'Group 1' as well under different name, so name it 'Group 1 new'.
          # Now try switching between 'Group 1' and 'All participants' several time, you will be able to spot all three pages one after other, but in most cases the displayed page and selector will not be reflecting the one you have chosen.

          If you like to observe even more weirdness, you may introduce a second page by selecting 'Group 2' in the menu, and play switching between them.
          Description When wiki page group mode is set to either 'Visible groups' or 'Separate groups'. The groups selector displayed on wiki/view.php page (a) does not reflect the current group (b) changing the groups does not bring you to correct group page.

          The investigation identified the following issues:

          1. The current activity group in wiki view page is not updated to selected
          group in most cases, making dropdown menu displaying the wrong group. Having
          said that, the displayed page may also belong to the the wrong group, I have seen a
          situation that after selecting group, both dropdown menu and page do not match
          neither each other nor the requested page.

          2. I guess the wiki title is sometimes malformed for groups (spaces in the original title are replaced with +), which makes it redirecting to the
          'first page', and even causes 'redirect loop' or prompting for group page creation (while it has been created already).

          3. The title used as hidden parameter in group dropdown always reflect the title of the previously selected page, so the attempt to switch group ends up with non-existing page and redirect user to 'first page' (which might even be not the main page either).
          When wiki page group mode is set to either 'Visible groups' or 'Separate groups'. The groups selector displayed on wiki/view.php page (a) does not reflect the current group (b) changing the groups does not bring you to correct group page.

          The investigation identified the following issues:

          1. The current activity group in wiki view page is not updated to selected
          group in most cases, making dropdown menu displaying the wrong group. Having
          said that, the displayed page may also belong to the the wrong group, I have seen a
          situation that after selecting group, both dropdown menu and page do not match
          neither each other nor the requested page.

          2. I guess the wiki title is sometimes malformed for groups (spaces in the original title are replaced with +), which makes it redirecting to the
          'first page', and even causes 'redirect loop' or prompting for group page creation (while it has been created already).

          3. The title used as hidden parameter in group dropdown always reflect the title of the previously selected page, so the attempt to switch group ends up with non-existing page and redirect user to 'first page' (which might even be not the main page either).

          *Replication steps:*
          (all steps are done as admin)
          # Create collaborative wiki activity with 'Visible groups' and leave page name default ('First page name')
          # You will be prompted to create the first page, write 'first page' in the content.
          # Create two course groups, Group 1 and Group 2.
          # Go to the wiki activity and select Group 1
          # You will be prompted to create a new page 'First+page+name', write 'Group 1' in the page content.
          # *(observation 1)* You are now on the main wiki view page, the page content belongs to group 1, but selector reads 'All participants'.
          # Select 'Group 1' in dropdown selector.
          # *(observation 2)* The content now switched to the 'first page' and the selector reads 'All participants' - 'Group 1' selection failed.
          # Select 'Group 1' in dropdown selector again. Now display seems correct - Group 1 page is displayed and selector reads 'Group 1'
          # Select 'All participants' in dropdown selector.
          # *(observation 3)* Chrome browser reports 'This web page has a redirect loop'
          # Get back to moodle from error page (just open the url and the course page), click on wiki activity we created.
          # *(observation 4)* Wiki prompts you to create the new page 'First page name'
          # Proceed creating it, the surprising thing is that it will belong to 'Group 1' as well under different name, so name it 'Group 1 new'.
          # Now try switching between 'Group 1' and 'All participants' several time, you will be able to spot all three pages one after other, but in most cases the displayed page and selector will not be reflecting the one you have chosen.

          If you like to observe even more weirdness, you may introduce a second page by selecting 'Group 2' in the menu, and play switching between them.
          Labels wiki triaged
          Affects Version/s 2.1.2 [ 10851 ]
          Michael de Raadt made changes -
          Link This issue has a non-specific relationship to MDL-27037 [ MDL-27037 ]
          Hide
          Michael de Raadt added a comment -

          There has been some recent work on Wiki group functionality that may be relevant here. It might have resolved the problem in this issue, but I'm not sure.

          Show
          Michael de Raadt added a comment - There has been some recent work on Wiki group functionality that may be relevant here. It might have resolved the problem in this issue, but I'm not sure.
          Hide
          Peter Roberts added a comment -

          Still seems to go wrong in the 2.2 beta

          Show
          Peter Roberts added a comment - Still seems to go wrong in the 2.2 beta
          Hide
          Matt Kolb added a comment -

          I found this same problem occurring only with groups set visible. There is some inconsistency in the code, the other cases in the switch statement in the renderer.php file don't try to urlencode the title (hence the problem). One solution to this, the one that makes the renderer.php most consistent is attached. Tested under 2.1.3+ diffed against MOODLE_22_STABLE (the patch is equivalent).

          Show
          Matt Kolb added a comment - I found this same problem occurring only with groups set visible. There is some inconsistency in the code, the other cases in the switch statement in the renderer.php file don't try to urlencode the title (hence the problem). One solution to this, the one that makes the renderer.php most consistent is attached. Tested under 2.1.3+ diffed against MOODLE_22_STABLE (the patch is equivalent).
          Matt Kolb made changes -
          Attachment renderer.patch [ 26198 ]
          Hide
          Matt Kolb added a comment -

          The patch is also available here (applies cleanly to 21_STABLE, 22_STABLE and master):
          https://github.com/mkolb/moodle/commit/884a1b3e8110cf7bf0a2a78cb299324cbb400fff

          or on the branch (against current):
          https://github.com/mkolb/moodle/tree/MDL-30478

          Show
          Matt Kolb added a comment - The patch is also available here (applies cleanly to 21_STABLE, 22_STABLE and master): https://github.com/mkolb/moodle/commit/884a1b3e8110cf7bf0a2a78cb299324cbb400fff or on the branch (against current): https://github.com/mkolb/moodle/tree/MDL-30478
          Michael de Raadt made changes -
          Labels triaged patch triaged
          Michael de Raadt made changes -
          Link This issue has been marked as being related by MDL-31188 [ MDL-31188 ]
          Hide
          Dan Poltawski added a comment -

          Ruslan - are you able to verify if this fix does indeed fix the issue?

          Show
          Dan Poltawski added a comment - Ruslan - are you able to verify if this fix does indeed fix the issue?
          Hide
          Ruslan Kabalin added a comment -

          Sorry, I have missed the patch somehow and did not check it earlier. I have verified it, the suggested patch partly solves the problem , e.g. it definitely fixes the page naming, and you no longer get 'This web page has a redirect loop' error, but some issues are still there:

          • Switching between groups and 'All participants' is still broken. The content of the page is always the last one when you switch from any group to 'All participants', there seems no way to see 'All participants' page content now.

          Once above is fixed,

          • The mechanism of fixing pages that have already been created with the wrong name should be added in upgrade function
          Show
          Ruslan Kabalin added a comment - Sorry, I have missed the patch somehow and did not check it earlier. I have verified it, the suggested patch partly solves the problem , e.g. it definitely fixes the page naming, and you no longer get 'This web page has a redirect loop' error, but some issues are still there: Switching between groups and 'All participants' is still broken. The content of the page is always the last one when you switch from any group to 'All participants', there seems no way to see 'All participants' page content now. Once above is fixed, The mechanism of fixing pages that have already been created with the wrong name should be added in upgrade function
          Adrian Greeve made changes -
          Link This issue blocks MDL-31708 [ MDL-31708 ]
          Dan Poltawski made changes -
          Link This issue has been marked as being related by MDL-29909 [ MDL-29909 ]
          Adrian Greeve made changes -
          Assignee moodle.com [ moodle.com ] Adrian Greeve [ abgreeve ]
          Adrian Greeve made changes -
          Fix Version/s STABLE Sprint 19 [ 11951 ]
          Fix Version/s STABLE backlog [ 10463 ]
          Adrian Greeve made changes -
          Status Open [ 1 ] Development in progress [ 3 ]
          Hide
          Adrian Greeve added a comment -

          I removed 'gid' as a parameter being passed via the url to view.php so that group id is only passed through 'group'. There is an addition to the grouplib.php functions groups_get_activity_group and groups_print_activity_menu.
          This should fix all of the issues mentioned in the description.

          Show
          Adrian Greeve added a comment - I removed 'gid' as a parameter being passed via the url to view.php so that group id is only passed through 'group'. There is an addition to the grouplib.php functions groups_get_activity_group and groups_print_activity_menu. This should fix all of the issues mentioned in the description.
          Adrian Greeve made changes -
          Pull Master Diff URL https://github.com/abgreeve/moodle/compare/wip-MDL-30478-master
          Pull Master Branch wip-MDL-30478-master
          Pull from Repository git://github.com/abgreeve/moodle.git
          Adrian Greeve made changes -
          Status Development in progress [ 3 ] Waiting for peer review [ 10012 ]
          Dan Poltawski made changes -
          Original Estimate 0 minutes [ 0 ]
          Remaining Estimate 0 minutes [ 0 ]
          Status Waiting for peer review [ 10012 ] Peer review in progress [ 10013 ]
          Peer reviewer poltawski
          Hide
          Dan Poltawski added a comment -

          Urm:
          error_log('this whatever');

          Show
          Dan Poltawski added a comment - Urm: error_log('this whatever');
          Dan Poltawski made changes -
          Status Peer review in progress [ 10013 ] Development in progress [ 3 ]
          Hide
          Adrian Greeve added a comment -

          Oops! Sorry about that. Let's try again

          Show
          Adrian Greeve added a comment - Oops! Sorry about that. Let's try again
          Adrian Greeve made changes -
          Status Development in progress [ 3 ] Waiting for peer review [ 10012 ]
          Dan Poltawski made changes -
          Status Waiting for peer review [ 10012 ] Peer review in progress [ 10013 ]
          Hide
          Dan Poltawski added a comment -

          Hi Adrian,

          Comments having looks through this:

          1. I am suspicious of the need for changing the groups_get_activity_group behaviour. All the other activity modules manage by passing around the parameter in the URL. Can you not pass the group parameter in the url?
          2. You are doing 'database' things in pagelib.php, my understanding of how that the wiki is structured is that this is the 'renderer' which does 'view' things in an MVC sense. I'm not sure how accurate I am on that - but the lack of $DB in that file suggests this is true. This logic should almost certainly be moved into create.php which I think calls this.
          3. This code:
            if (!$cm = get_coursemodule_from_instance('wiki', $wikiid)) {
                    die ('grrr');
            

            Probably wants to use the MUST_EXIST $strictness parmeter?

          Show
          Dan Poltawski added a comment - Hi Adrian, Comments having looks through this: I am suspicious of the need for changing the groups_get_activity_group behaviour. All the other activity modules manage by passing around the parameter in the URL. Can you not pass the group parameter in the url? You are doing 'database' things in pagelib.php, my understanding of how that the wiki is structured is that this is the 'renderer' which does 'view' things in an MVC sense. I'm not sure how accurate I am on that - but the lack of $DB in that file suggests this is true. This logic should almost certainly be moved into create.php which I think calls this. This code: if (!$cm = get_coursemodule_from_instance('wiki', $wikiid)) { die ('grrr'); Probably wants to use the MUST_EXIST $strictness parmeter?
          Dan Poltawski made changes -
          Status Peer review in progress [ 10013 ] Development in progress [ 3 ]
          Hide
          Adrian Greeve added a comment -

          Thanks Dan,

          I removed the changes to the grouplib functions. It seems to be working okay now with out that. I also moved the stuff that you were talking about in point 2 to create.php

          Show
          Adrian Greeve added a comment - Thanks Dan, I removed the changes to the grouplib functions. It seems to be working okay now with out that. I also moved the stuff that you were talking about in point 2 to create.php
          Adrian Greeve made changes -
          Status Development in progress [ 3 ] Waiting for peer review [ 10012 ]
          Dan Poltawski made changes -
          Status Waiting for peer review [ 10012 ] Peer review in progress [ 10013 ]
          Hide
          Dan Poltawski added a comment -

          Hi Adrain,

          Sorry for these comments coming in drips - i'm learning about wiki/groups as I review (this is a tricky piece of code which is not well understood).

          The changes you have made now make it much easier for me to follow, thanks.

          1. Are you sure that your selecting of the group to display is accurate (does wiki support seperate groups mode?). Looking at other activity modules they explicitly check for SEPERATEGROUPS. (I am not intimately familiar with this, best to see what other modules do)
          2. The pagelib function you've added set_currentgroups() - this doesn't sound accurate to me, the current group is the one set by the set_gid call no? Would this be better described as available groups?
          3. Also in pagelib: this is changing the $this->subwiki in every case, is that intentional? if (!$this->subwiki = wiki_get_subwiki_by_group($this->wid, $groupid)) {
          4. mod/wiki/lib.php - Might be clearer to remove $gid alltogether and set to 0 (I am not sure why we are setting that to 0 there)
          5. mod/wiki/create_form.php groupid and groupinfo element seem to be the wrong way round (groupinfo should be the hidden field with groupid?) Also rather than doing a for loop you could use an array function to get the first element as we are only expecting one?
          Show
          Dan Poltawski added a comment - Hi Adrain, Sorry for these comments coming in drips - i'm learning about wiki/groups as I review (this is a tricky piece of code which is not well understood). The changes you have made now make it much easier for me to follow, thanks. Are you sure that your selecting of the group to display is accurate (does wiki support seperate groups mode?). Looking at other activity modules they explicitly check for SEPERATEGROUPS. (I am not intimately familiar with this, best to see what other modules do) The pagelib function you've added set_currentgroups() - this doesn't sound accurate to me, the current group is the one set by the set_gid call no? Would this be better described as available groups? Also in pagelib: this is changing the $this->subwiki in every case, is that intentional? if (!$this->subwiki = wiki_get_subwiki_by_group($this->wid, $groupid)) { mod/wiki/lib.php - Might be clearer to remove $gid alltogether and set to 0 (I am not sure why we are setting that to 0 there) mod/wiki/create_form.php groupid and groupinfo element seem to be the wrong way round (groupinfo should be the hidden field with groupid?) Also rather than doing a for loop you could use an array function to get the first element as we are only expecting one?
          Dan Poltawski made changes -
          Status Peer review in progress [ 10013 ] Development in progress [ 3 ]
          Hide
          Dan Poltawski added a comment -

          Oh one other comment - '' isn't PARAM_INT! (should be 0, surprised optional_param doesn't complain):
          $gid = optional_param('gid', '', PARAM_INT);

          Show
          Dan Poltawski added a comment - Oh one other comment - '' isn't PARAM_INT! (should be 0, surprised optional_param doesn't complain): $gid = optional_param('gid', '', PARAM_INT);
          Hide
          Adrian Greeve added a comment -

          Hi Dan,

          1) I'm pretty sure that I am selecting the group to display accurately. Wiki does support groups mode. I tested this using separate groups and it behaves correctly. The calls that I make to the group API has checks in them for which group mode is being used.
          2) I've changed the function to set_availablegroups.
          3) This is intentional. Removing either line that starts with $this->subwiki will stop the module from working properly. The first line makes sure that the page is created for the right group. The second '$this->subwiki' if removed will result in errors when creating a page.
          4) I don't know why I edited this file. I've reverted it back to what it was and it doesn't break anything.
          5) I've changed this to just get the first item of the array.
          6) I've removed this optional parameter as it isn't used in this file.

          Show
          Adrian Greeve added a comment - Hi Dan, 1) I'm pretty sure that I am selecting the group to display accurately. Wiki does support groups mode. I tested this using separate groups and it behaves correctly. The calls that I make to the group API has checks in them for which group mode is being used. 2) I've changed the function to set_availablegroups. 3) This is intentional. Removing either line that starts with $this->subwiki will stop the module from working properly. The first line makes sure that the page is created for the right group. The second '$this->subwiki' if removed will result in errors when creating a page. 4) I don't know why I edited this file. I've reverted it back to what it was and it doesn't break anything. 5) I've changed this to just get the first item of the array. 6) I've removed this optional parameter as it isn't used in this file.
          Adrian Greeve made changes -
          Status Development in progress [ 3 ] Waiting for peer review [ 10012 ]
          Dan Poltawski made changes -
          Status Waiting for peer review [ 10012 ] Peer review in progress [ 10013 ]
          Dan Poltawski made changes -
          Status Peer review in progress [ 10013 ] Development in progress [ 3 ]
          Hide
          Dan Poltawski added a comment -

          Hi Adrian,

          thanks!

          I think you missed my 'wrong way round' point about 5) thought, surely:

          $mform->addElement('static', 'groupid', get_string('group'), $groupname);
          $mform->addElement('hidden', 'groupinfo', $groupid);
          

          Should be:

          $mform->addElement('static', 'groupinfo', get_string('group'), $groupname);
          $mform->addElement('hidden', 'groupid', $groupid);
          

          No?

          Show
          Dan Poltawski added a comment - Hi Adrian, thanks! I think you missed my 'wrong way round' point about 5) thought, surely: $mform->addElement(' static ', 'groupid', get_string('group'), $groupname); $mform->addElement('hidden', 'groupinfo', $groupid); Should be: $mform->addElement(' static ', 'groupinfo', get_string('group'), $groupname); $mform->addElement('hidden', 'groupid', $groupid); No?
          Michael de Raadt made changes -
          Fix Version/s STABLE Sprint 20 [ 12152 ]
          Fix Version/s STABLE Sprint 19 [ 11951 ]
          Hide
          Adrian Greeve added a comment -

          Hi Dan,
          Thanks for your help with this issue.
          I re-based my patch and made a couple of changes to the code. They are:
          #I changed the name of the element name from 'groupinfo' to 'groupdescription'
          #I have now included a check to see if $this->_customdata['groups']->availablegroups is empty or not, to remove a notice that I was getting.

          Show
          Adrian Greeve added a comment - Hi Dan, Thanks for your help with this issue. I re-based my patch and made a couple of changes to the code. They are: #I changed the name of the element name from 'groupinfo' to 'groupdescription' #I have now included a check to see if $this->_customdata ['groups'] ->availablegroups is empty or not, to remove a notice that I was getting.
          Adrian Greeve made changes -
          Status Development in progress [ 3 ] Waiting for peer review [ 10012 ]
          Dan Poltawski made changes -
          Status Waiting for peer review [ 10012 ] Peer review in progress [ 10013 ]
          Hide
          Dan Poltawski added a comment -

          Looks like there is a weird spacing change in:
          https://github.com/abgreeve/moodle/compare/wip-MDL-30478-master#L3R414

          Otherwise please submit for integration.

          Show
          Dan Poltawski added a comment - Looks like there is a weird spacing change in: https://github.com/abgreeve/moodle/compare/wip-MDL-30478-master#L3R414 Otherwise please submit for integration.
          Dan Poltawski made changes -
          Status Peer review in progress [ 10013 ] Development in progress [ 3 ]
          Hide
          Adrian Greeve added a comment -

          Sorry about that I had trouble with a conflict in a re-base. It should be right now.

          Show
          Adrian Greeve added a comment - Sorry about that I had trouble with a conflict in a re-base. It should be right now.
          Adrian Greeve made changes -
          Testing Instructions You could start by following the replication steps in the description and ensure that you don't get the same problem.

          * Make sure that you have at lease two groups for this course.
          * Create a collaborative wiki activity with visible groups.
          * As the admin create the first page for all participants - put content like 'all participants' in the body so that you can recognise which group you are in.
          * Now change over to another group. Make the first page for them (make sure that you can also identify this page).
          * Continue to switch between groups. Create new pages.
          * log in as students in the course and create new pages.

          [What to look out for]
          Ensure that the group drop down box is the same as the page that you are viewing.
          Make sure that even if you are view a page in a different group, that when you create a new page it's for your group.
          Try creating a wiki with separate groups and check that there are no problems there either.
          Adrian Greeve made changes -
          Status Development in progress [ 3 ] Waiting for integration review [ 10010 ]
          Hide
          Dan Poltawski added a comment -

          The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week.

          TIA and ciao

          Show
          Dan Poltawski added a comment - The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week. TIA and ciao
          Hide
          Adrian Greeve added a comment -

          Re-based and ready to go.

          Show
          Adrian Greeve added a comment - Re-based and ready to go.
          Eloy Lafuente (stronk7) made changes -
          Currently in integration Yes [ 10041 ]
          Eloy Lafuente (stronk7) made changes -
          Status Waiting for integration review [ 10010 ] Integration review in progress [ 10004 ]
          Integrator stronk7
          Hide
          Eloy Lafuente (stronk7) added a comment -

          Everything looks, ok. Testing will say. Integrated (21, 22 & master), thanks!

          Show
          Eloy Lafuente (stronk7) added a comment - Everything looks, ok. Testing will say. Integrated (21, 22 & master), thanks!
          Eloy Lafuente (stronk7) made changes -
          Status Integration review in progress [ 10004 ] Waiting for testing [ 10005 ]
          Affects Version/s 2.2.2 [ 11552 ]
          Affects Version/s 2.3 [ 10657 ]
          Fix Version/s 2.1.6 [ 12052 ]
          Fix Version/s 2.2.3 [ 12053 ]
          Michael de Raadt made changes -
          Tester andyjdavis
          Andrew Davis made changes -
          Status Waiting for testing [ 10005 ] Testing in progress [ 10011 ]
          Hide
          Andrew Davis added a comment -

          Testing went well in master. On to the stable branches!

          Show
          Andrew Davis added a comment - Testing went well in master. On to the stable branches!
          Andrew Davis made changes -
          Link This issue testing discovered MDL-32647 [ MDL-32647 ]
          Hide
          Andrew Davis added a comment -

          Testing in both stable branches went fine. I did raise MDL-32647 but that's a pre-existing issue.

          Also Adrian, could you take a look at MDL-31188? Sounds like a probable duplicate to me but you'd know better than I would. If it was resolved by this issue then assign it to yourself and close it

          Show
          Andrew Davis added a comment - Testing in both stable branches went fine. I did raise MDL-32647 but that's a pre-existing issue. Also Adrian, could you take a look at MDL-31188 ? Sounds like a probable duplicate to me but you'd know better than I would. If it was resolved by this issue then assign it to yourself and close it
          Andrew Davis made changes -
          Status Testing in progress [ 10011 ] Tested [ 10006 ]
          Hide
          Eloy Lafuente (stronk7) added a comment -

          This has been near becoming rejected, because it's not the best code you are able to produce.

          But, luckily, at the end, it has landed and has been spread to all repos out there.

          Many thanks and, don't forget it, keep improving your skills, you can!

          Closing, ciao

          Show
          Eloy Lafuente (stronk7) added a comment - This has been near becoming rejected, because it's not the best code you are able to produce. But, luckily, at the end, it has landed and has been spread to all repos out there. Many thanks and, don't forget it, keep improving your skills, you can! Closing, ciao
          Eloy Lafuente (stronk7) made changes -
          Status Tested [ 10006 ] Closed [ 6 ]
          Resolution Fixed [ 1 ]
          Currently in integration Yes [ 10041 ]
          Integration date 27/Apr/12
          Dan Poltawski made changes -
          Link This issue caused a regression MDL-33607 [ MDL-33607 ]
          Michael de Raadt made changes -
          Link This issue caused a regression MDL-35653 [ MDL-35653 ]
          Eloy Lafuente (stronk7) made changes -
          Fix Version/s STABLE Sprint 20 [ 12152 ]

            People

            • Votes:
              12 Vote for this issue
              Watchers:
              17 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: