diff --git a/user/classes/participants_table.php b/user/classes/participants_table.php index 0224f52c82..48b3c6d3ed 100644 --- a/user/classes/participants_table.php +++ b/user/classes/participants_table.php @@ -266,6 +266,45 @@ class participants_table extends \table_sql { $params = ['contextid' => $this->context->id, 'courseid' => $this->course->id]; $PAGE->requires->js_call_amd('core_user/status_field', 'init', [$params]); } + + $jsoption = 2; + + if ($jsoption == 1) { + // This sadly works only for the first element but this is what we'd like to have - pass a selector + // instead of an element and expect it to also work for other elements added to DOM later. + $PAGE->requires->js_amd_inline(<<requires->js_amd_inline(<<requires->js_amd_inline(<<user_picture($data, array('size' => 35, 'courseid' => $this->course->id, 'includefullname' => true)); + $messagepix = $OUTPUT->pix_icon('t/messages', get_string('sendmessage', 'core_message'), 'core'); + $message = << + + $messagepix + + +EOL; + + return $OUTPUT->user_picture($data, array('size' => 35, 'courseid' => $this->course->id, 'includefullname' => true)) . $message; } /**