|
|
|
|
@ -249,15 +249,38 @@ if (api_is_allowed_to_edit(null, true)) { |
|
|
|
|
} |
|
|
|
|
$description .= '<tr><td>'.get_lang('Course').': </td><td class="highlight">'.$course_info['name'].'</td>'; |
|
|
|
|
|
|
|
|
|
$teachers = CourseManager::get_teacher_list_from_course_code_to_string($course_info['code']); |
|
|
|
|
$coaches = CourseManager::get_coach_list_from_course_code_to_string($course_info['code'], $session_id); |
|
|
|
|
$teachers = CourseManager::get_teacher_list_from_course_code($course_info['code']); |
|
|
|
|
|
|
|
|
|
//If I'm a teacher in this course show just my name |
|
|
|
|
if (isset($teachers[$user_id])) { |
|
|
|
|
if (!empty($teachers)) { |
|
|
|
|
$teacher_info = $teachers[$user_id]; |
|
|
|
|
$description .= '<tr><td>'.get_lang('Teacher').': </td><td class="highlight">'.api_get_person_name($teacher_info['firstname'], $teacher_info['lastname']).'</td>'; |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
//If not show all teachers |
|
|
|
|
$teachers = CourseManager::get_teacher_list_from_course_code_to_string($course_info['code']); |
|
|
|
|
if (!empty($teachers)) { |
|
|
|
|
$description .= '<tr><td>'.get_lang('Teachers').': </td><td class="highlight">'.$teachers.'</td>'; |
|
|
|
|
} |
|
|
|
|
if (!empty($coaches)) { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (!empty($session_id)) { |
|
|
|
|
//If I'm a coach |
|
|
|
|
$coaches = CourseManager::get_coach_list_from_course_code($course_info['code'], $session_id); |
|
|
|
|
|
|
|
|
|
if (isset($coaches) && isset($coaches[$user_id])) { |
|
|
|
|
$user_info = api_get_user_info($user_id); |
|
|
|
|
$description .= '<tr><td>'.get_lang('Coach').': </td><td class="highlight">'.$user_info['complete_name'].'</td>'; |
|
|
|
|
} else { |
|
|
|
|
//If not show everything |
|
|
|
|
$teachers = CourseManager::get_coach_list_from_course_code_to_string($course_info['code'], $session_id); |
|
|
|
|
if (!empty($teachers)) { |
|
|
|
|
$description .= '<tr><td>'.get_lang('Coachs').': </td><td class="highlight">'.$coaches.'</td>'; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
$description .= '<tr><td>'.get_lang('Date').': </td><td class="highlight">'.api_convert_and_format_date(time(), DATE_TIME_FORMAT_LONG).'</td>'; |
|
|
|
|
$description .= '</table>'; |
|
|
|
|
$params = array(); |
|
|
|
|
|