|
|
|
@ -216,36 +216,34 @@ Display::display_header($nameTools, 'Tracking'); |
|
|
|
|
|
|
|
|
|
/* MAIN CODE */ |
|
|
|
|
|
|
|
|
|
echo '<div class="actions">'; |
|
|
|
|
|
|
|
|
|
echo Display::return_icon('user_na.png', get_lang('StudentsTracking'), array(), ICON_SIZE_MEDIUM); |
|
|
|
|
echo Display::url( |
|
|
|
|
$actionsLeft = Display::return_icon('user_na.png', get_lang('StudentsTracking'), array(), ICON_SIZE_MEDIUM); |
|
|
|
|
$actionsLeft .= Display::url( |
|
|
|
|
Display::return_icon('group.png', get_lang('GroupReporting'), array(), ICON_SIZE_MEDIUM), |
|
|
|
|
'course_log_groups.php?'.api_get_cidreq() |
|
|
|
|
); |
|
|
|
|
echo Display::url( |
|
|
|
|
$actionsLeft .= Display::url( |
|
|
|
|
Display::return_icon('course.png', get_lang('CourseTracking'), array(), ICON_SIZE_MEDIUM), |
|
|
|
|
'course_log_tools.php?'.api_get_cidreq() |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
echo Display::url( |
|
|
|
|
$actionsLeft .= Display::url( |
|
|
|
|
Display::return_icon('tools.png', get_lang('ResourcesTracking'), array(), ICON_SIZE_MEDIUM), |
|
|
|
|
'course_log_resources.php?'.api_get_cidreq() |
|
|
|
|
); |
|
|
|
|
echo Display::url( |
|
|
|
|
$actionsLeft .= Display::url( |
|
|
|
|
Display::return_icon('quiz.png', get_lang('ExamTracking'), array(), ICON_SIZE_MEDIUM), |
|
|
|
|
api_get_path(WEB_CODE_PATH).'tracking/exams.php?'.api_get_cidreq() |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
if (!empty($sessionId)) { |
|
|
|
|
echo Display::url( |
|
|
|
|
$actionsLeft .= Display::url( |
|
|
|
|
Display::return_icon('attendance_list.png', get_lang('Logins'), '', ICON_SIZE_MEDIUM), |
|
|
|
|
api_get_path(WEB_CODE_PATH) . 'attendance/index.php?' . api_get_cidreq() . '&action=calendar_logins' |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
echo '<span style="float:right; padding-top:0px;">'; |
|
|
|
|
echo '<a href="javascript: void(0);" onclick="javascript: window.print();">'. |
|
|
|
|
$actionsRight = '<div class="pull-right">'; |
|
|
|
|
$actionsRight .= '<a href="javascript: void(0);" onclick="javascript: window.print();">'. |
|
|
|
|
Display::return_icon('printer.png', get_lang('Print'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
|
|
|
|
|
|
|
|
$addional_param = ''; |
|
|
|
@ -256,14 +254,9 @@ $users_tracking_per_page = ''; |
|
|
|
|
if (isset($_GET['users_tracking_per_page'])) { |
|
|
|
|
$users_tracking_per_page= '&users_tracking_per_page='.intval($_GET['users_tracking_per_page']); |
|
|
|
|
} |
|
|
|
|
echo '<a href="'.api_get_self().'?'.api_get_cidreq().'&export=csv&'.$addional_param.$users_tracking_per_page.'"> |
|
|
|
|
$actionsRight .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&export=csv&'.$addional_param.$users_tracking_per_page.'"> |
|
|
|
|
'.Display::return_icon('export_csv.png', get_lang('ExportAsCSV'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
|
|
|
|
|
|
|
|
echo '</span>'; |
|
|
|
|
echo '</div>'; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
echo '<div class="actions">'; |
|
|
|
|
$actionsRight .= '</div>'; |
|
|
|
|
// Create a search-box. |
|
|
|
|
$form_search = new FormValidator( |
|
|
|
|
'search_simple', |
|
|
|
@ -280,26 +273,26 @@ $form_search->addElement('hidden', 'session_id', $sessionId); |
|
|
|
|
$form_search->addElement('hidden', 'id_session', $sessionId); |
|
|
|
|
$form_search->addElement('text', 'user_keyword'); |
|
|
|
|
$form_search->addButtonSearch(get_lang('SearchUsers')); |
|
|
|
|
$form_search->display(); |
|
|
|
|
echo '</div>'; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
echo Display::toolbarAction('toolbar-courselog', array( 0 => $actionsLeft, 1 => $form_search->returnForm(), 2 => $actionsRight ), 3); |
|
|
|
|
|
|
|
|
|
$course_name = get_lang('Course').' '.$courseInfo['name']; |
|
|
|
|
|
|
|
|
|
if ($session_id) { |
|
|
|
|
echo Display::page_subheader( |
|
|
|
|
Display::return_icon('session.png', get_lang('Session'), array(), ICON_SIZE_SMALL).' '.api_get_session_name($session_id).' '. |
|
|
|
|
Display::return_icon('course.png', get_lang('Course'), array(), ICON_SIZE_SMALL).' '.$course_name |
|
|
|
|
); |
|
|
|
|
$titleSession = Display::return_icon('session.png', get_lang('Session'), array(), ICON_SIZE_SMALL).' '.api_get_session_name($session_id); |
|
|
|
|
$titleCourse = Display::return_icon('course.png', get_lang('Course'), array(), ICON_SIZE_SMALL).' '.$course_name; |
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
|
echo Display::page_subheader( |
|
|
|
|
Display::return_icon('course.png', get_lang('Course'), array(), ICON_SIZE_SMALL).' '.$courseInfo['name'] |
|
|
|
|
); |
|
|
|
|
$titleSession = Display::return_icon('course.png', get_lang('Course'), array(), ICON_SIZE_SMALL).' '.$courseInfo['name']; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$teacherList = CourseManager::get_teacher_list_from_course_code_to_string( |
|
|
|
|
$courseInfo['code'], |
|
|
|
|
',', |
|
|
|
|
false |
|
|
|
|
false, |
|
|
|
|
true |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
$coaches = null; |
|
|
|
@ -308,32 +301,35 @@ if (!empty($session_id)) { |
|
|
|
|
$session_id, |
|
|
|
|
$courseInfo['real_id'], |
|
|
|
|
',', |
|
|
|
|
false |
|
|
|
|
false, |
|
|
|
|
true |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
$html = ''; |
|
|
|
|
|
|
|
|
|
if (!empty($teacherList)) { |
|
|
|
|
echo Display::page_subheader2(get_lang('Teachers')); |
|
|
|
|
echo $teacherList; |
|
|
|
|
$html .= Display::page_subheader2(get_lang('Teachers')); |
|
|
|
|
$html .= $teacherList; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (!empty($coaches)) { |
|
|
|
|
echo Display::page_subheader2(get_lang('Coaches')); |
|
|
|
|
echo $coaches; |
|
|
|
|
$html .= Display::page_subheader2(get_lang('Coaches')); |
|
|
|
|
$html .= $coaches; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
$sessionList = SessionManager::get_session_by_course($courseInfo['real_id']); |
|
|
|
|
if (!empty($sessionList)) { |
|
|
|
|
echo Display::page_subheader2(get_lang('SessionList')); |
|
|
|
|
$sessionToShow = array(); |
|
|
|
|
$html .= Display::page_subheader2(get_lang('SessionList')); |
|
|
|
|
$iconCourse = Display::return_icon('course.png', null, null, ICON_SIZE_TINY); |
|
|
|
|
$html .= '<ul class="session-list">'; |
|
|
|
|
foreach ($sessionList as $session) { |
|
|
|
|
$url = api_get_path(WEB_CODE_PATH).'mySpace/course.php?session_id='.$session['id'].'&cidReq='.$courseInfo['code']; |
|
|
|
|
$sessionToShow[] = Display::url($session['name'], $url); |
|
|
|
|
$html .= Display::tag('li', $iconCourse . ' ' . Display::url($session['name'], $url)); |
|
|
|
|
} |
|
|
|
|
echo implode(', ', $sessionToShow); |
|
|
|
|
$html .= '</ul>'; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
echo Display::page_subheader2(get_lang('StudentList')); |
|
|
|
|
$html .= Display::page_subheader2(get_lang('StudentList')); |
|
|
|
|
|
|
|
|
|
// PERSON_NAME_DATA_EXPORT is buggy |
|
|
|
|
$is_western_name_order = api_is_western_name_order(); |
|
|
|
@ -355,14 +351,14 @@ if (count($a_students) > 0) { |
|
|
|
|
30 => '30 '.get_lang('Days'), |
|
|
|
|
'never' => get_lang('Never') |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
$el = $form->addElement( |
|
|
|
|
$el = $form->addSelect('since', get_lang('RemindInactivesLearnersSince'), $options); |
|
|
|
|
/* $el = $form->addElement( |
|
|
|
|
'select', |
|
|
|
|
'since', |
|
|
|
|
'<img align="middle" src="'.api_get_path(WEB_IMG_PATH).'messagebox_warning.gif" border="0" />'. |
|
|
|
|
get_lang('RemindInactivesLearnersSince'), |
|
|
|
|
$options |
|
|
|
|
); |
|
|
|
|
); */ |
|
|
|
|
$el->setSelected(7); |
|
|
|
|
|
|
|
|
|
$form->addElement('hidden', 'action', 'add'); |
|
|
|
@ -374,10 +370,10 @@ if (count($a_students) > 0) { |
|
|
|
|
$extra_field_select = TrackingCourseLog::display_additional_profile_fields(); |
|
|
|
|
|
|
|
|
|
if (!empty($extra_field_select)) { |
|
|
|
|
echo $extra_field_select; |
|
|
|
|
$html .= $extra_field_select; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
$form->display(); |
|
|
|
|
$html .= $form->return_form(); |
|
|
|
|
|
|
|
|
|
if ($export_csv) { |
|
|
|
|
$csv_content = array(); |
|
|
|
@ -473,10 +469,10 @@ if (count($a_students) > 0) { |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
// display buttons to un hide hidden columns |
|
|
|
|
echo "<br/><br/><div id='unhideButtons'>"; |
|
|
|
|
$html .= "<div id='unhideButtons'>"; |
|
|
|
|
$index = 0; |
|
|
|
|
foreach ($headers as $header) { |
|
|
|
|
echo "<span title='".get_lang('DisplayColumn')." ".$header."' class='unhide_button hide' onclick='foldup($index)'>". |
|
|
|
|
$html .= "<span title='".get_lang('DisplayColumn')." ".$header."' class='unhide_button hide' onclick='foldup($index)'>". |
|
|
|
|
Display :: return_icon( |
|
|
|
|
'move.png', |
|
|
|
|
get_lang('DisplayColumn'), |
|
|
|
@ -485,15 +481,15 @@ if (count($a_students) > 0) { |
|
|
|
|
)." ".$header."</span>"; |
|
|
|
|
$index++; |
|
|
|
|
} |
|
|
|
|
echo "</div>"; |
|
|
|
|
$html .= "</div>"; |
|
|
|
|
// Display the table |
|
|
|
|
echo "<div id='reporting_table'>"; |
|
|
|
|
$table->display(); |
|
|
|
|
echo "</div>"; |
|
|
|
|
$html .= "<div id='reporting_table'>"; |
|
|
|
|
$html .= $table->return_table(); |
|
|
|
|
$html .= "</div>"; |
|
|
|
|
} else { |
|
|
|
|
echo Display::display_warning_message(get_lang('NoUsersInCourse')); |
|
|
|
|
$html .= Display::display_warning_message(get_lang('NoUsersInCourse'), true, true); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
echo Display::panel($html, $titleSession); |
|
|
|
|
// Send the csv file if asked. |
|
|
|
|
if ($export_csv) { |
|
|
|
|
$csv_headers = array(); |
|
|
|
|