fix css test result page CT#7539

1.10.x
aragonc 10 years ago
parent 4236516e9d
commit 6b1637844d
  1. 137
      app/Resources/public/css/base.css
  2. 7
      main/exercice/exercise.class.php
  3. BIN
      main/img/icons/22/test-quiz.png
  4. BIN
      main/img/icons/48/test-quiz.png
  5. 10
      main/inc/lib/exercise.lib.php

@ -2687,27 +2687,70 @@ div.admin_section h4 {
.question_row { .question_row {
margin-bottom: 40px; margin-bottom: 40px;
} }
.question_row_score .title-score .total{
border: 1px solid #ddd;
border-radius: 4px;
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
padding: 10px;
text-align: center;
color: #666;
background: #ffffff; /* Old browsers */
background: -moz-linear-gradient(top, #ffffff 0%, #f6f6f6 47%, #ededed 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(47%,#f6f6f6), color-stop(100%,#ededed)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #ffffff 0%,#f6f6f6 47%,#ededed 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #ffffff 0%,#f6f6f6 47%,#ededed 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, #ffffff 0%,#f6f6f6 47%,#ededed 100%); /* IE10+ */
background: linear-gradient(to bottom, #ffffff 0%,#f6f6f6 47%,#ededed 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#ededed',GradientType=0 ); /* IE6-9 */
}
.question-result .page-header{
margin-top: 20px;
}
.question-result .page-header h2{
font-size: 25px;
}
.question_row_score .title-score .total h3{
margin: 0px;
font-size: 22px;
}
.question_row_answer{
padding: 20px;
border: 1px solid #dddddd;
margin-top: 10px;
margin-bottom: 10px;
border-radius: 4px;
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
}
.question_row_answer .page-header{
margin: 20px 0px;
}
.question_row_answer .page-header h3{
font-size: 22px;
margin: 0;
}
.ribbon { .ribbon {
float:left; float:left;
width:100%; width:100%;
margin-bottom: 20px; margin-bottom: 20px;
border: 1px solid #d2d2d2; border: 1px solid #dddddd;
border-radius: 3px; border-radius: 3px;
box-shadow: 0 1px 3px rgba(0,0,0,0.1); box-shadow: 0 1px 3px rgba(0,0,0,0.1);
position: relative; position: relative;
background: #ffffff; /* Old browsers */
background-image: -ms-linear-gradient(top, #FDFDFD, #F3F5F7); background: -moz-linear-gradient(top, #ffffff 0%, #f6f6f6 47%, #ededed 100%); /* FF3.6+ */
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#FDFDFD), to(#F3F5F7)); background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(47%,#f6f6f6), color-stop(100%,#ededed)); /* Chrome,Safari4+ */
background-image: -webkit-linear-gradient(top, #FDFDFD, #F3F5F7); background: -webkit-linear-gradient(top, #ffffff 0%,#f6f6f6 47%,#ededed 100%); /* Chrome10+,Safari5.1+ */
background-image: -o-linear-gradient(top, #FDFDFD, #F3F5F7); background: -o-linear-gradient(top, #ffffff 0%,#f6f6f6 47%,#ededed 100%); /* Opera 11.10+ */
background-image: -moz-linear-gradient(top, #FDFDFD, #F3F5F7); background: -ms-linear-gradient(top, #ffffff 0%,#f6f6f6 47%,#ededed 100%); /* IE10+ */
background-image: linear-gradient(top, #FDFDFD, #F3F5F7); background: linear-gradient(to bottom, #ffffff 0%,#f6f6f6 47%,#ededed 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#ededed',GradientType=0 ); /* IE6-9 */
} }
.ribbon .rib { .ribbon .rib {
height: 28px; height: 40px;
width: 120px; width: 180px;
display: block; display: block;
line-height: 1.3; line-height: 1.3;
left: -2px; left: -2px;
@ -2716,7 +2759,6 @@ div.admin_section h4 {
margin: 0; margin: 0;
padding: 2px 10px; padding: 2px 10px;
position: relative; position: relative;
text-shadow: 0 1px 1px #111;
border-top: 1px solid #363636; border-top: 1px solid #363636;
border-bottom: 1px solid #202020; border-bottom: 1px solid #202020;
background: #333; background: #333;
@ -2728,7 +2770,7 @@ div.admin_section h4 {
background-image: -moz-linear-gradient(top, #414B57, #2F3741); background-image: -moz-linear-gradient(top, #414B57, #2F3741);
background-image: linear-gradient(top, #414B57, #2F3741); background-image: linear-gradient(top, #414B57, #2F3741);
border-radius: 5px 2px 0 0; border-radius: 4px 0px 0 0;
box-shadow: 0 1px 2px rgba(0,0,0,0.3); box-shadow: 0 1px 2px rgba(0,0,0,0.3);
float: left; float: left;
@ -2748,30 +2790,27 @@ div.admin_section h4 {
} }
.ribbon .rib-error, .ribbon .ribbon-total-error { .ribbon .rib-error, .ribbon .ribbon-total-error {
background:#C83F25; background: #ff3019; /* Old browsers */
background: -moz-linear-gradient(top, #ff3019 0%, #cf0404 100%); /* FF3.6+ */
background-image: -ms-linear-gradient(top, #992800, #C83F25); background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ff3019), color-stop(100%,#cf0404)); /* Chrome,Safari4+ */
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#992800), to(#C83F25)); background: -webkit-linear-gradient(top, #ff3019 0%,#cf0404 100%); /* Chrome10+,Safari5.1+ */
background-image: -webkit-linear-gradient(top, #992800, #C83F25); background: -o-linear-gradient(top, #ff3019 0%,#cf0404 100%); /* Opera 11.10+ */
background-image: -o-linear-gradient(top, #992800, #C83F25); background: -ms-linear-gradient(top, #ff3019 0%,#cf0404 100%); /* IE10+ */
background-image: -moz-linear-gradient(top, #992800, #C83F25); background: linear-gradient(to bottom, #ff3019 0%,#cf0404 100%); /* W3C */
background-image: linear-gradient(top, #992800, #C83F25); filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ff3019', endColorstr='#cf0404',GradientType=0 ); /* IE6-9 */
border-top: 1px solid #C56E5B; border-top: 1px solid #ff3019;
border-bottom: 1px solid #7A290F; border-bottom: 1px solid #cf0404;
float: left; float: left;
} }
.ribbon .rib-gray { .ribbon .rib-gray {
background: #cccccc; background: #cccccc;
background-image: -ms-linear-gradient(top, #bbbbbb, #cccccc); background-image: -ms-linear-gradient(top, #bbbbbb, #cccccc);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#bbbbbb), to(#cccccc)); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#bbbbbb), to(#cccccc));
background-image: -webkit-linear-gradient(top, #bbbbbb, #cccccc); background-image: -webkit-linear-gradient(top, #bbbbbb, #cccccc);
background-image: -o-linear-gradient(top, #bbbbbb, #cccccc); background-image: -o-linear-gradient(top, #bbbbbb, #cccccc);
background-image: -moz-linear-gradient(top, #bbbbbb, #cccccc); background-image: -moz-linear-gradient(top, #bbbbbb, #cccccc);
background-image: linear-gradient(top, #bbbbbb, #cccccc); background-image: linear-gradient(top, #bbbbbb, #cccccc);
border-top: 1px solid #bbbbbb; border-top: 1px solid #bbbbbb;
border-bottom: 1px solid #bbbbbb; border-bottom: 1px solid #bbbbbb;
float: left; float: left;
@ -2786,7 +2825,6 @@ div.admin_section h4 {
background-image: -o-linear-gradient(top, #9CB80A, #768E00); background-image: -o-linear-gradient(top, #9CB80A, #768E00);
background-image: -moz-linear-gradient(top, #9CB80A, #768E00); background-image: -moz-linear-gradient(top, #9CB80A, #768E00);
background-image: linear-gradient(top, #9CB80A, #768E00); background-image: linear-gradient(top, #9CB80A, #768E00);
border-top: 1px solid #A8C31B; border-top: 1px solid #A8C31B;
border-bottom: 1px solid #617700; border-bottom: 1px solid #617700;
float: left; float: left;
@ -2827,7 +2865,7 @@ div.admin_section h4 {
} }
.ribbon .rib-error::before { .ribbon .rib-error::before {
border-color: #610801 transparent transparent transparent; border-color: #cf0404 transparent transparent transparent;
} }
.ribbon .rib-success::before { .ribbon .rib-success::before {
@ -6176,6 +6214,35 @@ div#chat-remote-video video {
vertical-align: middle; vertical-align: middle;
font-size: 12px; font-size: 12px;
} }
.question_row_answer{
font-size: 12px;
padding: 10px;
}
.question_row_answer .page-header{
margin: 10px 0px;
}
.question_row_answer .page-header h3{
font-size: 16px;
margin: 0;
}
.question-result .page-header{
margin-top: 20px;
}
.question-result .page-header h2{
font-size: 20px;
}
.dl-horizontal dt{
float: left;
width: 120px;
overflow: hidden;
clear: left;
text-align: right;
text-overflow: ellipsis;
white-space: nowrap;
}
.dl-horizontal dd{
margin-left: 140px;
}
} }
@media (min-width : 480px) and (max-width: 767px) { @media (min-width : 480px) and (max-width: 767px) {
#learning_path_breadcrumb_zone { #learning_path_breadcrumb_zone {
@ -6202,6 +6269,18 @@ div#chat-remote-video video {
width: 100%; width: 100%;
display: block; display: block;
} }
.question_row_answer .page-header{
margin: 10px 0px;
}
.question_row_answer .page-header h3{
font-size: 16px;
margin: 0;
}
.question-result .page-header{
margin-top: 20px;
}
.question-result .page-header h2{
font-size: 20px;
}
} }

@ -4256,11 +4256,12 @@ class Exercise
if (!empty($ip)) { if (!empty($ip)) {
$array[] = array('title' => get_lang('IP'), 'content' => $ip); $array[] = array('title' => get_lang('IP'), 'content' => $ip);
} }
$html = '<div class="question-result">';
$html = Display::page_header( $html .= Display::page_header(
Display::return_icon('quiz_big.png', get_lang('Result')).' '.$this->exercise.' : '.get_lang('Result') Display::return_icon('test-quiz.png', get_lang('Result'),null, ICON_SIZE_MEDIUM).' '.$this->exercise.' : '.get_lang('Result')
); );
$html .= Display::description($array); $html .= Display::description($array);
$html .="</div>";
return $html; return $html;
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 988 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

@ -3718,7 +3718,7 @@ HTML;
} }
$contents = ob_get_clean(); $contents = ob_get_clean();
$question_content = '<div class="question_row">'; $question_content = '<div class="question_row_answer">';
if ($show_results) { if ($show_results) {
$show_media = false; $show_media = false;
@ -3747,7 +3747,7 @@ HTML;
if ($origin != 'learnpath') { if ($origin != 'learnpath') {
if ($show_results || $show_only_score) { if ($show_results || $show_only_score) {
$total_score_text .= '<div class="question_row">'; $total_score_text .= '<div class="question_row_score">';
$total_score_text .= self::get_question_ribbon( $total_score_text .= self::get_question_ribbon(
$objExercise, $objExercise,
$total_score, $total_score,
@ -3853,7 +3853,7 @@ HTML;
$weight, $weight,
$check_pass_percentage = false $check_pass_percentage = false
) { ) {
$ribbon = '<div class="ribbon">'; $ribbon = '<div class="title-score">';
if ($check_pass_percentage) { if ($check_pass_percentage) {
$is_success = self::is_success_exercise_result( $is_success = self::is_success_exercise_result(
$score, $score,
@ -3871,9 +3871,9 @@ HTML;
$ribbon_total_success_or_error = ' ribbon-total-error'; $ribbon_total_success_or_error = ' ribbon-total-error';
} }
} }
$ribbon .= '<div class="rib rib-total ' . $ribbon_total_success_or_error . '">'; $ribbon .= '<div class="total ' . $ribbon_total_success_or_error . '">';
} else { } else {
$ribbon .= '<div class="rib rib-total">'; $ribbon .= '<div class="total">';
} }
$ribbon .= '<h3>' . get_lang('YourTotalScore') . ":&nbsp;"; $ribbon .= '<h3>' . get_lang('YourTotalScore') . ":&nbsp;";
$ribbon .= self::show_score($score, $weight, false, true); $ribbon .= self::show_score($score, $weight, false, true);

Loading…
Cancel
Save