Browse Source

Adding session titles see BT#1613

Julio Montoya 14 years ago
parent
commit
b5c49d0264

+ 6 - 1
main/mySpace/lp_tracking.php

@@ -136,13 +136,18 @@ $sql = 'SELECT name
 $rs = Database::query($sql);
 $lp_title = Database::result($rs, 0, 0);
 
-echo '<div class ="actions"><div align="left" style="float:left;margin-top:2px;" ><strong>'.$_course['title'].' - '.$lp_title.' - '.$name.'</strong></div>
+
+echo '<div class ="actions"><div align="left" style="float:left;margin-top:2px;" ><a href="javascript:window.back();">'.Display::return_icon('back.png').get_lang('Back').'</a></div>
 	  <div  align="right">
 			<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&'.Security::remove_XSS($_SERVER['QUERY_STRING']).'"><img align="absbottom" src="../img/csv.gif">&nbsp;'.get_lang('ExportAsCSV').'</a>
 		 </div></div>
 	<div class="clear"></div>';
 
+$table_title = ($session_name? get_lang('Session').' : '.$session_name.' | ':'').get_lang('Course').' : '.$_course['title'].' | '.$name;
+echo '<h2>'.$table_title.'</h2>';
+echo '<h3>'.get_lang('ToolLearnpath').' : '.$lp_title.'</h3>';
+    
 $list = learnpath :: get_flat_ordered_items_list($lp_id);
 $origin = 'tracking';
 if ($export_csv) {

+ 4 - 1
main/mySpace/myStudents.php

@@ -265,6 +265,7 @@ if (!empty ($_GET['student'])) {
 		echo '<a href="access_details.php?student=' . Security :: remove_XSS($_GET['student']) . '&course=' . Security :: remove_XSS($_GET['course']) . '&amp;origin=' . Security :: remove_XSS($_GET['origin']) . '&amp;cidReq='.Security::remove_XSS($_GET['course']).'&amp;id_session='.$session_id.'">' . Display :: return_icon('statistics.gif', get_lang('AccessDetails')) . ' ' . get_lang('AccessDetails') . '</a>';
 	}
 	echo '</div>';
+    
 	
 
 	// is the user online ?
@@ -370,7 +371,9 @@ if (!empty ($_GET['student'])) {
         $session_name = $session_info['name'];
     } // end if(api_get_setting('use_session_mode')=='true')
 
-    $table_title = ($session_name? get_lang('Session').' : '.ucfirst($session_name).' | ':'').get_lang('Course').' : '.$info_course['title'].($coachs_name?'&nbsp;|&nbsp;'.get_lang('Tutor').' : '.stripslashes($coachs_name):'');
+    //$table_title = ($session_name? get_lang('Session').' : '.ucfirst($session_name).' | ':'').get_lang('Course').' : '.$info_course['title'].($coachs_name?'&nbsp;|&nbsp;'.get_lang('Tutor').' : '.stripslashes($coachs_name):'');
+    //Hiding coach name 
+    $table_title = ($session_name? get_lang('Session').' : '.ucfirst($session_name).' | ':'').get_lang('Course').' : '.$info_course['title'].' | '.api_get_person_name($info_user['lastname'], $info_user['firstname']);
     echo '<h2>'.$table_title.'</h2>';
 
 ?>

+ 3 - 3
main/newscorm/lp_stats.php

@@ -69,7 +69,7 @@ if (!empty ($_GET['extend_all'])) {
 }
 
 if ($origin != 'tracking') {
-    $output .= "<tr><td><div class='title'>" . get_lang('ScormMystatus') . "</div></td></tr>";
+    $output .= "<tr><td><h2>" . get_lang('ScormMystatus') . "</h2></td></tr>";
 }
 $output .= "<tr><td>&nbsp;</td></tr>" . "<tr><td>" . "<table border='0' class='data_table'><tr>\n" . '<td width="16">' . $extend_all_link . '</td>' . '<td colspan="4" class="title"><div class="mystatusfirstrow">' . get_lang('ScormLessonTitle') . "</div></td>\n" . '<td colspan="2" class="title"><div class="mystatusfirstrow">' . get_lang('ScormStatus') . "</div></td>\n" . '<td colspan="2" class="title"><div class="mystatusfirstrow">' . get_lang('ScormScore') . "</div></td>\n" . '<td colspan="2" class="title"><div class="mystatusfirstrow">' . get_lang('ScormTime') . "</div></td><td class='title'><div class='mystatusfirstrow'>" .get_lang('Actions') . "</div></td></tr>\n";
 
@@ -520,10 +520,10 @@ if (is_array($list) && count($list) > 0) {
                     $num = Database :: num_rows($resultLastAttempt);
                     if ($num > 0) {
                         if (isset($_GET['extend_attempt']) && $_GET['extend_attempt'] == 1 && (isset($_GET['lp_id']) && $_GET['lp_id'] == $my_lp_id) && (isset($_GET['my_lp_id']) && $_GET['my_lp_id'] == $my_id)  ) {
-                            $correct_test_link = '<a href="' . api_get_self() . '?action=stats' . $my_url_suffix . '&my_ext_lp_id='.$my_id.'"><img src="../img/view_less_stats.gif" alt="fold_view" border="0" title="'.get_lang('HideAllAttempts').'"></a>';
+                            $correct_test_link = '<a href="' . api_get_self() . '?action=stats' . $my_url_suffix . '&session_id='.api_get_session_id().'&my_ext_lp_id='.$my_id.'"><img src="../img/view_less_stats.gif" alt="fold_view" border="0" title="'.get_lang('HideAllAttempts').'"></a>';
                             $extend_attempt = 1;
                         } else {
-                            $correct_test_link = '<a href="' . api_get_self() . '?action=stats&extend_attempt=1'.$my_url_suffix.'&my_lp_id='.$my_id.'"><img src="../img/view_more_stats.gif" alt="extend_view" border="0" title="'.get_lang('ShowAllAttemptsByExercise').'"></a>';
+                            $correct_test_link = '<a href="' . api_get_self() . '?action=stats&extend_attempt=1'.$my_url_suffix.'&session_id='.api_get_session_id().'&my_lp_id='.$my_id.'"><img src="../img/view_more_stats.gif" alt="extend_view" border="0" title="'.get_lang('ShowAllAttemptsByExercise').'"></a>';
                         }
                     } else {
                         $correct_test_link = '-';

+ 15 - 5
main/tracking/courseLog.php

@@ -174,12 +174,9 @@ if ($_GET['studentlist'] == 'false') {
     }
     echo '<a href="'.api_get_self().'?'.api_get_cidreq().'&export=csv&'.$addional_param.'">'.Display::return_icon('csv.gif',get_lang('ExportAsCSV')).get_lang('ExportAsCSV').'</a>';
 }
-if ($_GET['studentlist'] == 'true' || empty($_GET['studentlist'])) {
-    echo TrackingCourseLog::display_additional_profile_fields();
-}
-
 echo '</div>';
 
+
 if ($_GET['studentlist'] == 'false') {
     $course_code = api_get_course_id();
 
@@ -448,8 +445,21 @@ if ($_GET['studentlist'] == 'false') {
 
     $form -> addElement('hidden', 'action', 'add');
     $form -> addElement('hidden', 'remindallinactives', 'true');
+    
     $course_info = api_get_course_info(api_get_course_id());
-    echo '<h2>'.get_lang('Course').' '.$course_info['name'].'</h2>'; 
+    $course_name = get_lang('Course').' '.$course_info['name'];
+
+    
+    if (api_get_session_id()) {
+        echo '<h2>'.get_lang('Session').' '.api_get_session_name(api_get_session_id()).' | '.$course_name.'</h2>';
+    } else {
+        echo '<h2>'.get_lang('Course').' '.$course_info['name'].'</h2>';
+    }
+    
+    echo TrackingCourseLog::display_additional_profile_fields();
+    
+    
+    
     $form -> display();
     // END : form to remind inactives susers