From 31d21f22a515abd5f4b182d7dfb25787fe241c25 Mon Sep 17 00:00:00 2001 From: gustav_delius Date: Mon, 13 Mar 2006 00:20:34 +0000 Subject: [PATCH] Better display of response history --- question/questiontypes/calculated/questiontype.php | 5 +++++ 1 file changed, 5 insertions(+) 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 -- 2.39.5