Merge branch 'MDL-26517' of git://github.com/timhunt/moodle
This commit is contained in:
@@ -127,6 +127,16 @@ class question_essay_qtype extends default_questiontype {
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string response is a response.
|
||||
* @return formatted response
|
||||
*/
|
||||
function format_response($response, $format) {
|
||||
$safeformatoptions = new stdClass();
|
||||
$safeformatoptions->para = false;
|
||||
return s(html_to_text(format_text($response, FORMAT_MOODLE, $safeformatoptions), 0, false));
|
||||
}
|
||||
|
||||
/**
|
||||
* Runs all the code required to set up and save an essay question for testing purposes.
|
||||
* Alternate DB table prefix may be used to facilitate data deletion.
|
||||
|
||||
@@ -1348,13 +1348,15 @@ class default_questiontype {
|
||||
}
|
||||
return $toreturn;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string response is a response.
|
||||
* @return formatted response
|
||||
*/
|
||||
function format_response($response, $format){
|
||||
return s($response);
|
||||
function format_response($response, $format) {
|
||||
return s(html_to_text($this->format_text($response, $format), 0, false));
|
||||
}
|
||||
|
||||
/**
|
||||
* Renders the question for printing and returns the LaTeX source produced
|
||||
*
|
||||
|
||||
@@ -223,6 +223,14 @@ class question_shortanswer_qtype extends default_questiontype {
|
||||
return preg_match($regexp, trim($string));
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string response is a response.
|
||||
* @return formatted response
|
||||
*/
|
||||
function format_response($response, $format){
|
||||
return s($response);
|
||||
}
|
||||
|
||||
/*
|
||||
* Override the parent class method, to remove escaping from asterisks.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user