MDL-63417 lesson: Re-apply class variable to the question response

This commit is contained in:
Mihail Geshoski
2019-02-06 15:02:17 +08:00
parent 2188da9eed
commit 7cfe8b3567
+6 -4
View File
@@ -4187,8 +4187,9 @@ abstract class lesson_page extends lesson_base {
if (!empty(trim($response))) {
$studentresponse = isset($result->responseformat) ?
$this->format_response($response, $context, $result->responseformat, $options) : $response;
$table->data[] = array('<em>'.get_string("response", "lesson").
'</em>: <br/>'.$studentresponse);
$studentresponsecontent = html_writer::div('<em>' . get_string("response", "lesson") .
'</em>: <br/>' . $studentresponse, $class);
$table->data[] = array($studentresponsecontent);
} else {
$table->data[] = array('');
}
@@ -4202,8 +4203,9 @@ abstract class lesson_page extends lesson_base {
$studentresponse = isset($result->responseformat) ?
$this->format_response($result->response, $context, $result->responseformat,
$result->answerid, $options) : $result->response;
$table->data[] = array('<em>'.get_string("response", "lesson").
'</em>: <br/>'.$studentresponse);
$studentresponsecontent = html_writer::div('<em>' . get_string("response", "lesson") .
'</em>: <br/>' . $studentresponse, $class);
$table->data[] = array($studentresponsecontent);
} else {
$table->data[] = array('');
}