Commit 053e8f8b authored by Astor Bizard's avatar Astor Bizard
Browse files

Fixed similarity computation for Group Work

parent 7c262cbe
......@@ -293,15 +293,15 @@ class vpl_similarity_preprocess {
static public function activity(&$simil, $vpl, $filesselected = array(), $allfiles, $joinedfiles, $spb) {
$vpl->require_capability( VPL_SIMILARITY_CAPABILITY );
$cm = $vpl->get_course_module();
$groupmode = groups_get_activity_groupmode( $cm );
if (! $groupmode) {
$groupmode = groups_get_course_groupmode( $vpl->get_course() );
}
$currentgroup = groups_get_activity_group( $cm, true );
if (! $currentgroup) {
$currentgroup = '';
}
$list = $vpl->get_students($currentgroup);
if ($vpl->is_group_activity()) {
$list = groups_get_all_groups($vpl->get_course()->id, 0, $cm->groupingid);
} else {
$list = $vpl->get_students( $currentgroup );
}
if (count( $list ) == 0) {
return;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment