Permalink
Browse files

qtype shortanswer MDL-20380 small refactoring to help subclasses. Tha…

…nks to Oleg Sychev.
  • Loading branch information...
1 parent 8427722 commit e9686d7015c13980a97c58c93745d47164e63508 @timhunt timhunt committed Aug 3, 2010
Showing with 6 additions and 2 deletions.
  1. +6 −2 question/type/shortanswer/questiontype.php
@@ -98,7 +98,6 @@ function save_question_options($question) {
}
function print_question_formulation_and_controls(&$question, &$state, $cmoptions, $options) {
- global $CFG;
/// This implementation is also used by question type 'numerical'
$readonly = empty($options->readonly) ? '' : 'readonly="readonly"';
$formatoptions = new stdClass;
@@ -144,7 +143,12 @@ function print_question_formulation_and_controls(&$question, &$state, $cmoptions
}
/// Removed correct answer, to be displayed later MDL-7496
- include("$CFG->dirroot/question/type/shortanswer/display.html");
+ include($this->get_display_html_path());
+ }
+
+ function get_display_html_path() {
+ global $CFG;
+ return $CFG->dirroot.'/question/type/shortanswer/display.html';
}
function check_response(&$question, &$state) {

0 comments on commit e9686d7

Please sign in to comment.