Fixing page headers

skala
Julio Montoya 14 years ago
parent 478ea23236
commit 686051142e
  1. 18
      main/mySpace/course.php
  2. 12
      main/mySpace/index.php
  3. 21
      main/mySpace/lp_tracking.php
  4. 6
      main/mySpace/myStudents.php
  5. 2
      main/mySpace/student.php
  6. 22
      main/tracking/courseLog.php

@ -7,7 +7,6 @@ $language_file = array ('admin', 'registration', 'index', 'trad4all', 'tracking'
$cidReset = true;
require_once '../inc/global.inc.php';
require_once api_get_path(LIBRARY_PATH).'export.lib.inc.php';
require_once api_get_path(LIBRARY_PATH).'thematic.lib.php';
@ -98,15 +97,10 @@ if (api_is_drh() || api_is_session_admin() || api_is_platform_admin()) {
echo '</span>';
}
echo '</div>';
echo '<h2>'.$title.'</h2>';
echo Display::page_subheader($title);
}
// Database Table Definitions
$tbl_course = Database :: get_main_table(TABLE_MAIN_COURSE);
$tbl_user_course = Database :: get_main_table(TABLE_MAIN_COURSE_USER);
$tbl_user = Database :: get_main_table(TABLE_MAIN_USER);
$tbl_session_course = Database :: get_main_table(TABLE_MAIN_SESSION_COURSE);
$tbl_session = Database :: get_main_table(TABLE_MAIN_SESSION);
$tbl_session_course_user = Database :: get_main_table(TABLE_MAIN_SESSION_COURSE_USER);
if (isset($_GET['action'])) {
@ -126,15 +120,7 @@ if ($show_import_icon) {
}
if (!api_is_drh() && !api_is_session_admin() && !api_is_platform_admin()) {
/*if (api_is_platform_admin()) {
if (empty($id_session)) {
$courses = CourseManager::get_real_course_list();
} else {
$courses = Tracking::get_courses_list_from_session($id_session);
}
} else {*/
$courses = Tracking::get_courses_followed_by_coach($_user['user_id'], $id_session);
//}
$courses = Tracking::get_courses_followed_by_coach($_user['user_id'], $id_session);
$a_courses = array_keys($courses);
}

@ -259,7 +259,7 @@ if (empty($session_id)) {
if ($nb_students > 0 && $view != 'admin') {
echo Display::tag('h2', '<img src="'.api_get_path(WEB_IMG_PATH).'students.gif">&nbsp;'.get_lang('Students').' ('.$nb_students.')');
echo Display::page_subheader('<img src="'.api_get_path(WEB_IMG_PATH).'students.gif">&nbsp;'.get_lang('Students').' ('.$nb_students.')');
// average progress
$avg_total_progress = $avg_total_progress / $nb_students;
@ -352,14 +352,12 @@ if ($count_courses || $count_sessions) {
}
}
if (api_is_allowed_to_create_course() && $view == 'teacher') {
//Courses
if ($count_courses) {
echo Display::tag('h2', $title);
echo Display::page_subheader($title);
$table = new SortableTable('courses_my_space', 'get_number_of_courses', array('MySpace','get_course_data'));
$parameters['view'] = 'teacher';
@ -390,7 +388,7 @@ if (api_is_allowed_to_create_course() && $view == 'teacher') {
// Display list of sessions
if ($count_sessions > 0 && !isset($_GET['session_id'])) {
echo '<h2><img src="'.api_get_path(WEB_IMG_PATH).'session.png">&nbsp;'.get_lang('Sessions').' ('.$count_sessions.')'.'</h2>';
echo Display::page_subheader('<img src="'.api_get_path(WEB_IMG_PATH).'session.png">&nbsp;'.get_lang('Sessions').' ('.$count_sessions.')');
$table = new SortableTable('tracking_sessions_myspace', 'count_sessions_coached');
$table->set_header(0, get_lang('Title'), false);
$table->set_header(1, get_lang('Date'), false);
@ -730,6 +728,4 @@ if (!$export_csv) {
function get_number_of_courses() {
global $courses;
return count($courses);
}
}

@ -65,26 +65,7 @@ if (!empty($_GET['origin']) && $_GET['origin'] == 'user_course') {
}
$interbreadcrumb[] = array("url" => "myStudents.php?student=".Security::remove_XSS($_GET['student_id'])."&course=".$cidReq."&details=true&origin=".Security::remove_XSS($_GET['origin']) , "name" => get_lang("DetailsStudentInCourse"));
$nameTools = get_lang('LearningPathDetails');
$htmlHeadXtra[] = '
<style>
div.title {
font-weight : bold;
text-align : left;
}
div.mystatusfirstrow {
font-weight : bold;
text-align : left;
}
div.description {
font-family : Arial, Helvetica, sans-serif;
font-size: 10px;
color: Silver;
}
</style>';
Display :: display_header($nameTools);
$lp_id = intval($_GET['lp_id']);
@ -106,7 +87,7 @@ $session_name = api_get_session_name($session_id);
$table_title = ($session_name? Display::return_icon('session.png', get_lang('Session'), array(), ICON_SIZE_SMALL).' '.$session_name.' ':' ').
Display::return_icon('course.png', get_lang('Course'), array(), ICON_SIZE_SMALL).' '.$course_info['name'].' '.
Display::return_icon('user.png', get_lang('User'), array(), ICON_SIZE_SMALL).' '.$name;
echo '<h2>'.$table_title.'</h2>';
echo Display::page_subheader($table_title);
echo '<h3>'.Display::return_icon('learnpath.png', get_lang('ToolLearnpath'), array(), ICON_SIZE_SMALL).' '.$lp_title.'</h3>';
$list = learnpath :: get_flat_ordered_items_list($lp_id, 0, $course_info['real_id']);

@ -261,6 +261,7 @@ while ($row = Database :: fetch_array($rs)) {
}
if (empty($courses_in_session)) {
Display :: display_header($nameTools);
echo '<div class="actions">';
echo '<a href="javascript: window.back();" ">'.Display::return_icon('back.png', get_lang('Back'),'',ICON_SIZE_MEDIUM).'</a>';
echo '</div>';
@ -271,7 +272,6 @@ if (empty($courses_in_session)) {
Display :: display_header($nameTools);
if (!empty($student_id)) {
if (api_is_drh() && !UserManager::is_user_followed_by_drh($student_id, api_get_user_id())) {
@ -398,7 +398,7 @@ if (!empty($student_id)) {
$info_course = CourseManager :: get_course_information($get_course_code);
$table_title = Display::return_icon('user.png', get_lang('User'), array(), ICON_SIZE_SMALL).api_get_person_name($info_user['firstname'], $info_user['lastname']);
echo '<h2>'.$table_title.'</h2>';
echo Display::page_subheader($table_title);
?>
<table width="100%" border="0">
@ -538,7 +538,7 @@ if (!empty($info_course['title'])) {
$table_title .= ($info_course ? Display::return_icon('course.png', get_lang('Course'), array(), ICON_SIZE_SMALL).' '.$info_course['title'].' ':'');
}
echo Display::tag('h2', $table_title);
echo Display::page_subheader($table_title);
if (empty($_GET['details'])) {

@ -118,7 +118,7 @@ if (api_is_allowed_to_create_course() || api_is_drh()) {
<a href="javascript: void(0);" onclick="javascript: window.print();"><img align="absbottom" src="../img/printmgr.gif">&nbsp;'.get_lang('Print').'</a>
<a href="'.api_get_self().'?export=csv"><img align="absbottom" src="../img/excel.gif">&nbsp;'.get_lang('ExportAsCSV').'</a>
</div></div>';
echo '<h2>'.$title.'</h2>';
echo Display::page_subheader($title);
}
if (isset($_GET['id_coach'])) {

@ -231,7 +231,7 @@ if ($_GET['studentlist'] == 'false') {
// learning path tracking
echo '<div class="report_section">
<h2>'.Display::return_icon('scorms.gif',get_lang('AverageProgressInLearnpath')).get_lang('AverageProgressInLearnpath').'</h2>
'.Display::page_subheader(Display::return_icon('scorms.gif',get_lang('AverageProgressInLearnpath')).get_lang('AverageProgressInLearnpath')).'
<table class="data_table">';
$list = new LearnpathList('', $course_code, $session_id);
@ -281,7 +281,7 @@ if ($_GET['studentlist'] == 'false') {
// Exercices tracking.
echo '<div class="report_section">
<h2>'.Display::return_icon('quiz.gif',get_lang('AverageResultsToTheExercices')).get_lang('AverageResultsToTheExercices').'</h2>
'.Display::page_subheader(Display::return_icon('quiz.gif',get_lang('AverageResultsToTheExercices')).get_lang('AverageResultsToTheExercices')).'
<table class="data_table">';
$course_id = api_get_course_int_id();
@ -327,8 +327,8 @@ if ($_GET['studentlist'] == 'false') {
// Forums tracking.
echo '<div class="report_section">
<h2>'.Display::return_icon('forum.gif', get_lang('Forum')).get_lang('Forum').'&nbsp;-&nbsp;<a href="../forum/index.php?cidReq='.$_course['id'].'">'.get_lang('SeeDetail').'</a></h2>
<table class="data_table">';
'.Display::page_subheader(Display::return_icon('forum.gif', get_lang('Forum')).get_lang('Forum').'&nbsp;-&nbsp;<a href="../forum/index.php?cidReq='.$_course['id'].'">'.get_lang('SeeDetail').'</a>').
'<table class="data_table">';
$count_number_of_posts_by_course = Tracking :: count_number_of_posts_by_course($course_code, $session_id);
$count_number_of_forums_by_course = Tracking :: count_number_of_forums_by_course($course_code, $session_id);
$count_number_of_threads_by_course = Tracking :: count_number_of_threads_by_course($course_code, $session_id);
@ -347,7 +347,7 @@ if ($_GET['studentlist'] == 'false') {
// Chat tracking.
echo '<div class="report_section">
<h2>'.Display::return_icon('chat.gif',get_lang('Chat')).get_lang('Chat').'</h2>
'.Display::page_subheader(Display::return_icon('chat.gif',get_lang('Chat')).get_lang('Chat')).'
<table class="data_table">';
$chat_connections_during_last_x_days_by_course = Tracking::chat_connections_during_last_x_days_by_course($course_code, 7, $session_id);
if ($export_csv) {
@ -361,7 +361,7 @@ if ($_GET['studentlist'] == 'false') {
// Tools tracking.
echo '<div class="report_section">
<h2>'.Display::return_icon('acces_tool.gif', get_lang('ToolsMostUsed')).get_lang('ToolsMostUsed').'</h2>
'.Display::page_subheader(Display::return_icon('acces_tool.gif', get_lang('ToolsMostUsed')).get_lang('ToolsMostUsed')).'
<table class="data_table">';
$tools_most_used = Tracking::get_tools_most_used_by_course($course_code, $session_id);
@ -398,7 +398,7 @@ if ($_GET['studentlist'] == 'false') {
}
echo '<a name="documents_tracking" id="a"></a><div class="report_section">
<h2>'.Display::return_icon('documents.gif',get_lang('DocumentsMostDownloaded')).'&nbsp;'.get_lang('DocumentsMostDownloaded').$link.'</h2>
'.Display::page_subheader(Display::return_icon('documents.gif',get_lang('DocumentsMostDownloaded')).'&nbsp;'.get_lang('DocumentsMostDownloaded').$link).'
<table class="data_table">';
$documents_most_downloaded = Tracking::get_documents_most_downloaded_by_course($course_code, $session_id, $num);
@ -433,7 +433,7 @@ if ($_GET['studentlist'] == 'false') {
// links tracking
echo '<div class="report_section">
<h2>'.Display::return_icon('link.gif',get_lang('LinksMostClicked')).'&nbsp;'.get_lang('LinksMostClicked').'</h2>
'.Display::page_subheader(Display::return_icon('link.gif',get_lang('LinksMostClicked')).'&nbsp;'.get_lang('LinksMostClicked')).'
<table class="data_table">';
$links_most_visited = Tracking::get_links_most_visited_by_course($course_code, $session_id);
@ -503,10 +503,10 @@ if ($_GET['studentlist'] == 'false') {
$course_name = get_lang('Course').' '.$course_info['name'];
if ($session_id) {
echo '<h2>'.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.'</h2>';
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);
} else {
echo '<h2>'.Display::return_icon('course.png', get_lang('Course'), array(), ICON_SIZE_SMALL).' '.$course_info['name'].'</h2>';
echo Display::page_subheader(Display::return_icon('course.png', get_lang('Course'), array(), ICON_SIZE_SMALL).' '.$course_info['name']);
}
$extra_field_select = TrackingCourseLog::display_additional_profile_fields();

Loading…
Cancel
Save