MDL-19801 upgraded calls to print_table, print_single_button, print_user_picture, print_container* and notice_yesno
This commit is contained in:
@@ -136,7 +136,10 @@
|
||||
|
||||
echo '<div class="message-discussion-noframes">';
|
||||
echo '<div id="userinfo">';
|
||||
echo print_user_picture($user, SITEID, $user->picture, 48, true, true, 'userwindow');
|
||||
$userpic = moodle_user_picture::make($user, SITEID);
|
||||
$userpic->size = 48;
|
||||
$userpic->link = true;
|
||||
echo $OUTPUT->user_picture($userpic);
|
||||
echo '<div class="name"><h1>'.$userfullname.'</h1></div>';
|
||||
echo '<div class="commands"><ul>';
|
||||
if ($contact = $DB->get_record('message_contacts', array('userid'=>$USER->id, 'contactid'=>$user->id))) {
|
||||
|
||||
+8
-2
@@ -57,7 +57,10 @@
|
||||
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">';
|
||||
@@ -65,7 +68,10 @@
|
||||
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>';
|
||||
|
||||
+23
-13
@@ -19,7 +19,7 @@ if (!isset($CFG->message_offline_time)) {
|
||||
|
||||
|
||||
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)) {
|
||||
@@ -152,13 +152,13 @@ function message_print_contacts() {
|
||||
$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();
|
||||
}
|
||||
|
||||
|
||||
@@ -332,7 +332,10 @@ function message_print_search_results($frm) {
|
||||
$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),
|
||||
@@ -486,18 +489,22 @@ function message_print_search_results($frm) {
|
||||
}
|
||||
|
||||
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');
|
||||
@@ -987,7 +994,7 @@ function message_get_participants() {
|
||||
/**
|
||||
* 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){
|
||||
@@ -1011,7 +1018,10 @@ 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">';
|
||||
|
||||
|
||||
+4
-1
@@ -54,7 +54,10 @@
|
||||
echo $OUTPUT->header();
|
||||
echo '<table width="100%" cellpadding="0" cellspacing="0"><tr>';
|
||||
echo '<td width="100">';
|
||||
echo print_user_picture($user, SITEID, $user->picture, true, true, true, 'userwindow').'</td>';
|
||||
$userpic = moodle_user_picture::make($user, SITEID);
|
||||
$userpic->size = 48;
|
||||
$userpic->link = true;
|
||||
echo $OUTPUT->user_picture($userpic) .'</td>';
|
||||
echo '<td valign="middle" align="center">';
|
||||
|
||||
echo '<div class="name">'.fullname($user).'</div>';
|
||||
|
||||
Reference in New Issue
Block a user