diff --git a/main/css/base.css b/main/css/base.css index ab44d44d83..5bc26073a0 100644 --- a/main/css/base.css +++ b/main/css/base.css @@ -19,7 +19,7 @@ select { visibility: visible; } -.label { +form .label { padding: 1px 3px 2px; font-size: 100%; font-weight: normal; @@ -115,10 +115,13 @@ form .formw input { height:26px; } -#lp_navigation_elem .buttons, -#lp_navigation_elem #progress_bar { - width:130px; - margin:0px 0px 10px 15px; +#lp_navigation_elem .buttons{ + margin-bottom: 5px; +} + +#lp_navigation_elem { + padding-left: 15px; + width: 110px; } * { diff --git a/main/exercice/exercise.lib.php b/main/exercice/exercise.lib.php index a6b5829150..abcf450980 100644 --- a/main/exercice/exercise.lib.php +++ b/main/exercice/exercise.lib.php @@ -1130,9 +1130,9 @@ function get_exam_results_data($from, $number_of_items, $column, $direction, $ex } if ($revised) { - $revised = Display::span(get_lang('Validated'), array('class'=>'label_tag success')); + $revised = Display::label(get_lang('Validated'), 'success'); } else { - $revised = Display::span(get_lang('NotValidated'), array('class'=>'label_tag notice')); + $revised = Display::label(get_lang('NotValidated'), 'info'); } if ($is_allowedToEdit || $is_tutor) { diff --git a/main/exercice/overview.php b/main/exercice/overview.php index 0481863d40..5d2f76f2d8 100644 --- a/main/exercice/overview.php +++ b/main/exercice/overview.php @@ -102,7 +102,6 @@ if ($visible_return['value'] == false) { $exercise_url_button = $visible_return['message']; } - //Message "you already try this exercise" $message = ''; @@ -126,17 +125,17 @@ $table_content = ''; if (!empty($attempts)) { $i = $counter; - foreach ($attempts as $attempt_result) { + foreach ($attempts as $attempt_result) { $score = show_score($attempt_result['exe_result'], $attempt_result['exe_weighting']); $attempt_url = api_get_path(WEB_CODE_PATH).'exercice/result.php?'.api_get_cidreq().'&id='.$attempt_result['exe_id'].'&id_session='.api_get_session_id().'&height=500&width=750'; $attempt_link = Display::url(get_lang('Show'), $attempt_url, array('class'=>'ajax btn')); - $teacher_revised = Display::span(get_lang('Validated'), array('class'=>'label_tag success')); + $teacher_revised = Display::label(get_lang('Validated'), 'success'); //$attempt_link = get_lang('NoResult'); //$attempt_link = Display::return_icon('quiz_na.png', get_lang('NoResult'), array(), ICON_SIZE_SMALL); if ($attempt_result['attempt_revised'] == 0) { - $teacher_revised = Display::span(get_lang('NotValidated'), array('class'=>'label_tag notice')); + $teacher_revised = Display::label(get_lang('NotValidated'), 'info'); } $row = array('count' => $i, 'date' => api_convert_and_format_date($attempt_result['start_date'], DATE_TIME_FORMAT_LONG) @@ -167,8 +166,7 @@ if (!empty($attempts)) { case EXERCISE_FEEDBACK_TYPE_EXAM: $header_names = array(get_lang('Attempt'), get_lang('Date'), get_lang('Score')); break; - } - + } $row = 0; $column = 0; foreach ($header_names as $item) { diff --git a/main/inc/lib/display.lib.php b/main/inc/lib/display.lib.php index ea9a3dd93c..1e41675413 100644 --- a/main/inc/lib/display.lib.php +++ b/main/inc/lib/display.lib.php @@ -1379,4 +1379,32 @@ class Display { return ''; } + function label($content, $type = 'default') { + $class = ''; + switch ($type) { + case 'success': + $class = 'label-success'; + break; + case 'warning': + $class = 'label-warning'; + break; + case 'important': + $class = 'label-important'; + break; + case 'info': + $class = 'label-info'; + break; + case 'inverse': + $class = 'label-inverse'; + break; + } + + $html = ''; + if (!empty($content)) { + $html = ''; + $html .= $content; + $html .=''; + } + return $html; + } } //end class Display