Skip to content

Commit 0c9acfc

Browse files
committed
Fixing LP table
1 parent d59f5f6 commit 0c9acfc

File tree

2 files changed

+25
-25
lines changed

2 files changed

+25
-25
lines changed

main/css/chamilo/default.css

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2106,15 +2106,12 @@ padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;}
21062106
border:1px solid #E1E1E0;
21072107
}
21082108
.small {
2109-
font-family: Verdana, Arial, Helvetica, sans-serif;
21102109
font-size: 11px
21112110
}
21122111
.xsmall {
2113-
font-family: Verdana, Arial, Helvetica, sans-serif;
2114-
font-size: 11px
2112+
font-size: 10px
21152113
}
21162114
.xxsmall {
2117-
font-family: Verdana, Arial, Helvetica, sans-serif;
21182115
font-size: 9px
21192116
}
21202117
#glossary_menu li {

main/newscorm/lp_list.php

Lines changed: 24 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -125,17 +125,17 @@ function confirmation(name) {
125125

126126
/* CURRENT DIRECTORY */
127127

128-
echo '<tr>';
129-
echo '<th width="50%">'.get_lang('Title').'</th>';
130-
131-
if ($is_allowed_to_edit) {
132-
echo '<th>'.get_lang('PublicationDate').'</th>';
133-
echo '<th>'.get_lang('ExpirationDate').'</th>';
134-
}
135-
echo '<th>'.get_lang('Progress')."</th>";
136-
128+
echo '<tr>';
129+
137130
if ($is_allowed_to_edit) {
138-
echo '<th>'.get_lang('AuthoringOptions')."</th>";
131+
echo '<th width="30%">'.get_lang('Title').'</th>';
132+
echo '<th>'.get_lang('PublicationDate').'</th>';
133+
echo '<th>'.get_lang('ExpirationDate').'</th>';
134+
echo '<th>'.get_lang('Progress')."</th>";
135+
echo '<th width="240px">'.get_lang('AuthoringOptions')."</th>";
136+
} else {
137+
echo '<th width="50%">'.get_lang('Title').'</th>';
138+
echo '<th>'.get_lang('Progress')."</th>";
139139
}
140140
echo '</tr>';
141141

@@ -203,8 +203,7 @@ function confirmation(name) {
203203
if (!empty($details['expired_on'])) {
204204
$end_time = api_convert_and_format_date($details['expired_on'], DATE_TIME_FORMAT_LONG);
205205
}
206-
}
207-
206+
}
208207

209208
$counter++;
210209
if (($counter % 2) == 0) { $oddclass = 'row_odd'; } else { $oddclass = 'row_even'; }
@@ -254,8 +253,12 @@ function confirmation(name) {
254253

255254
$lp_theme_css = $mystyle;
256255

257-
if ($display_progress_bar) {
258-
$dsp_progress = '<td><div style="width:125px">'.learnpath::get_progress_bar('%',learnpath::get_db_progress($id, api_get_user_id(), '%', '', false, api_get_session_id())).'</div></td>';
256+
if ($display_progress_bar) {
257+
if ($is_allowed_to_edit) {
258+
$dsp_progress = '<td>'.learnpath::get_db_progress($id, api_get_user_id(), '%', '', false, api_get_session_id()).'</td>';
259+
} else {
260+
$dsp_progress = '<td><div style="width:125px">'.learnpath::get_progress_bar('%',learnpath::get_db_progress($id, api_get_user_id(), '%', '', false, api_get_session_id())).'</div></td>';
261+
}
259262
} else {
260263
$dsp_progress = '<td style="padding-top:1em;"><div style="width:125px">'.learnpath::get_db_progress($id, api_get_user_id(), 'both','',false, api_get_session_id()).'</div></td>';
261264
}
@@ -324,11 +327,11 @@ function confirmation(name) {
324327

325328
// Session test not necessary if we want to show base course learning paths inside the session (see http://support.chamilo.org/projects/chamilo-18/wiki/Tools_and_sessions).
326329
//if ($current_session == $details['lp_session']) {
327-
if ($details['lp_visibility'] == 0) {
328-
$dsp_visible = "<a href=\"".api_get_self()."?".api_get_cidreq()."&lp_id=$id&action=toggle_visible&new_status=1\">".Display::return_icon('invisible.png', get_lang('Show'),'','22')."</a>";
329-
} else {
330-
$dsp_visible = "<a href='".api_get_self()."?".api_get_cidreq()."&lp_id=$id&action=toggle_visible&new_status=0'>" .Display::return_icon('visible.png', get_lang('Hide'),'','22')."</a>";
331-
}
330+
if ($details['lp_visibility'] == 0) {
331+
$dsp_visible = "<a href=\"".api_get_self()."?".api_get_cidreq()."&lp_id=$id&action=toggle_visible&new_status=1\">".Display::return_icon('invisible.png', get_lang('Show'),'','22')."</a>";
332+
} else {
333+
$dsp_visible = "<a href='".api_get_self()."?".api_get_cidreq()."&lp_id=$id&action=toggle_visible&new_status=0'>" .Display::return_icon('visible.png', get_lang('Hide'),'','22')."</a>";
334+
}
332335
//} else {
333336
// $dsp_visible = '<img src="../img/invisible.gif" border="0" title="'.get_lang('Show').'" />';
334337
//}
@@ -483,8 +486,8 @@ function confirmation(name) {
483486
}
484487
}
485488
if ($is_allowed_to_edit) {
486-
$start_time = Display::tag('td', $start_time);
487-
$end_time = Display::tag('td', $end_time);
489+
$start_time = Display::tag('td', Display::div($start_time, array('class'=>'small')));
490+
$end_time = Display::tag('td', Display::div($end_time, array('class'=>'small')));
488491
} else {
489492
$start_time = $end_time= '';
490493
}

0 commit comments

Comments
 (0)