Add teachers in course list see BT#15597

pull/2913/head
Julio Montoya 7 years ago
parent 1c935a3c64
commit a660c27fac
  1. 55
      main/auth/courses_list.php

@ -28,6 +28,7 @@ if (!empty($message)) {
}
$allowCollapsable = api_get_configuration_value('allow_user_course_category_collapsable');
$teachersIcon = Display::return_icon('teacher.png', get_lang('Teachers'), null, ICON_SIZE_TINY);
// COURSES WITH CATEGORIES
if (!empty($user_course_categories)) {
@ -107,12 +108,14 @@ if (!empty($user_course_categories)) {
$key = 0;
if (!empty($courses_in_category[$row['id']])) {
foreach ($courses_in_category[$row['id']] as $course) {
?>
<tr>
<td>
<a name="course<?php echo $course['code']; ?>"></a>
<strong><?php echo $course['title']; ?></strong><br />
<?php
echo '<tr><td>';
echo '<a name="course'.$course['code'].'"></a>';
echo '<strong>'.$course['title'].'</strong>';
echo '<br />';
echo $teachersIcon;
echo '&nbsp;';
echo CourseManager::getTeacherListFromCourseCodeToString($course['code']);
echo '<br />';
if (api_get_setting('display_coursecode_in_courselist') === 'true') {
echo $course['visual_code'];
}
@ -125,11 +128,8 @@ if (!empty($user_course_categories)) {
if (api_get_setting('display_teacher_in_courselist') === 'true') {
echo $course['tutor'];
} ?>
</td>
<td valign="top">
<!-- edit -->
<?php
}
echo '</td><td valign="top">';
if (isset($_GET['edit']) && $course['code'] == $_GET['edit']) {
$edit_course = Security::remove_XSS($_GET['edit']); ?>
@ -226,11 +226,14 @@ if (!empty($courses_without_category)) {
$number_of_courses = count($courses_without_category);
$key = 0;
foreach ($courses_without_category as $course) {
echo '<tr>'; ?>
<td>
<a name="course<?php echo $course['code']; ?>"></a>
<strong><?php echo $course['title']; ?></strong><br />
<?php
echo '<tr><td>';
echo '<a name="course'.$course['code'].'"></a>';
echo '<strong>'.$course['title'].'</strong>';
echo '<br />';
echo $teachersIcon;
echo '&nbsp;';
echo CourseManager::getTeacherListFromCourseCodeToString($course['code']);
echo '<br />';
if (api_get_setting('display_coursecode_in_courselist') === 'true') {
echo $course['visual_code'];
}
@ -240,13 +243,13 @@ if (!empty($courses_without_category)) {
) {
echo ' - ';
}
if (api_get_setting('display_teacher_in_courselist') === 'true') {
echo $course['tutor'];
} ?>
</td>
<td valign="top">
<!-- the edit icon OR the edit dropdown list -->
<?php if (isset($_GET['edit']) && $course['code'] == $_GET['edit']) {
}
echo '</td><td valign="top">';
// the edit icon OR the edit dropdown list
if (isset($_GET['edit']) && $course['code'] == $_GET['edit']) {
$edit_course = Security::remove_XSS($_GET['edit']); ?>
<div style="float:left;">
<form name="edit_course_category" method="post" action="courses.php?action=<?php echo $action; ?>">
@ -275,19 +278,15 @@ if (!empty($courses_without_category)) {
<?php
}
if (isset($_GET['edit']) && $course['code'] == $_GET['edit']) {
?>
<?php echo Display::display_icon('edit_na.png', get_lang('Edit'), '', 22); ?>
<?php
echo Display::display_icon('edit_na.png', get_lang('Edit'), '', 22);
} else {
?>
<a href="courses.php?action=<?php echo $action; ?>&amp;edit=<?php echo $course['code']; ?>&amp;sec_token=<?php echo $stok; ?>">
<?php echo Display::display_icon('edit.png', get_lang('Edit'), '', 22); ?>
</a>
<?php
} ?>
<!-- up /down icons-->
<?php if ($key > 0) {
}
if ($key > 0) {
?>
<a href="courses.php?action=<?php echo $action; ?>&amp;move=up&amp;course=<?php echo $course['code']; ?>&amp;category=<?php echo $course['user_course_cat']; ?>&amp;sec_token=<?php echo $stok; ?>">
<?php echo Display::display_icon('up.png', get_lang('Up'), '', 22); ?>

Loading…
Cancel
Save