diff --git a/app/Resources/public/css/base.css b/app/Resources/public/css/base.css index b01677019a..672def3dd4 100644 --- a/app/Resources/public/css/base.css +++ b/app/Resources/public/css/base.css @@ -2531,6 +2531,181 @@ div.admin_section h4 { margin-top: 20px; margin-bottom: 25px; } +/* EXERCISE MATFDC */ + +.certaintyQuizBox { + border : 1px solid black; + margin : auto; +} + +.certaintyQuizColumn { + float : left; +} + +/* text at the top of the column */ +.certaint-score { + height : 20px; + margin-bottom: 10px; + padding : 0; + text-align: center; + font-size: 22px; + font-weight: bold; +} +.chart-grid{ + display: grid; + grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); + grid-gap: 30px; + width: 100%; + margin: 0 auto; +} +.chart-title{ + text-align: center; + font-weight: bold; + font-size: 16px; + margin-bottom: 20px; + padding-bottom: 10px; + border-bottom: 1px solid #b3b3b3; + text-transform: uppercase; + background: #ecf0f1; + padding-top: 10px; +} +.certaint-list-two, .certaint-list{ + margin: 0; + padding: 0; + list-style: none; + text-align: center; + position: absolute; + bottom: 0; + display: inline-block; + width: 100%; +} +.certaint-list-two li{ + display: inline-block; + margin-right: 10px; + width: 40%; +} +.certaint-list li{ + width: 50%; + margin: auto; +} +.certaint-list-two li:last-child{ + margin-right: 0; +} +.answers-title{ + text-align: center; + margin-bottom: 20px; + font-weight: bold; +} +.panel-certaint{ + margin-bottom: 20px; + background-color: #FFF; + border: 1px solid #e4e4e4;; + box-shadow: 0 2px 2px rgba(204, 197, 185, 0.5); + padding: 10px; + border-radius: 6px; +} + +.certaint-text{ + text-align: center; + padding: 10px 5px; +} +.certaintyVerticalLine { + float: left; + border-left : 1px solid black; + font-size: 0; +} + +.certaintyQuizClearer { + clear : both; + font-size: 0; + height:0 +} +.chart-legend{ + list-style: none; + margin: 0; + padding: 0; + text-align: center; +} +.chart-legend li{ + display: inline-block; + padding-left: 10px; + padding-right: 10px; + margin-right: 10px; + margin-bottom: 10px; +} +.square_color4{ + color: #1e9c55; +} +.square_color3{ + color: #b1e183; +} +.square_color2{ + color: #f6ba2a; +} +.square_color1{ + color: #f79b88; +} +.square_color0{ + color: #ed4040; +} +.levelbar_1 { + background-color: #1e9c55; + border: 1px solid #1e9c55; +} + +.levelbar_2 { + background-color: #b1e183; + border: 1px solid #b1e183; +} + +.levelbar_3 { + background-color: #f6ba2a; + border: 1px solid #f6ba2a; +} + +.levelbar_4 { + background-color: #f79b88; + border: 1px solid #f79b88; +} + +.levelbar_5 { + background-color: #ed4040; + border: 1px solid #ed4040; +} + +table.certaintyTable { + margin : auto; + border: 1px solid #7FC5FF; +} + +table.certaintyTable th { + text-align: center; + border-bottom: 1px solid #7FC5FF; + background-color: #c9e0ff; +} + +table.certaintyTable td { + padding : 10px; +} + +table.certaintyTable td.borderRight { + border-right: 1px dotted #7FC5FF; +} + +table.certaintyTable td.firstLine { + vertical-align: top; + text-align: center; +} + +table.certaintyTable th.globalChart { + font-size : 18pt; + line-height : 120%; + padding : 20px; +} + +table.certaintyTable td.globalChart { + font-weight : bold; +} /* Exercise clock*/ .count_down { diff --git a/main/exercise/MultipleAnswerTrueFalseDegreeCertainty.php b/main/exercise/MultipleAnswerTrueFalseDegreeCertainty.php index 2d969603f5..c80a8fbf43 100644 --- a/main/exercise/MultipleAnswerTrueFalseDegreeCertainty.php +++ b/main/exercise/MultipleAnswerTrueFalseDegreeCertainty.php @@ -335,7 +335,7 @@ class MultipleAnswerTrueFalseDegreeCertainty extends Question if ($studentDegreeChoicePosition == 3) { $result = [ 'color' => '#000000', - 'background-color' => '#FFFFFF', + 'background-color' => '#F6BA2A', 'status' => self::LEVEL_WHITE, 'label' => get_lang('DegreeOfCertaintyDeclaredIgnorance'), 'description' => get_lang('DegreeOfCertaintyDeclaredIgnoranceDescription'), @@ -346,7 +346,7 @@ class MultipleAnswerTrueFalseDegreeCertainty extends Question if ($studentDegreeChoicePosition >= 6) { $result = [ 'color' => '#FFFFFF', - 'background-color' => '#088A08', + 'background-color' => '#1E9C55', 'status' => self::LEVEL_DARKGREEN, 'label' => get_lang('DegreeOfCertaintyVerySure'), 'description' => get_lang('DegreeOfCertaintyVerySureDescription'), @@ -354,7 +354,7 @@ class MultipleAnswerTrueFalseDegreeCertainty extends Question } elseif ($studentDegreeChoicePosition >= 4 && $studentDegreeChoicePosition <= 5) { $result = [ 'color' => '#000000', - 'background-color' => '#A9F5A9', + 'background-color' => '#B1E183', 'status' => self::LEVEL_LIGHTGREEN, 'label' => get_lang('DegreeOfCertaintyPrettySure'), 'description' => get_lang('DegreeOfCertaintyPrettySureDescription'), @@ -364,7 +364,7 @@ class MultipleAnswerTrueFalseDegreeCertainty extends Question if ($studentDegreeChoicePosition >= 6) { $result = [ 'color' => '#FFFFFF', - 'background-color' => '#FE2E2E', + 'background-color' => '#ED4040', 'status' => self::LEVEL_DARKRED, 'label' => get_lang('DegreeOfCertaintyVeryUnsure'), 'description' => get_lang('DegreeOfCertaintyVeryUnsureDescription'), @@ -372,7 +372,7 @@ class MultipleAnswerTrueFalseDegreeCertainty extends Question } elseif ($studentDegreeChoicePosition >= 4 && $studentDegreeChoicePosition <= 5) { $result = [ 'color' => '#000000', - 'background-color' => '#F6CECE', + 'background-color' => '#F79B88', 'status' => self::LEVEL_LIGHTRED, 'label' => get_lang('DegreeOfCertaintyUnsure'), 'description' => get_lang('DegreeOfCertaintyUnsureDescription'), @@ -498,7 +498,7 @@ class MultipleAnswerTrueFalseDegreeCertainty extends Question if ($category) { $categoryQuestionName = $category->name; } - list($noValue, $height) = self::displayDegreeChart( + list($noValue, $height) = self::displayDegreeChartChildren( $scoreListForCategory, 300, '', @@ -519,8 +519,21 @@ class MultipleAnswerTrueFalseDegreeCertainty extends Question $boxWidth = $sizeRatio * 300 + 54; } - $html = '
| ' @@ -754,16 +839,16 @@ class MultipleAnswerTrueFalseDegreeCertainty extends Question $html .= ' | ||||
|---|---|---|---|---|
| '. + style="width:'.($colWidth * 2).'px; line-height: 15px; font-size:'.$textSize.'%;">'. sprintf(get_lang('IncorrectAnswersX'), $nbResponsesInc).' | '. + style="width:'.$colWidth.'px; line-height: 15px; font-size :'.$textSize.'%;">'. sprintf(get_lang('IgnoranceAnswersX'), $nbResponsesIng).' | '. + style="width:'.($colWidth * 2).'px; line-height: 15px; font-size:'.$textSize.'%;">'. sprintf(get_lang('CorrectAnswersX'), $nbResponsesCor).' | '
;
@@ -791,9 +876,9 @@ class MultipleAnswerTrueFalseDegreeCertainty extends Question
.'%;">'
;
}
- $html .= ' '
+ $html .= ' '
.$scoreOnBottom
- .' ';
+ echo ' | '; echo $answer; echo ' | '; echo $newOptions[$studentChoiceDegree]['name']; @@ -562,9 +562,9 @@ class ExerciseShowFunctions ); echo ' - | + |
'.
nl2br($degreeInfo['label']).
|