echo $OUTPUT->box_start('center');
echo '<table align="center" cellpadding="10"><tr>';
echo '<td align="center">';
- echo print_user_picture($user1, SITEID, $user1->picture, 100, true, true, 'userwindow').'<br />';
+ $userpic = moodle_user_picture::make($user1, SITEID);
+ $userpic->size = 100;
+ $userpic->link = true;
+ echo $OUTPUT->user_picture($userpic).'<br />';
echo fullname($user1);
echo '</td>';
echo '<td align="center">';
echo '<img src="'.$CFG->wwwroot.'/pix/t/right.gif" alt="'.get_string('to').'" />';
echo '</td>';
echo '<td align="center">';
- echo print_user_picture($user2, SITEID, $user2->picture, 100, true, true, 'userwindow').'<br />';
+ $userpic = moodle_user_picture::make($user2, SITEID);
+ $userpic->size = 100;
+ $userpic->link = true;
+ echo $OUTPUT->user_picture($userpic).'<br />';
echo fullname($user2);
echo '</td>';
echo '</tr></table>';
function message_print_contacts() {
- global $USER, $CFG, $DB, $PAGE;
+ global $USER, $CFG, $DB, $PAGE, $OUTPUT;
$timetoshowusers = 300; //Seconds default
if (isset($CFG->block_online_users_timetosee)) {
$PAGE->requires->js('message/message.js');
$PAGE->requires->js_function_call('refresh_page', Array(60*1000, $PAGE->url->out()));
- echo '<div class="messagejsautorefresh note center">';
+ echo $OUTPUT->container_start('messagejsautorefresh note center');
echo get_string('pagerefreshes', 'message', $CFG->message_contacts_refresh);
- echo '</div>';
+ echo $OUTPUT->container_end();
- echo '<div class="messagejsmanualrefresh aligncenter">';
- echo print_single_button('index.php', false, get_string('refresh'));
- echo '</div>';
+ echo $OUTPUT->container_start('messagejsmanualrefresh aligncenter');
+ echo $OUTPUT->button(html_form::make_button('index.php', false, get_string('refresh')));
+ echo $OUTPUT->container_end();
}
$strhistory = message_history_link($user->id, 0, true, '', '', 'icon');
echo '<tr><td class="pix">';
- print_user_picture($user, SITEID, $user->picture, 20, false, true, 'userwindow');
+ $userpic = moodle_user_picture::make($user, SITEID);
+ $userpic->size = 20;
+ $userpic->link = true;
+ echo $OUTPUT->user_picture($userpic);
echo '</td>';
echo '<td class="contact">';
link_to_popup_window("/message/discussion.php?id=$user->id", "message_$user->id", fullname($user),
}
echo '<br />';
- print_single_button('index.php', array( 'tab' => 'search'), get_string('newsearch', 'message') );
+ echo $OUTPUT->button(html_form::make_button('index.php', array( 'tab' => 'search'), get_string('newsearch', 'message')));
echo '</div>';
}
function message_print_user ($user=false, $iscontact=false, $isblocked=false) {
- global $USER;
+ global $USER, $OUTPUT;
+ $userpic = moodle_user_picture::make($USER, SITEID);
+ $userpic->size = 20;
+ $userpic->link = true;
+
if ($user === false) {
- print_user_picture($USER, SITEID, $USER->picture, 20, false, true, 'userwindow');
+ echo $OUTPUT->user_picture($userpic);
} else {
- print_user_picture($user, SITEID, $user->picture, 20, false, true, 'userwindow');
+ echo $OUTPUT->user_picture($userpic);
echo ' ';
if ($iscontact) {
message_contact_link($user->id, 'remove');
/**
* Print a row of contactlist displaying user picture, messages waiting and
* block links etc
- * @param $contact contact object containing all fields required for print_user_picture()
+ * @param $contact contact object containing all fields required for $OUTPUT->user_picture()
* @param $incontactlist is the user a contact of ours?
*/
function message_print_contactlist_user($contact, $incontactlist = true){
$strhistory = message_history_link($contact->id, 0, true, '', '', 'icon');
echo '<tr><td class="pix">';
- print_user_picture($contact, SITEID, $contact->picture, 20, false, true, 'userwindow');
+ $userpic = moodle_user_picture::make($contact, SITEID);
+ $userpic->size = 20;
+ $userpic->link = true;
+ echo $OUTPUT->user_picture($userpic);
echo '</td>';
echo '<td class="contact">';