@@ -71,7 +71,7 @@ public function render_conversation(mod_dialogue\conversation $conversation) {
71
71
$ html .= html_writer::start_div ('conversation-body ' );
72
72
73
73
$ datestrings = (object ) dialogue_get_humanfriendly_dates ($ conversation ->timemodified );
74
- $ datestrings ->fullname = fullname ($ conversation ->author );
74
+ $ datestrings ->fullname = dialogue_add_user_fullname ($ conversation ->author , $ USER , $ cm );
75
75
if ($ conversation ->timemodified >= $ today ) {
76
76
$ openedbyheader = get_string ('openedbytoday ' , 'dialogue ' , $ datestrings );
77
77
} else if ($ conversation ->timemodified >= $ yearago ) {
@@ -145,7 +145,7 @@ public function render_conversation(mod_dialogue\conversation $conversation) {
145
145
$ html .= html_writer::start_tag ('tr ' );
146
146
$ picture = $ this ->output ->user_picture ($ person , array ('class ' => 'userpicture img-rounded ' , 'size ' => 20 ));
147
147
$ html .= html_writer::tag ('td ' , $ picture );
148
- $ html .= html_writer::tag ('td ' , fullname ($ person ));
148
+ $ html .= html_writer::tag ('td ' , dialogue_add_user_fullname ($ person, $ USER , $ cm ));
149
149
$ html .= html_writer::tag ('td ' , $ sentonstring . userdate ($ receivedby ->timemodified ));
150
150
$ html .= html_writer::end_tag ('tr ' );
151
151
}
@@ -162,7 +162,8 @@ public function render_conversation(mod_dialogue\conversation $conversation) {
162
162
$ html .= ' ' . get_string ('participants ' , 'dialogue ' );
163
163
foreach ($ participants as $ participant ) {
164
164
$ picture = $ this ->output ->user_picture ($ participant , array ('class ' => 'userpicture img-rounded ' , 'size ' => 20 ));
165
- $ html .= html_writer::tag ('span ' , $ picture . ' ' . fullname ($ participant ), array ('class ' => 'participant ' ));
165
+ $ html .= html_writer::tag ('span ' , $ picture . ' '
166
+ . dialogue_add_user_fullname ($ participant , $ USER , $ cm ), array ('class ' => 'participant ' ));
166
167
}
167
168
$ html .= html_writer::end_div ();
168
169
}
@@ -179,6 +180,7 @@ public function render_conversation(mod_dialogue\conversation $conversation) {
179
180
* @return string
180
181
*/
181
182
public function conversation_listing (\mod_dialogue \conversations $ conversations ) {
183
+ global $ USER ;
182
184
$ dialogue = $ conversations ->dialogue ;
183
185
$ cm = $ conversations ->dialogue ->cm ;
184
186
@@ -241,7 +243,7 @@ public function conversation_listing(\mod_dialogue\conversations $conversations)
241
243
$ displayuser = dialogue_get_user_details ($ dialogue , $ record ->userid );
242
244
$ avatar = $ this ->output ->user_picture ($ displayuser , array ('class ' => 'userpicture img-rounded ' , 'size ' => 48 ));
243
245
$ html .= html_writer::tag ('td ' , $ avatar );
244
- $ html .= html_writer::tag ('td ' , fullname ($ displayuser ));
246
+ $ html .= html_writer::tag ('td ' , dialogue_add_user_fullname ($ displayuser, $ USER , $ cm ));
245
247
}
246
248
247
249
if (isset ($ record ->subject ) && isset ($ record ->body )) {
@@ -257,7 +259,7 @@ public function conversation_listing(\mod_dialogue\conversations $conversations)
257
259
$ participant = dialogue_get_user_details ($ dialogue , $ participantid );
258
260
$ picture = $ this ->output ->user_picture ($ participant ,
259
261
array ('class ' => 'userpicture img-rounded ' , 'size ' => 16 ));
260
- $ html .= html_writer::tag ('span ' , $ picture .' ' .fullname ($ participant ),
262
+ $ html .= html_writer::tag ('span ' , $ picture .' ' .dialogue_add_user_fullname ($ participant, $ USER , $ cm ),
261
263
array ('class ' => 'participant ' ));
262
264
263
265
}
@@ -306,7 +308,7 @@ public function conversation_listing(\mod_dialogue\conversations $conversations)
306
308
* @return string
307
309
*/
308
310
public function render_reply (\mod_dialogue \reply $ reply ) {
309
-
311
+ global $ USER ;
310
312
$ context = $ reply ->dialogue ->context ; // Fetch context from parent dialogue.
311
313
$ cm = $ reply ->dialogue ->cm ; // Fetch course module from parent dialogue.
312
314
$ conversation = $ reply ->conversation ; // Fetch parent conversation.
@@ -326,7 +328,7 @@ public function render_reply(\mod_dialogue\reply $reply) {
326
328
$ html .= html_writer::start_div ('conversation-body ' );
327
329
328
330
$ datestrings = (object ) dialogue_get_humanfriendly_dates ($ reply ->timemodified );
329
- $ datestrings ->fullname = fullname ($ reply ->author );
331
+ $ datestrings ->fullname = dialogue_add_user_fullname ($ reply ->author , $ USER , $ cm );
330
332
if ($ reply ->timemodified >= $ today ) {
331
333
$ repliedbyheader = get_string ('repliedbytoday ' , 'dialogue ' , $ datestrings );
332
334
} else if ($ reply ->timemodified >= $ yearago ) {
0 commit comments