Moodle

Students can;t post to sigle discussion forums with separate groups

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Duplicate
  • Affects Version/s: 1.8, 1.8.1, 1.8.2, 1.8.3, 1.8.4
  • Fix Version/s: 1.9.1
  • Component/s: Forum
  • Labels:
    None
  • Environment:
    Linux
  • Database:
    Any
  • Affected Branches:
    MOODLE_18_STABLE
  • Fixed Branches:
    MOODLE_19_STABLE

Description

Students can't post to sigle discussion forums with separate groups. They see a massage

Sorry, but you can not post in this discussion.

Issue Links

Activity

Hide
Martin Dougiamas added a comment -

From Adam Pawełczak (adam.pawelczak at wsb.poznan.pl) Tuesday, 12 October 2004, 04:14 PM:

Next, after clicking of continue link they are moved to list of courses

From Gustav Delius (gwd2 at york.ac.uk) Tuesday, 26 October 2004, 05:07 AM:

This same bug was also reported later by Martin in MDL-2099

From Martin Dougiamas (martin at moodle.com) Tuesday, 26 October 2004, 11:03 AM:

The problem is the single discussion id, and a discussion can only belong to one group.

There probably needs to be a separate discussion created for each group, but this gets a bit messy if groups are created/deleted. All the copies need to be updated whenever the forum is updated, or groups are updated.

Show
Martin Dougiamas added a comment - From Adam Pawełczak (adam.pawelczak at wsb.poznan.pl) Tuesday, 12 October 2004, 04:14 PM: Next, after clicking of continue link they are moved to list of courses From Gustav Delius (gwd2 at york.ac.uk) Tuesday, 26 October 2004, 05:07 AM: This same bug was also reported later by Martin in MDL-2099 From Martin Dougiamas (martin at moodle.com) Tuesday, 26 October 2004, 11:03 AM: The problem is the single discussion id, and a discussion can only belong to one group. There probably needs to be a separate discussion created for each group, but this gets a bit messy if groups are created/deleted. All the copies need to be updated whenever the forum is updated, or groups are updated.
Hide
Martin Dougiamas added a comment -

Assigning to me temporarily because Vy-Shane no longer works for Moodle HQ.

Show
Martin Dougiamas added a comment - Assigning to me temporarily because Vy-Shane no longer works for Moodle HQ.
Hide
Steve Bond added a comment -

I have written a kludge to get round this.

File: /mod/forum/post.php
Lines: 162-164

if (!((empty($mygroupid) and $discussion->groupid == -1)

(ismember($discussion->groupid)/$mygroupid == $discussion->groupid/)
has_capability('moodle/site:accessallgroups', $modcontext, NULL, false) )) {

becomes:

if ($forum->type != 'single' and !((empty($mygroupid) and $discussion->groupid == -1)

(ismember($discussion->groupid)/$mygroupid == $discussion->groupid/)
has_capability('moodle/site:accessallgroups', $modcontext, NULL, false) )) {

This skips any consideration of group membership when deciding whether to allow a user to post to a single-discussion forum. From the above discussion I get the impression that there is no satisfactory meaning for groups in such discussions, so I think this is OK as a short-term fix.

Show
Steve Bond added a comment - I have written a kludge to get round this. File: /mod/forum/post.php Lines: 162-164 if (!((empty($mygroupid) and $discussion->groupid == -1)
(ismember($discussion->groupid)/$mygroupid == $discussion->groupid/)
has_capability('moodle/site:accessallgroups', $modcontext, NULL, false) )) {
becomes: if ($forum->type != 'single' and !((empty($mygroupid) and $discussion->groupid == -1)
(ismember($discussion->groupid)/$mygroupid == $discussion->groupid/)
has_capability('moodle/site:accessallgroups', $modcontext, NULL, false) )) {
This skips any consideration of group membership when deciding whether to allow a user to post to a single-discussion forum. From the above discussion I get the impression that there is no satisfactory meaning for groups in such discussions, so I think this is OK as a short-term fix.
Hide
Carlos Alexandre S. da Fonseca added a comment -

Yes, i made some modification on this code, i add $forum->type==single to ignore the group checks, but with this i lost the information of groups, so i can't separete the posts.

If the post holds information of the group (groupid), this problem will be solved, and this check (the code above) it's not necessery, in discussions.

And i don't need to make one discussions for each group (in the others forum types)

Show
Carlos Alexandre S. da Fonseca added a comment - Yes, i made some modification on this code, i add $forum->type==single to ignore the group checks, but with this i lost the information of groups, so i can't separete the posts. If the post holds information of the group (groupid), this problem will be solved, and this check (the code above) it's not necessery, in discussions. And i don't need to make one discussions for each group (in the others forum types)

People

Dates

  • Created:
    Updated:
    Resolved: