Affects Version/s: 1.7.1
Environment:Windows XP, PHP 5.1, Apache 2.2, MySQL 5.0, Moodle 1.7.1
Fixed Branches:MOODLE_17_STABLE, MOODLE_18_STABLE
To reproduce the error :
You have to have these setting :
1-Course Settings : group mode=separate group.
2-Create a forum, with group mode=separate group setting.
3-Let a student to send a new discussion post in that forum.
4-As a teacher, go to that forum, and enter into the post posted by that student.
Then, as a teacher, you can see students' posts BUT when you click on the "reply" link in order
to make a relpy to student, you will get the following error :
"Sorry, you cannot post in this discussion".
Meaning, as a teacher you can NOT reply to students' posts.
My solution to this bug:
In .../mod/forum/post.php :
Change the follwing line:
has_capability('moodle/site:accessallgroups', $modcontext, NULL, false)
has_capability('moodle/site:accessallgroups', $coursecontext, NULL, false)
and it should work.