Commit f1f181f4 authored by Tim Hunt's avatar Tim Hunt
Browse files

MDL-47494 gapselect: Latest gapselect qtype fixes from Jamie. #23

parent 4ce6bba9
...@@ -286,7 +286,8 @@ abstract class qtype_gapselect_question_base extends question_graded_automatical ...@@ -286,7 +286,8 @@ abstract class qtype_gapselect_question_base extends question_graded_automatical
$choice = $this->choices[$group][$choiceno]; $choice = $this->choices[$group][$choiceno];
$parts[$place] = new question_classified_response( $parts[$place] = new question_classified_response(
$choiceno, html_to_text($choice->text, 0, false), $choiceno, html_to_text($choice->text, 0, false),
$this->get_right_choice_for($place) == $response[$fieldname]); ($this->get_right_choice_for($place) == $response[$fieldname])
/ count($this->places));
} }
return $parts; return $parts;
} }
......
...@@ -299,7 +299,8 @@ abstract class qtype_gapselect_base extends question_type { ...@@ -299,7 +299,8 @@ abstract class qtype_gapselect_base extends question_type {
foreach ($question->choices[$group] as $i => $choice) { foreach ($question->choices[$group] as $i => $choice) {
$choices[$i] = new question_possible_response( $choices[$i] = new question_possible_response(
html_to_text($choice->text, 0, false), html_to_text($choice->text, 0, false),
$question->rightchoices[$place] == $i); ($question->rightchoices[$place] == $i)
/ count($question->places));
} }
$choices[null] = question_possible_response::no_response(); $choices[null] = question_possible_response::no_response();
......
...@@ -15,30 +15,6 @@ ...@@ -15,30 +15,6 @@
padding-bottom: 0.5em; padding-bottom: 0.5em;
} }
.que.gapselect .group1 {
background-color: #E4F1FA;
}
.que.gapselect .group2 {
background-color: #DCDCDC;
}
.que.gapselect .group3 {
background-color: #B0C4DE;
}
.que.gapselect .group4 {
background-color: #D8BFD8;
}
.que.gapselect .group5 {
background-color: #87CEFA;
}
.que.gapselect .group6 {
background-color: #DAA520;
}
.que.gapselect .group7 {
background-color: #FFD700;
}
.que.gapselect .group8 {
background-color: #F0E68C;
}
.que.sddl .control { .que.sddl .control {
padding: 0.2em; padding: 0.2em;
} }
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment