Commit 4a88fac8 authored by Myriam Delaruelle's avatar Myriam Delaruelle
Browse files

fix bug where people with no groups couldn't see course groups

parent 7d6b76c7
......@@ -85,6 +85,7 @@ function get_groups($context, $active_group_id, $progress, $groups){
$group->selected='selected';
}
/*
foreach ($current_user_groups_ids as $ugi) {
if ( $group->id == $ugi ) {
$current_user_groups[] = $group;
......@@ -92,8 +93,14 @@ function get_groups($context, $active_group_id, $progress, $groups){
else{
$other_groups[]=$group;
}
}*/
if ( in_array($group->id, $current_user_groups_ids)){
$current_user_groups[] = $group;
}
}
else{
$other_groups[]=$group;
}
}
//Réservé pour l'export ?
/*if ( $active_group_id == 0 ) {
......@@ -437,7 +444,6 @@ else {
if(isset($groups_all->current_user_groups) && !empty($groups_all->current_user_groups)){
$current_user_groups=$groups_all->current_user_groups;
}
$groups=$groups_all->groups;
$sections=get_sections($active_section_id);
$data=set_filters($data, $filters, $symbols, $sections, $groups, $current_user_groups, $active_group_name, $active_section_id);
......
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