@@ -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,7 @@ 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 . ' ' . dialogue_add_user_fullname ($ participant, $ USER , $ cm ), array ('class ' => 'participant ' ));
166
166
}
167
167
$ html .= html_writer::end_div ();
168
168
}
@@ -179,6 +179,7 @@ public function render_conversation(mod_dialogue\conversation $conversation) {
179
179
* @return string
180
180
*/
181
181
public function conversation_listing (\mod_dialogue \conversations $ conversations ) {
182
+ global $ USER ;
182
183
$ dialogue = $ conversations ->dialogue ;
183
184
$ cm = $ conversations ->dialogue ->cm ;
184
185
@@ -241,7 +242,7 @@ public function conversation_listing(\mod_dialogue\conversations $conversations)
241
242
$ displayuser = dialogue_get_user_details ($ dialogue , $ record ->userid );
242
243
$ avatar = $ this ->output ->user_picture ($ displayuser , array ('class ' => 'userpicture img-rounded ' , 'size ' => 48 ));
243
244
$ html .= html_writer::tag ('td ' , $ avatar );
244
- $ html .= html_writer::tag ('td ' , fullname ($ displayuser ));
245
+ $ html .= html_writer::tag ('td ' , dialogue_add_user_fullname ($ displayuser, $ USER , $ cm ));
245
246
}
246
247
247
248
if (isset ($ record ->subject ) && isset ($ record ->body )) {
@@ -257,7 +258,7 @@ public function conversation_listing(\mod_dialogue\conversations $conversations)
257
258
$ participant = dialogue_get_user_details ($ dialogue , $ participantid );
258
259
$ picture = $ this ->output ->user_picture ($ participant ,
259
260
array ('class ' => 'userpicture img-rounded ' , 'size ' => 16 ));
260
- $ html .= html_writer::tag ('span ' , $ picture .' ' .fullname ($ participant ),
261
+ $ html .= html_writer::tag ('span ' , $ picture .' ' .dialogue_add_user_fullname ($ participant, $ USER , $ cm ),
261
262
array ('class ' => 'participant ' ));
262
263
263
264
}
@@ -306,7 +307,7 @@ public function conversation_listing(\mod_dialogue\conversations $conversations)
306
307
* @return string
307
308
*/
308
309
public function render_reply (\mod_dialogue \reply $ reply ) {
309
-
310
+ global $ USER ;
310
311
$ context = $ reply ->dialogue ->context ; // Fetch context from parent dialogue.
311
312
$ cm = $ reply ->dialogue ->cm ; // Fetch course module from parent dialogue.
312
313
$ conversation = $ reply ->conversation ; // Fetch parent conversation.
@@ -326,7 +327,7 @@ public function render_reply(\mod_dialogue\reply $reply) {
326
327
$ html .= html_writer::start_div ('conversation-body ' );
327
328
328
329
$ datestrings = (object ) dialogue_get_humanfriendly_dates ($ reply ->timemodified );
329
- $ datestrings ->fullname = fullname ($ reply ->author );
330
+ $ datestrings ->fullname = dialogue_add_user_fullname ($ reply ->author , $ USER , $ cm );
330
331
if ($ reply ->timemodified >= $ today ) {
331
332
$ repliedbyheader = get_string ('repliedbytoday ' , 'dialogue ' , $ datestrings );
332
333
} else if ($ reply ->timemodified >= $ yearago ) {
0 commit comments