MDL-63417 lesson: Re-apply class variable to the question response
authorMihail Geshoski <mihail@moodle.com>
Tue, 20 Nov 2018 04:13:38 +0000 (12:13 +0800)
committerMihail Geshoski <mihail@moodle.com>
Wed, 6 Feb 2019 06:56:06 +0000 (14:56 +0800)
mod/lesson/locallib.php

index c38dbe9..fa734d1 100644 (file)
@@ -4192,8 +4192,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('');
                         }
@@ -4207,8 +4208,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('');
                     }