Issue Details (XML | Word | Printable)

Key: MDL-10986
Type: Bug Bug
Status: Resolved Resolved
Resolution: Duplicate
Priority: Major Major
Assignee: Petr Skoda (frankenstein)
Reporter: Allen S. Franco
Votes: 6
Watchers: 6
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
Moodle

[[nopostdiscussion]] for the simple discussion

Created: 24/Aug/07 10:27 PM   Updated: 17/Apr/08 05:18 AM
Component/s: Forum, Groups
Affects Version/s: 1.8.2
Fix Version/s: None

Environment: linux(slackaware) 10.2, mysql 4.1x
Issue Links:
Duplicate
 

Database: MySQL
Participants: Allen S. Franco, Ann Adamcik, Carlos Alexandre S. da Fonseca, Denis Vasenin, Pablo Vannini, Petr Skoda (frankenstein) and Steve Bond
Security Level: None
Resolved date: 17/Apr/08
Affected Branches: MOODLE_18_STABLE


 Description  « Hide
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)) { error(get_string("activityiscurrentlyhidden")); }

Please help, thanks in advance

Allen



 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
Pablo Vannini added a comment - 31/Aug/07 01:06 AM
Hi
we have the same problem with the admin user. We cant answer in a forum with groups

Carlos Alexandre S. da Fonseca added a comment - 21/Sep/07 04:32 AM
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


Ann Adamcik added a comment - 21/Sep/07 11:32 PM
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.

Carlos Alexandre S. da Fonseca added a comment - 22/Sep/07 04:02 AM
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


Denis Vasenin added a comment - 26/Sep/07 03:50 PM
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))) {
^^^^^^^^^^^^

Steve Bond added a comment - 02/Nov/07 05:36 PM
This duplicates issue MDL-2083 where I have posted a workaround.