Details

    • Type: Sub-task Sub-task
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.9
    • Fix Version/s: 1.9.1
    • Component/s: Forum
    • Labels:
      None
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE
    • Rank:
      36901

      Description

      When forums are set to use separate groups, the students are not allowed into the discussion. I've only tested separate groups mode. I have the course mode set to separate and I have it forced. If I click Forums, the list of forums is not clickable for students. If I click the link to the forum from inside the course section it takes me to the discussion but I'm able to see the posts from other groups. If I click reply it gives an error that contains a link to an unknown language entry. Groups and forums seem completely broken.

      1. lib.php
        244 kB
        Matthew Davidson
      2. post.php
        33 kB
        Matthew Davidson
      3. view.php
        12 kB
        Matthew Davidson
      1. 1.png
        4 kB
      2. 3.png
        21 kB
      3. 4.png
        33 kB
      4. 5.png
        6 kB

        Issue Links

          Activity

          Hide
          Petr Škoda added a comment -

          Hi,

          it seems to work fine here, please describe your server configuration and exact steps how to setup course/groups/forum to replicate it, thanks!

          Show
          Petr Škoda added a comment - Hi, it seems to work fine here, please describe your server configuration and exact steps how to setup course/groups/forum to replicate it, thanks!
          Hide
          Matthew Davidson added a comment -

          Ok, we've done some more complete testing so I'll share what we found. All of these tests were performed with multiple groups, and the course setting of "Separate" and the forum setting as "Separate". These tests were conducted using a fresh install of the latest Moodle build.

          [1] - Standard forum for general use. IIS issue only. There is an error displayed when adding a new discussion. Discussion is added anyway.

          [2] - Standard forum for general use. IIS & WAMP. Students cannot reply to a discussion that is posted to "All participants". Reply doesn't show as an option.

          [3] - Standard forum for general use. WAMP tested. Clicking the Forum link inside the course activities block displays the list of forums but the "Learning Forum" forum titles are not links despite the fact that clicking on the forum from inside the course sections will still allow us into the forum. And considering that our students should be allowed to reply to these discussions, it is odd that we can't get into the forum through the Forum activities area.

          [4] - Single discussion forum. WAMP tested. Formatting is screwed up due to the float:right property of the forum subscription text on the top right.

          [5] - Single discussion forum. WAMP tested. A student clicks on reply and is immediately given an error.

          Show
          Matthew Davidson added a comment - Ok, we've done some more complete testing so I'll share what we found. All of these tests were performed with multiple groups, and the course setting of "Separate" and the forum setting as "Separate". These tests were conducted using a fresh install of the latest Moodle build. [1] - Standard forum for general use. IIS issue only. There is an error displayed when adding a new discussion. Discussion is added anyway. [2] - Standard forum for general use. IIS & WAMP. Students cannot reply to a discussion that is posted to "All participants". Reply doesn't show as an option. [3] - Standard forum for general use. WAMP tested. Clicking the Forum link inside the course activities block displays the list of forums but the "Learning Forum" forum titles are not links despite the fact that clicking on the forum from inside the course sections will still allow us into the forum. And considering that our students should be allowed to reply to these discussions, it is odd that we can't get into the forum through the Forum activities area. [4] - Single discussion forum. WAMP tested. Formatting is screwed up due to the float:right property of the forum subscription text on the top right. [5] - Single discussion forum. WAMP tested. A student clicks on reply and is immediately given an error.
          Hide
          Matthew Davidson added a comment -

          error 1

          Show
          Matthew Davidson added a comment - error 1
          Hide
          Matthew Davidson added a comment -

          error 3

          Show
          Matthew Davidson added a comment - error 3
          Hide
          Matthew Davidson added a comment -

          error 4

          Show
          Matthew Davidson added a comment - error 4
          Hide
          Matthew Davidson added a comment -

          error 5

          Show
          Matthew Davidson added a comment - error 5
          Hide
          Petr Škoda added a comment -

          [1] going to test this when I get some IIS up and running

          [2] intended - must be member of group to post in separate mode - separate groups can not see each other, only teacher

          [3] should be fixed by MDL-14113

          [4] what browsers?

          [5] will test it later after MDL-14113

          thanks

          Show
          Petr Škoda added a comment - [1] going to test this when I get some IIS up and running [2] intended - must be member of group to post in separate mode - separate groups can not see each other, only teacher [3] should be fixed by MDL-14113 [4] what browsers? [5] will test it later after MDL-14113 thanks
          Hide
          Matthew Davidson added a comment -

          2 - If that is intended, I have a major problem with the intuitiveness of it. I'm pretty sure that selecting "All participants" should allow "All" to participate, not "None". If this is the intended idea, why allow "All participants" to be selected when "Separate" group mode is on? Either get rid of "All participants" when "Separate" mode is on, or allow "All" to participate.

          4 - Firefox is what we tested it in.

          Show
          Matthew Davidson added a comment - 2 - If that is intended, I have a major problem with the intuitiveness of it. I'm pretty sure that selecting "All participants" should allow "All" to participate, not "None". If this is the intended idea, why allow "All participants" to be selected when "Separate" group mode is on? Either get rid of "All participants" when "Separate" mode is on, or allow "All" to participate. 4 - Firefox is what we tested it in.
          Hide
          Ryan Smith added a comment -

          on [5] - Single discussion forum. WAMP tested. A student clicks on reply and is immediately given an error.

          This is completely broken right now in Moodle 1.9. If you have a course that is set up with seperate groups, and you create a 'single simple discussion' forum, when the student clicks 'reply' on the forum post they immediate see the [[nopostdiscussion]] from the screenshot above.

          Show
          Ryan Smith added a comment - on [5] - Single discussion forum. WAMP tested. A student clicks on reply and is immediately given an error. This is completely broken right now in Moodle 1.9. If you have a course that is set up with seperate groups, and you create a 'single simple discussion' forum, when the student clicks 'reply' on the forum post they immediate see the [ [nopostdiscussion] ] from the screenshot above.
          Hide
          Petr Škoda added a comment -

          The main rule of separate groups is that you do not know that the other group exists and who is in it.

          Show
          Petr Škoda added a comment - The main rule of separate groups is that you do not know that the other group exists and who is in it.
          Hide
          Petr Škoda added a comment -

          [1] not tested please file a new report with error message

          [2] not a bug

          [3] should be fixed

          [4] fixed

          [5] reply button not shown anymore - the reasoning is the same as for [2]

          Thanks for the report and cooperation!

          Show
          Petr Škoda added a comment - [1] not tested please file a new report with error message [2] not a bug [3] should be fixed [4] fixed [5] reply button not shown anymore - the reasoning is the same as for [2] Thanks for the report and cooperation!
          Hide
          Matthew Davidson added a comment -

          Petr, can I ask what usability Moodle gains by not allowing students to reply at all in a simple discussion forum when separate groups are turned on?

          I makes sense that the students can't see replies from other groups in the same discussion, but why can't they reply to their teacher or reply to students in their own group? What is MD's stance on this feature. It makes sense for a teacher to be able to start a single discussion that every group can participate in, but they can only see the replies from the people in their own group. I'm pretty sure that is the way it is supposed to work.

          Show
          Matthew Davidson added a comment - Petr, can I ask what usability Moodle gains by not allowing students to reply at all in a simple discussion forum when separate groups are turned on? I makes sense that the students can't see replies from other groups in the same discussion, but why can't they reply to their teacher or reply to students in their own group? What is MD's stance on this feature. It makes sense for a teacher to be able to start a single discussion that every group can participate in, but they can only see the replies from the people in their own group. I'm pretty sure that is the way it is supposed to work.
          Hide
          Ryan Smith added a comment -

          I just tested this again on a fresh Moodle install from the latest CVS. On a simple single discussion forum, with seperate groups, the error [5] bug above is technically "fixed" since I can't see the reply button any longer in order to create the [[nopostdiscussion]] error. However, it is still completely broken! Students cannot reply to a simple single discussion forum with seperate groups enabled. Since nobody can reply, this isn't really a forum any more.

          Also, to add to Matthew's comment, in a 'standard forum for general use' forum, if I create one, then add the first topic, WITH the dropdown box next to 'Seperate groups' set to All participants (the default setting), ALL students can see that post, BUT, when they click it, no students in the course can reply to it. This is behavior of a locked post on a forum, such as an announcement. Is this the intended behavior? If so, it is not intuitive at all.

          Show
          Ryan Smith added a comment - I just tested this again on a fresh Moodle install from the latest CVS. On a simple single discussion forum, with seperate groups, the error [5] bug above is technically "fixed" since I can't see the reply button any longer in order to create the [ [nopostdiscussion] ] error. However, it is still completely broken! Students cannot reply to a simple single discussion forum with seperate groups enabled. Since nobody can reply, this isn't really a forum any more. Also, to add to Matthew's comment, in a 'standard forum for general use' forum, if I create one, then add the first topic, WITH the dropdown box next to 'Seperate groups' set to All participants (the default setting), ALL students can see that post, BUT, when they click it, no students in the course can reply to it. This is behavior of a locked post on a forum, such as an announcement. Is this the intended behavior? If so, it is not intuitive at all.
          Hide
          Petr Škoda added a comment -

          Separate really means separate - having one single discussion in separate mode does not make much sense. I agree it would be better to prevent creation of separate single discussions forums.

          Show
          Petr Škoda added a comment - Separate really means separate - having one single discussion in separate mode does not make much sense. I agree it would be better to prevent creation of separate single discussions forums.
          Hide
          Petr Škoda added a comment -

          It would be a security problem if we allowed replies to discussions for all groups (-1) in separate mode, this will not be changed.
          Why do you insist on using separate groups if you do not want the separation? You can switch the groupmode easily and work around this, right?

          Show
          Petr Škoda added a comment - It would be a security problem if we allowed replies to discussions for all groups (-1) in separate mode, this will not be changed. Why do you insist on using separate groups if you do not want the separation? You can switch the groupmode easily and work around this, right?
          Hide
          Ryan Smith added a comment -

          Of course having a single discussion in seperate mode makes sense! For example, we have a teacher with 3 groups, he has created a single simple discussion forum with a simple question:

          On a K-W-L chart, the K stands for what we KNOW about a subject. What do we already know about ELECTRICITY?

          It logically makes sense that if the forum is set to seperate groups, each class can reply to the question post and add their thoughts. Students only see the responses of the classmates (fellow group members).

          If the Moodle team intends to not allow members of a group to reply to a forum that is set up as a 'simple single discussion' with seperate groups, then the selection for 'simple single discussion' while setting up the forum needs to be completely removed.

          Show
          Ryan Smith added a comment - Of course having a single discussion in seperate mode makes sense! For example, we have a teacher with 3 groups, he has created a single simple discussion forum with a simple question: On a K-W-L chart, the K stands for what we KNOW about a subject. What do we already know about ELECTRICITY? It logically makes sense that if the forum is set to seperate groups, each class can reply to the question post and add their thoughts. Students only see the responses of the classmates (fellow group members). If the Moodle team intends to not allow members of a group to reply to a forum that is set up as a 'simple single discussion' with seperate groups, then the selection for 'simple single discussion' while setting up the forum needs to be completely removed.
          Hide
          Petr Škoda added a comment -

          to Matthew:
          discussion has only one flag for group (in the first post), you can not have mixed group discussions sorry, your proposal can not be implemented with current db schema and even if we tried to change db tables and implement this there would be imho serious performance/implementation problems.

          Show
          Petr Škoda added a comment - to Matthew: discussion has only one flag for group (in the first post), you can not have mixed group discussions sorry, your proposal can not be implemented with current db schema and even if we tried to change db tables and implement this there would be imho serious performance/implementation problems.
          Hide
          Martin Dougiamas added a comment -

          Petr is right that the suggestions made here don't fit in with how the db works.

          The group ids are attached to the discussions (ie the top post in a discussion only) AT THE TIME OF POSTING. The group id of posts is not determined at run time. This is intentional, because we don't want discussions coming and going as people change groups. If you made a post into a particular group it should stay there.

          The single discussion forum currently uses one discussion. It can only have one groupid, hence the incompatibility with the idea of separate groups looking at one discussion.

          The solution that's been floating around from years ago is to automatically replicate the single discussion (when the teacher saves it) into ONE DISCUSSION FOR EACH GROUP. eg three groups -> 3 discussion. This way each can have a separate groupid, and everything works fine. There are some maintenance problems with this:

          1) If the main question post is altered, then all three discussions need to be altered to stay the same.
          2) If the groups are changed or new groups are added, then new postings need to be created/deleted for those groups to keep in sync.
          3) If the forum type is changed back to general, say, then you'll have three discussions all with the same initial post (this may not really be a problem).

          I'm sure it can be done, but it involves exceptions and is a little bit hacky, sure.

          Show
          Martin Dougiamas added a comment - Petr is right that the suggestions made here don't fit in with how the db works. The group ids are attached to the discussions (ie the top post in a discussion only) AT THE TIME OF POSTING. The group id of posts is not determined at run time. This is intentional, because we don't want discussions coming and going as people change groups. If you made a post into a particular group it should stay there. The single discussion forum currently uses one discussion. It can only have one groupid, hence the incompatibility with the idea of separate groups looking at one discussion. The solution that's been floating around from years ago is to automatically replicate the single discussion (when the teacher saves it) into ONE DISCUSSION FOR EACH GROUP. eg three groups -> 3 discussion. This way each can have a separate groupid, and everything works fine. There are some maintenance problems with this: 1) If the main question post is altered, then all three discussions need to be altered to stay the same. 2) If the groups are changed or new groups are added, then new postings need to be created/deleted for those groups to keep in sync. 3) If the forum type is changed back to general, say, then you'll have three discussions all with the same initial post (this may not really be a problem). I'm sure it can be done, but it involves exceptions and is a little bit hacky, sure.
          Hide
          Martin Dougiamas added a comment -

          Note that you can also just make a general forum and create a different discussion for each separate group (by cutting and pasting). I've done this before.

          Does mean the maintenance is manual though.

          Show
          Martin Dougiamas added a comment - Note that you can also just make a general forum and create a different discussion for each separate group (by cutting and pasting). I've done this before. Does mean the maintenance is manual though.
          Hide
          Ryan Smith added a comment -

          Thanks for the comments, Martin. One thing to clarify about the simple single discussion forum type:

          If the course is set up with 'Separate Groups' selected in the course settings under Group Mode, during forum creation simple single discussions forums default to this group mode setting, 'Separate Groups', and if you create the forum, students from any group cannot post in the forum...no reply link is shown.

          I can see this being very confusing for end-user teachers. The only way to allow the students to reply is to change "Separate Groups" to either 'No Groups" or "Visible Groups" during forum set up. Since the default setting, separate groups, inherits it from the course default, I think most teachers would not know that they need to change the group mode if they select the single simple discussion forum type. There is no documentation during forum set up to indicate this.

          This is what prompted us to report the bug, we had a teacher who had his course set to separate groups, and he simply set up a single simple discussion forum with the default forum settings, then he discovered that the students couldn't reply.

          Show
          Ryan Smith added a comment - Thanks for the comments, Martin. One thing to clarify about the simple single discussion forum type: If the course is set up with 'Separate Groups' selected in the course settings under Group Mode, during forum creation simple single discussions forums default to this group mode setting, 'Separate Groups', and if you create the forum, students from any group cannot post in the forum...no reply link is shown. I can see this being very confusing for end-user teachers. The only way to allow the students to reply is to change "Separate Groups" to either 'No Groups" or "Visible Groups" during forum set up. Since the default setting, separate groups, inherits it from the course default, I think most teachers would not know that they need to change the group mode if they select the single simple discussion forum type. There is no documentation during forum set up to indicate this. This is what prompted us to report the bug, we had a teacher who had his course set to separate groups, and he simply set up a single simple discussion forum with the default forum settings, then he discovered that the students couldn't reply.
          Hide
          Matthew Davidson added a comment - - edited

          Ok, if you have some time, use the uploaded versions of forum/ lib, view, and post.php This is how I think the separate groups, single discussion should work.

          I added 1 function in lib called forum_user_can_see_post_origin() This function "drills down" from each post to make sure that a user in a group should see a post, because the student shouldn't see a teacher reply to a student from another group. That isn't the only change....but it was the only function.

          Show
          Matthew Davidson added a comment - - edited Ok, if you have some time, use the uploaded versions of forum/ lib, view, and post.php This is how I think the separate groups, single discussion should work. I added 1 function in lib called forum_user_can_see_post_origin() This function "drills down" from each post to make sure that a user in a group should see a post, because the student shouldn't see a teacher reply to a student from another group. That isn't the only change....but it was the only function.
          Hide
          Petr Škoda added a comment -

          I am sorry, this is not an acceptable solution for performance reasons. Group flag is per discussion and this is not going to be changed in 1.9.x and I strongly doubt in any future version too.

          Show
          Petr Škoda added a comment - I am sorry, this is not an acceptable solution for performance reasons. Group flag is per discussion and this is not going to be changed in 1.9.x and I strongly doubt in any future version too.
          Hide
          Matthew Davidson added a comment -

          what do you mean by group flag? The database? My files don't write to the database or make any db changes. Why is this marked as fixed?

          Show
          Matthew Davidson added a comment - what do you mean by group flag? The database? My files don't write to the database or make any db changes. Why is this marked as fixed?
          Hide
          Petr Škoda added a comment - - edited

          Each discussion record has a groupid field - there is no group information in the post table.

          The hacks would be spread all over the place and the required algorithms would have to be recursive (read terribly slow), because it would not to be possible to do that in sql only.

          Think about:

          • my moodle
          • recent activity
          • posts in user profile
          • cron
          • etc.

          All these parts must be really fast and if possible in SQL only.

          edit:
          forgot about unread tracking and reply counts - it would really hurt there

          Show
          Petr Škoda added a comment - - edited Each discussion record has a groupid field - there is no group information in the post table. The hacks would be spread all over the place and the required algorithms would have to be recursive (read terribly slow), because it would not to be possible to do that in sql only. Think about: my moodle recent activity posts in user profile cron etc. All these parts must be really fast and if possible in SQL only. edit: forgot about unread tracking and reply counts - it would really hurt there
          Hide
          Matthew Davidson added a comment -

          I don't think the changes I made have affected anything except single forum discussions in separate groups mode....although they do apply to any forum discussion in separate groups mode. These are viewing changes only. The posting is all the same, it is only during a forum view that the changed code gets used. This is not recursive, and it does not affect unread tracking or reply counts. Please test the files I sent. Thanks.

          Show
          Matthew Davidson added a comment - I don't think the changes I made have affected anything except single forum discussions in separate groups mode....although they do apply to any forum discussion in separate groups mode. These are viewing changes only. The posting is all the same, it is only during a forum view that the changed code gets used. This is not recursive, and it does not affect unread tracking or reply counts. Please test the files I sent. Thanks.
          Hide
          Petr Škoda added a comment -

          Does it solve sending of notifications in cron?

          Show
          Petr Škoda added a comment - Does it solve sending of notifications in cron?
          Hide
          Petr Škoda added a comment -

          Is the reply and unread count correct? Changes in forum view mean that all the counts must be updated to match it.
          Does recent activity block still work?

          Show
          Petr Škoda added a comment - Is the reply and unread count correct? Changes in forum view mean that all the counts must be updated to match it. Does recent activity block still work?
          Hide
          Petr Škoda added a comment -

          I have created a new issue for this MDL-14394, because I do not think it is good to keep this reopened - the rest of bugs was already fixed and this is in fact a new feature request

          thanks again for the report and cooperation!

          Show
          Petr Škoda added a comment - I have created a new issue for this MDL-14394 , because I do not think it is good to keep this reopened - the rest of bugs was already fixed and this is in fact a new feature request thanks again for the report and cooperation!
          Hide
          Helen Foster added a comment -

          Matthew, thanks for reporting this issue, and thanks everyone for the interesting discussion

          I've added the following note to the documentation for adding/editing a forum:

          Single simple discussions cannot be set to separate groups. Instead, a standard forum should be used, with the teacher copying and pasting the same discussion topic for each separate group. If required, a permissions override may be set to prevent students from starting new discussions.

          http://docs.moodle.org/en/Adding/editing_a_forum

          Show
          Helen Foster added a comment - Matthew, thanks for reporting this issue, and thanks everyone for the interesting discussion I've added the following note to the documentation for adding/editing a forum: Single simple discussions cannot be set to separate groups. Instead, a standard forum should be used, with the teacher copying and pasting the same discussion topic for each separate group. If required, a permissions override may be set to prevent students from starting new discussions. http://docs.moodle.org/en/Adding/editing_a_forum

            People

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

              Dates

              • Created:
                Updated:
                Resolved: