MDL-47494 gapselect: Latest gapselect qtype fixes from Jamie. #23
authorTim Hunt <T.J.Hunt@open.ac.uk>
Tue, 24 May 2011 17:56:46 +0000 (18:56 +0100)
committerTim Hunt <T.J.Hunt@open.ac.uk>
Tue, 5 Jul 2011 15:45:23 +0000 (16:45 +0100)
question/type/gapselect/questionbase.php [changed mode: 0755->0644]
question/type/gapselect/questiontypebase.php [changed mode: 0755->0644]
question/type/gapselect/styles.css [changed mode: 0755->0644]

old mode 100755 (executable)
new mode 100644 (file)
index e487c52..1b2ed41
@@ -286,7 +286,8 @@ abstract class qtype_gapselect_question_base extends question_graded_automatical
             $choice = $this->choices[$group][$choiceno];
             $parts[$place] = new question_classified_response(
                     $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;
     }
old mode 100755 (executable)
new mode 100644 (file)
index db0a7c9..26c7361
@@ -299,7 +299,8 @@ abstract class qtype_gapselect_base extends question_type {
             foreach ($question->choices[$group] as $i => $choice) {
                 $choices[$i] = new question_possible_response(
                         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();
 
old mode 100755 (executable)
new mode 100644 (file)
index f6931c9..1aeabaf
     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 {
     padding: 0.2em;
 }