[svn r12575] fix a bug with the group tutor : http://projects.dokeos.com/?do=details&id=1640

skala
Julian Prud'homme 18 years ago
parent e5de910c4f
commit 9eab120909
  1. 10
      main/group/group.php
  2. 11
      main/group/group_edit.php

@ -301,11 +301,15 @@ foreach ($group_cats as $index => $category)
$row[] = ($this_group['maximum_number_of_members'] == MEMBER_PER_GROUP_NO_LIMIT ? '-' : $this_group['maximum_number_of_members']); $row[] = ($this_group['maximum_number_of_members'] == MEMBER_PER_GROUP_NO_LIMIT ? '-' : $this_group['maximum_number_of_members']);
// tutor name // tutor name
$tutor_info = ''; $tutor_info = '';
if($this_group['id_tutor'] != 0)
if(count($tutorsids_of_group)>0)
{ {
$tutor = api_get_user_info($this_group['id_tutor']); foreach($tutorsids_of_group as $tutor_id){
$tutor_info = Display::encrypted_mailto_link($tutor['mail'],$tutor['firstName'].' '.$tutor['lastName']); $tutor = api_get_user_info($tutor_id);
$tutor_info .= Display::encrypted_mailto_link($tutor['mail'],$tutor['firstName'].' '.$tutor['lastName']).', ';
}
} }
$tutor_info = substr($tutor_info,0,strlen($tutor_info)-2);
$row[] = $tutor_info; $row[] = $tutor_info;
// edit-links // edit-links
if (api_is_allowed_to_edit()) if (api_is_allowed_to_edit())

@ -164,13 +164,20 @@ $form->addElement('radio', 'announcements_state', null, get_lang('Public'), TOOL
$form->addElement('radio', 'announcements_state', null, get_lang('Private'), TOOL_PRIVATE); $form->addElement('radio', 'announcements_state', null, get_lang('Private'), TOOL_PRIVATE);
// getting all the users // getting all the users
$complete_user_list = CourseManager :: get_user_list_from_course_code($_course['id']); if(isset($_SESSION['id_session'])){
$complete_user_list = CourseManager :: get_user_list_from_course_code($_course['id'],true,$_SESSION['id_session']);
$complete_user_list2 = CourseManager :: get_coach_list_from_course_code($_course['id'],$_SESSION['id_session']);
$complete_user_list = array_merge($complete_user_list,$complete_user_list2);
}
else{
$complete_user_list = CourseManager :: get_user_list_from_course_code($_course['id']);
}
$possible_users = array (); $possible_users = array ();
foreach ($complete_user_list as $index => $user) foreach ($complete_user_list as $index => $user)
{ {
$possible_users[$user['user_id']] = $user['lastname'].' '.$user['firstname']; $possible_users[$user['user_id']] = $user['lastname'].' '.$user['firstname'];
} }
//print_r($complete_user_list2);
// Group tutors // Group tutors
$group_tutor_list = GroupManager :: get_subscribed_tutors($current_group['id']); $group_tutor_list = GroupManager :: get_subscribed_tutors($current_group['id']);
$selected_users = array (); $selected_users = array ();

Loading…
Cancel
Save