Skip to content
Snippets Groups Projects
Commit 55524ddc authored by Astor Bizard's avatar Astor Bizard :dog2:
Browse files

Merge branch 'dev' into 'master'

Fixed similarity computation for Group Work

See merge request !5
parents ea616b78 053e8f8b
No related branches found
No related tags found
1 merge request!5Fixed similarity computation for Group Work
...@@ -293,15 +293,15 @@ class vpl_similarity_preprocess { ...@@ -293,15 +293,15 @@ class vpl_similarity_preprocess {
static public function activity(&$simil, $vpl, $filesselected = array(), $allfiles, $joinedfiles, $spb) { static public function activity(&$simil, $vpl, $filesselected = array(), $allfiles, $joinedfiles, $spb) {
$vpl->require_capability( VPL_SIMILARITY_CAPABILITY ); $vpl->require_capability( VPL_SIMILARITY_CAPABILITY );
$cm = $vpl->get_course_module(); $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 ); $currentgroup = groups_get_activity_group( $cm, true );
if (! $currentgroup) { if (! $currentgroup) {
$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) { if (count( $list ) == 0) {
return; return;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment