Moodle

[[nopostdiscussion]] for the simple discussion

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Duplicate
  • Affects Version/s: 1.8.2
  • Fix Version/s: None
  • Component/s: Forum, Groups
  • Labels:
    None
  • Environment:
    linux(slackaware) 10.2, mysql 4.1x
  • Database:
    MySQL
  • Affected Branches:
    MOODLE_18_STABLE

Description

Hi,

I have five groups with some people inside then, and i create a forum with the type "single simple discussion" and put the option to "separete groups" to the students groups who i have, but the students can answer because shows this message:

[[nopostdiscussion]]

I follow the code and a i see this on post.php:

if (groupmode($course, $cm)) { // Make sure user can post here
$mygroupid = mygroupid($course->id);
if (!((empty($mygroupid) and $discussion->groupid == -1)

(ismember($discussion->groupid)/$mygroupid == $discussion->groupid/)
has_capability('moodle/site:accessallgroups', $modcontext, NULL, false) )) { print_error('nopostdiscussion', 'forum'); }
}
if (!$cm->visible and !has_capability('moodle/course:manageactivities', $coursecontext)) tok1-block-tok

Please help, thanks in advance

Allen

Issue Links

Activity

Hide
Pablo Vannini added a comment -

Hi
we have the same problem with the admin user. We cant answer in a forum with groups

Show
Pablo Vannini added a comment - Hi we have the same problem with the admin user. We cant answer in a forum with groups
Hide
Carlos Alexandre S. da Fonseca added a comment -

I'm using moodle 1.5.3 and have same problem, i think this problem can only be solved if the groupid information be stored in mdl_forum_posts table not in mdl_forum_discussions

So when i chage the groups only show the posts of this groups.

This will solve the problem of geral forum (the default forum type) with separete groups.
Today i must make one discussion for each group, but i think the correct is create one discussion and all groups have access, only the posts will be separeted

Show
Carlos Alexandre S. da Fonseca added a comment - I'm using moodle 1.5.3 and have same problem, i think this problem can only be solved if the groupid information be stored in mdl_forum_posts table not in mdl_forum_discussions So when i chage the groups only show the posts of this groups. This will solve the problem of geral forum (the default forum type) with separete groups. Today i must make one discussion for each group, but i think the correct is create one discussion and all groups have access, only the posts will be separeted
Hide
Ann Adamcik added a comment -

This is still an issue in the latest 1.8.2+. The only way for students to reply to a single simple discussion is for it to be set up with no groups. If the forum is set up with visible or separate groups, students cannot reply. With other forum types, instructors can post to each group, but that doesn't seem to be an option with this forum type.

Show
Ann Adamcik added a comment - This is still an issue in the latest 1.8.2+. The only way for students to reply to a single simple discussion is for it to be set up with no groups. If the forum is set up with visible or separate groups, students cannot reply. With other forum types, instructors can post to each group, but that doesn't seem to be an option with this forum type.
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 chek (the code above) it's not necessery

The check will be done when the teacher selects the group what he wants to see

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 chek (the code above) it's not necessery The check will be done when the teacher selects the group what he wants to see
Hide
Denis Vasenin added a comment -

I have the same error. And just in v1.8.1 to which I have passed from 1.6. +. By looking $modcontext I find that it empty. To understand I has not become why it is not filled in, and simply has replaced in the code $modcontext to $ coursecontext and all has become to work perfectly.

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

(ismember ($discussion - > groupid) / * $mygroupid == $discussion - > groupid* /)
has _ capability ("moodle/site:accessallgroups", $modcontext, NULL, false))) {
^^^^^^^^^^^^
Show
Denis Vasenin added a comment - I have the same error. And just in v1.8.1 to which I have passed from 1.6. +. By looking $modcontext I find that it empty. To understand I has not become why it is not filled in, and simply has replaced in the code $modcontext to $ coursecontext and all has become to work perfectly. If (! ((empty ($mygroupid) and $discussion - > groupid == -1)
(ismember ($discussion - > groupid) / * $mygroupid == $discussion - > groupid* /)
has _ capability ("moodle/site:accessallgroups", $modcontext, NULL, false))) { ^^^^^^^^^^^^
Hide
Steve Bond added a comment -

This duplicates issue MDL-2083 where I have posted a workaround.

Show
Steve Bond added a comment - This duplicates issue MDL-2083 where I have posted a workaround.

Dates

  • Created:
    Updated:
    Resolved: