Use Bootstrap's responsive style on tables - refs BT#10856 #ofj

1.10.x
Angel Fernando Quiroz Campos 10 years ago
parent 1c24300489
commit 977f9da118
  1. 91
      main/mySpace/myStudents.php

@ -315,7 +315,7 @@ $token = Security::get_token();
if (!empty($student_id)) { if (!empty($student_id)) {
// Actions bar // Actions bar
echo '<div class="actions">'; echo '<div class="actions">';
echo '<a href="javascript: window.history.go(-1);" ">'. echo '<a href="javascript: window.history.go(-1);">'.
Display::return_icon('back.png', get_lang('Back'),'',ICON_SIZE_MEDIUM).'</a>'; Display::return_icon('back.png', get_lang('Back'),'',ICON_SIZE_MEDIUM).'</a>';
echo '<a href="javascript: void(0);" onclick="javascript: window.print();">'. echo '<a href="javascript: void(0);" onclick="javascript: window.print();">'.
@ -469,19 +469,18 @@ if (!empty($student_id)) {
echo Display::page_subheader($table_title); echo Display::page_subheader($table_title);
echo '<table width="100%" border="0">';
echo '<tr>';
$userPicture = UserManager::getUserPicture($user_info['user_id']); $userPicture = UserManager::getUserPicture($user_info['user_id']);
echo '<img src="' . $userPicture . '" />';
echo '</td>';
?> ?>
<td width="40%" valign="top"> <img src="<?php echo $userPicture ?>">
<table width="100%" class="data_table"> <div class="row">
<tr> <div class="col-sm-6">
<th><?php echo get_lang('Information'); ?></th> <table class="table table-striped table-hover">
</tr> <thead>
<tr>
<th><?php echo get_lang('Information'); ?></th>
</tr>
</thead>
<tbody>
<tr> <tr>
<td><?php echo get_lang('Name') . ' : '.$user_info['complete_name']; ?></td> <td><?php echo get_lang('Name') . ' : '.$user_info['complete_name']; ?></td>
</tr> </tr>
@ -534,14 +533,17 @@ if (!empty($student_id)) {
<?php <?php
} }
?> ?>
</tbody>
</table> </table>
</td> </div>
<div class="col-sm-6">
<td class="borderLeft" width="35%" valign="top"> <table class="table table-striped table-hover">
<table width="100%" class="data_table"> <thead>
<tr> <tr>
<th colspan="2"><?php echo get_lang('Tracking'); ?></th> <th colspan="2" class="text-center"><?php echo get_lang('Tracking'); ?></th>
</tr> </tr>
</thead>
<tbody>
<tr><td align="right"><?php echo get_lang('FirstLoginInPlatform') ?></td> <tr><td align="right"><?php echo get_lang('FirstLoginInPlatform') ?></td>
<td align="left"><?php echo $first_connection_date ?></td> <td align="left"><?php echo $first_connection_date ?></td>
</tr> </tr>
@ -577,10 +579,10 @@ if (!empty($student_id)) {
echo '</tr>'; echo '</tr>';
} }
} ?> } ?>
</tbody>
</table> </table>
</td> </div>
</tr> </div>
</table>
<?php <?php
$table_title = ''; $table_title = '';
@ -638,7 +640,9 @@ if (!empty($student_id)) {
// Courses // Courses
echo '<h3>'.$title.'</h3>'; echo '<h3>'.$title.'</h3>';
echo '<table class="data_table courses-tracking">'; echo '<div class="table-respondive">';
echo '<table class="table table-striped table-hover courses-tracking">';
echo '<thead>';
echo '<tr> echo '<tr>
<th>'.get_lang('Course').'</th> <th>'.get_lang('Course').'</th>
<th>'.get_lang('Time').'</th> <th>'.get_lang('Time').'</th>
@ -648,6 +652,8 @@ if (!empty($student_id)) {
<th>'.get_lang('Evaluations').'</th> <th>'.get_lang('Evaluations').'</th>
<th>'.get_lang('Details').'</th> <th>'.get_lang('Details').'</th>
</tr>'; </tr>';
echo '</thead>';
echo '<tbody>';
if (!empty($courses)) { if (!empty($courses)) {
foreach ($courses as $courseId) { foreach ($courses as $courseId) {
@ -727,7 +733,9 @@ if (!empty($student_id)) {
} else { } else {
echo "<tr><td colspan='5'>".get_lang('NoCourse')."</td></tr>"; echo "<tr><td colspan='5'>".get_lang('NoCourse')."</td></tr>";
} }
echo '</tbody>';
echo '</table>'; echo '</table>';
echo '</div>';
} }
} else { } else {
if ($user_info['status'] != INVITEE) { if ($user_info['status'] != INVITEE) {
@ -768,7 +776,9 @@ if (!empty($student_id)) {
if (count($rs_lp) > 0) { if (count($rs_lp) > 0) {
?> ?>
<!-- LPs--> <!-- LPs-->
<table class="data_table"> <div class="table-responsive">
<table class="table table-striped table-hover">
<thead>
<tr> <tr>
<th><?php echo get_lang('Learnpaths');?></th> <th><?php echo get_lang('Learnpaths');?></th>
<th><?php <th><?php
@ -793,6 +803,8 @@ if (!empty($student_id)) {
} }
?> ?>
</tr> </tr>
</thead>
<tbody>
<?php <?php
$i = 0; $i = 0;
@ -935,11 +947,15 @@ if (!empty($student_id)) {
//echo '<tr><td colspan="6">'.get_lang('NoLearnpath').'</td></tr>'; //echo '<tr><td colspan="6">'.get_lang('NoLearnpath').'</td></tr>';
} }
?> ?>
</tbody>
</table> </table>
</div>
<?php } ?> <?php } ?>
<!-- line about exercises --> <!-- line about exercises -->
<?php if ($user_info['status'] != INVITEE) { ?> <?php if ($user_info['status'] != INVITEE) { ?>
<table class="data_table"> <div class="table-responsive">
<table class="table table-striped table-hover">
<thead>
<tr> <tr>
<th><?php echo get_lang('Exercises'); ?></th> <th><?php echo get_lang('Exercises'); ?></th>
<th><?php echo get_lang('LearningPath');?></th> <th><?php echo get_lang('LearningPath');?></th>
@ -948,6 +964,8 @@ if (!empty($student_id)) {
<th><?php echo get_lang('LatestAttempt'); ?></th> <th><?php echo get_lang('LatestAttempt'); ?></th>
<th><?php echo get_lang('AllAttempts'); ?></th> <th><?php echo get_lang('AllAttempts'); ?></th>
</tr> </tr>
</thead>
<tbody>
<?php <?php
$csv_content[] = array(); $csv_content[] = array();
@ -1052,7 +1070,11 @@ if (!empty($student_id)) {
} else { } else {
echo '<tr><td colspan="6">'.get_lang('NoExercise').'</td></tr>'; echo '<tr><td colspan="6">'.get_lang('NoExercise').'</td></tr>';
} }
echo '</table>'; ?>
</tbody>
</table>
</div>
<?php
} }
//@when using sessions we do not show the survey list //@when using sessions we do not show the survey list
@ -1098,8 +1120,16 @@ if (!empty($student_id)) {
} }
// line about other tools // line about other tools
echo '<table class="data_table">'; ?>
<div class="table-responsive">
<table class="table table-striped table-hover">
<thead>
<tr>
<th colspan="2"><?php echo get_lang('OtherTools'); ?></th>
</tr>
</thead>
<tbody>
<?php
$csv_content[] = array (); $csv_content[] = array ();
$nb_assignments = Tracking::count_student_assignments($student_id, $course_code, $sessionId); $nb_assignments = Tracking::count_student_assignments($student_id, $course_code, $sessionId);
$messages = Tracking::count_student_messages($student_id, $course_code, $sessionId); $messages = Tracking::count_student_messages($student_id, $course_code, $sessionId);
@ -1137,9 +1167,6 @@ if (!empty($student_id)) {
$chat_last_connection $chat_last_connection
); );
?> ?>
<tr>
<th colspan="2"><?php echo get_lang('OtherTools'); ?></th>
</tr>
<tr><!-- assignments --> <tr><!-- assignments -->
<td width="40%"><?php echo get_lang('Student_publication') ?></td> <td width="40%"><?php echo get_lang('Student_publication') ?></td>
<td><?php echo $nb_assignments ?></td> <td><?php echo $nb_assignments ?></td>
@ -1164,11 +1191,9 @@ if (!empty($student_id)) {
<td><?php echo get_lang('ChatLastConnection') ?></td> <td><?php echo get_lang('ChatLastConnection') ?></td>
<td><?php echo $chat_last_connection; ?></td> <td><?php echo $chat_last_connection; ?></td>
</tr> </tr>
</tbody>
</table> </table>
</td> </div>
</tr>
</table>
<?php <?php
} //end details } //end details
} }

Loading…
Cancel
Save