Merge branch 'MDL-64878-master' of git://github.com/damyon/moodle
[moodle.git] / mod / lesson / locallib.php
index 4d55cb4..95850cc 100644 (file)
@@ -4213,8 +4213,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('');
                         }
@@ -4228,8 +4229,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('');
                     }