]> git.mjollnir.org Git - moodle.git/commitdiff
Better display of response history
authorgustav_delius <gustav_delius>
Mon, 13 Mar 2006 00:20:34 +0000 (00:20 +0000)
committergustav_delius <gustav_delius>
Mon, 13 Mar 2006 00:20:34 +0000 (00:20 +0000)
question/questiontypes/calculated/questiontype.php

index b30a4aca441bfffbe54a6c24fc51c3fe36dce994..a2279cd6320071cf0f89cab93014ecb30c28b205 100644 (file)
@@ -255,6 +255,11 @@ class question_calculated_qtype extends question_dataset_dependent_questiontype
         return parent::grade_responses($numericalquestion, $state, $cmoptions);
     }
 
+    function response_summary($state, $length=80) {
+        // The actual response is the bit after the hyphen
+        return substr($state->answer, strpos($state->answer, '-')+1, $length);
+    }
+
     // ULPGC ecastro
     function check_response(&$question, &$state) {
         // Forward the checking to the virtual qtype