From: gustav_delius Date: Mon, 13 Mar 2006 00:20:34 +0000 (+0000) Subject: Better display of response history X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=31d21f22a515abd5f4b182d7dfb25787fe241c25;p=moodle.git Better display of response history --- diff --git a/question/questiontypes/calculated/questiontype.php b/question/questiontypes/calculated/questiontype.php index b30a4aca44..a2279cd632 100644 --- a/question/questiontypes/calculated/questiontype.php +++ b/question/questiontypes/calculated/questiontype.php @@ -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