MDL-43828 forum: allow to select single available group when posting

This commit is contained in:
Marina Glancy 2014-01-23 15:41:15 +08:00
parent 183515da23
commit cdb69ddff0

View File

@ -166,7 +166,7 @@ class mod_forum_post_form extends moodleform {
$groupdata = groups_get_activity_allowed_groups($cm);
$groupcount = count($groupdata);
$modulecontext = context_module::instance($cm->id);
$contextcheck = has_capability('mod/forum:movediscussions', $modulecontext) && empty($post->parent) && $groupcount > 1;
$contextcheck = has_capability('mod/forum:movediscussions', $modulecontext) && empty($post->parent) && $groupcount;
if ($contextcheck) {
$groupinfo = array('0' => get_string('allparticipants'));
foreach ($groupdata as $grouptemp) {