From 3aac07d8f056f8c6005bd043e328a68dc823a4a3 Mon Sep 17 00:00:00 2001 From: nicolasconnault Date: Tue, 18 Aug 2009 05:19:25 +0000 Subject: [PATCH] MDL-19825 Upgraded calls to helpbutton, print_simple_box* and notify --- user/addnote.php | 4 ++-- user/edit.php | 2 +- user/emailupdate.php | 4 ++-- user/extendenrol.php | 2 +- user/groupaddnote.php | 4 ++-- user/groupextendenrol.php | 2 +- user/index.php | 10 +++++----- user/message.html | 14 +++++++------- user/messageselect.php | 6 +++--- user/portfolio.php | 6 +++--- user/profile/index.php | 2 +- user/repository.php | 2 +- user/tabs.php | 2 +- user/view.php | 2 +- 14 files changed, 31 insertions(+), 31 deletions(-) diff --git a/user/addnote.php b/user/addnote.php index 5807f4bca2bdf..0505967f9c409 100644 --- a/user/addnote.php +++ b/user/addnote.php @@ -62,8 +62,8 @@ echo ''; echo ''; $table->head = array (get_string('fullname'), - get_string('content', 'notes') . helpbutton('writing', get_string('helpwriting'), 'moodle', true, false, '', true), - get_string('publishstate', 'notes') . helpbutton('status', get_string('publishstate', 'notes'), 'notes', true, false, '', true), + get_string('content', 'notes') . $OUTPUT->help_icon(moodle_help_icon::make('writing', get_string('helpwriting'))), + get_string('publishstate', 'notes') . $OUTPUT->help_icon(moodle_help_icon::make('status', get_string('publishstate', 'notes'), 'notes')), ); $table->align = array ('left', 'center', 'center'); $state_names = note_get_state_names(); diff --git a/user/edit.php b/user/edit.php index 951a98b55e720..7c7b8532a3ab5 100644 --- a/user/edit.php +++ b/user/edit.php @@ -126,7 +126,7 @@ $a->oldemail = $usernew->email = $user->email; $email_changed_html = $OUTPUT->box(get_string('auth_changingemailaddress', 'auth_email', $a), 'generalbox', 'notice'); - $email_changed_html .= print_continue("$CFG->wwwroot/user/view.php?id=$user->id&course=$course->id", true); + $email_changed_html .= $OUTPUT->continue_button("$CFG->wwwroot/user/view.php?id=$user->id&course=$course->id"); $email_changed = true; } } diff --git a/user/emailupdate.php b/user/emailupdate.php index 4971e7edccc1e..6d0eb00e632c9 100755 --- a/user/emailupdate.php +++ b/user/emailupdate.php @@ -33,7 +33,7 @@ if ($DB->get_record('user', array('email' => $user->email))) { $stremailnowexists = get_string('auth_emailnowexists', 'auth_email'); echo $OUTPUT->box($stremailnowexists, 'center'); - print_continue("$CFG->wwwroot/user/view.php?id=$user->id"); + echo $OUTPUT->continue_button("$CFG->wwwroot/user/view.php?id=$user->id"); } else { // update user email $DB->set_field('user', 'email', $user->email, array('id' => $user->id)); @@ -41,7 +41,7 @@ $a->email = $user->email; $stremailupdatesuccess = get_string('auth_emailupdatesuccess', 'auth_email', $a); echo $OUTPUT->box($stremailupdatesuccess, 'center'); - print_continue("$CFG->wwwroot/user/view.php?id=$user->id"); + echo $OUTPUT->continue_button("$CFG->wwwroot/user/view.php?id=$user->id"); } } else { diff --git a/user/extendenrol.php b/user/extendenrol.php index b4d1b0fef75c6..eb6795c069f52 100644 --- a/user/extendenrol.php +++ b/user/extendenrol.php @@ -112,7 +112,7 @@ } $title = get_string('extendenrol'); -echo $OUTPUT->heading($title . helpbutton('extendenrol', $title, 'moodle', true, false, '', true)); +echo $OUTPUT->heading($title . $OUTPUT->help_icon(moodle_help_icon::make('extendenrol', $title))); echo "
\n"; echo ''; echo ''; diff --git a/user/groupaddnote.php b/user/groupaddnote.php index 060026fdd3309..7431281bfbc5d 100644 --- a/user/groupaddnote.php +++ b/user/groupaddnote.php @@ -84,11 +84,11 @@ echo '

'; echo '

' . get_string('content', 'notes'); -helpbutton('writing', get_string('helpwriting')); +echo $OUTPUT->help_icon(moodle_help_icon::make('writing', get_string('helpwriting'))); echo '

'; echo '

' . $strpublishstate; -helpbutton('status', $strpublishstate, 'notes'); +echo $OUTPUT->help_icon(moodle_help_icon::make('status', $strpublishstate, 'notes')); echo $OUTPUT->select(html_select::make($state_names, 'state', empty($state) ? NOTES_STATE_PUBLIC : $state, false)); echo '

'; diff --git a/user/groupextendenrol.php b/user/groupextendenrol.php index 9900ec8dec623..54ea3877fdc98 100755 --- a/user/groupextendenrol.php +++ b/user/groupextendenrol.php @@ -109,7 +109,7 @@ } $title = get_string('groupextendenrol'); -echo $OUTPUT->heading($title . helpbutton('groupextendenrol', $title, 'moodle', true, false, '', true)); +echo $OUTPUT->heading($title . $OUTPUT->help_icon(moodle_help_icon::make('groupextendenrol', $title))); echo ''; echo ''; echo ''; diff --git a/user/index.php b/user/index.php index 03b5593f89e81..1463c86637aa8 100644 --- a/user/index.php +++ b/user/index.php @@ -22,7 +22,7 @@ $contextid = optional_param('contextid', 0, PARAM_INT); // one of this or $courseid = optional_param('id', 0, PARAM_INT); // this are required - + $PAGE->set_url('user/index.php', compact('page', 'perpage', 'mode', 'accesssince', 'search', 'roleid', 'contextid', 'courseid')); if ($contextid) { @@ -786,11 +786,11 @@ } $row->cells[1]->text .= $OUTPUT->container_end(); - + $row->cells[2] = new html_table_cell(); $row->cells[2]->add_class('links'); $row->cells[2]->text = ''; - + $links = array(); if ($CFG->bloglevel > 0) { @@ -815,7 +815,7 @@ } $links[] = html_link::make(new moodle_url($CFG->wwwroot.'/user/view.php?id='. $user->id .'&course='. $course->id), get_string('fullprofile') . '...'); - + foreach ($links as $link) { $row->cells[2]->text .= $OUTPUT->link($link); } @@ -969,7 +969,7 @@ $displaylist['groupextendenrol.php'] = get_string('groupextendenrol'); } - helpbutton("participantswithselectedusers", get_string("withselectedusers")); + echo $OUTPUT->help_icon(moodle_help_icon::make("participantswithselectedusers", get_string("withselectedusers"))); $select = new html_select(); $select->options = $displaylist; $select->name = "formaction"; diff --git a/user/message.html b/user/message.html index c0ac6c7aa6b1a..20028e99754dc 100644 --- a/user/message.html +++ b/user/message.html @@ -2,7 +2,7 @@ - +box_start(); ?>
@@ -15,14 +15,14 @@
help_icon(moodle_help_icon::make("reading", get_string("helpreading"), "moodle", true)); echo "
"; - helpbutton("writing", get_string("helpwriting"), "moodle", true, true); + echo $OUTPUT->help_icon(moodle_help_icon::make("writing", get_string("helpwriting"), "moodle", true)); echo "
"; - helpbutton("questions", get_string("helpquestions"), "moodle", true, true); + echo $OUTPUT->help_icon(moodle_help_icon::make("questions", get_string("helpquestions"), "moodle", true)); echo "
"; if ($usehtmleditor) { - helpbutton("richtext2", get_string("helprichtext"), "moodle", true, true); + echo $OUTPUT->help_icon(moodle_help_icon::make("richtext2", get_string("helprichtext"), "moodle", true)); } else { emoticonhelpbutton("theform", "message"); } @@ -41,14 +41,14 @@ } else { choose_from_menu(format_text_menu(), "format", $format, ""); } - helpbutton("textformat", get_string("helpformatting")); + echo $OUTPUT->help_icon(moodle_help_icon::make("textformat", get_string("helpformatting"))); ?>
- +box_end(); ?> emailto[$id])) { diff --git a/user/messageselect.php b/user/messageselect.php index 944c305fa53da..0304a426c39ac 100644 --- a/user/messageselect.php +++ b/user/messageselect.php @@ -73,7 +73,7 @@ // if messaging is disabled on site, we can still allow users with capabilities to send emails instead if (empty($CFG->messaging)) { - notify(get_string('messagingdisabled','message')); + echo $OUTPUT->notification(get_string('messagingdisabled','message')); } if ($count) { @@ -114,14 +114,14 @@ echo $OUTPUT->footer(); exit; } else { - notify(get_string('nousersyet')); + echo $OUTPUT->notification(get_string('nousersyet')); } } echo '

'.get_string("keepsearching").''.((count($SESSION->emailto[$id])) ? ', '.get_string('usemessageform') : '').'

'; if ((!empty($send) || !empty($preview) || !empty($edit)) && (empty($messagebody))) { - notify(get_string('allfieldsrequired')); + echo $OUTPUT->notification(get_string('allfieldsrequired')); } if (count($SESSION->emailto[$id])) { diff --git a/user/portfolio.php b/user/portfolio.php index 606accf387ba6..93d80b43df106 100644 --- a/user/portfolio.php +++ b/user/portfolio.php @@ -62,9 +62,9 @@ exit; } else { echo $OUTPUT->heading(get_string('configplugin', 'portfolio')); - print_simple_box_start(); + echo $OUTPUT->box_start(); $mform->display(); - print_simple_box_end(); + echo $OUTPUT->box_end(); $display = false; } @@ -75,7 +75,7 @@ if ($display) { echo $OUTPUT->heading($configstr); - print_simple_box_start(); + echo $OUTPUT->box_start(); if (!$instances = portfolio_instances(true, false)) { print_error('noinstances', 'portfolio', $CFG->wwwroot . '/user/view.php'); diff --git a/user/profile/index.php b/user/profile/index.php index 0a6f6df4f0c4b..f2388839b0f6d 100644 --- a/user/profile/index.php +++ b/user/profile/index.php @@ -126,7 +126,7 @@ if (count($table->data)) { print_table($table); } else { - notify($strnofields); + echo $OUTPUT->notification($strnofields); } } /// End of $categories foreach diff --git a/user/repository.php b/user/repository.php index 6107c97aa819a..a2b42a362269e 100644 --- a/user/repository.php +++ b/user/repository.php @@ -33,7 +33,7 @@ include('tabs.php'); echo $OUTPUT->heading($configstr); -print_simple_box_start(); +echo $OUTPUT->box_start(); if (!$instances = repository::get_instances($COURSE->context, $USER->id)) { print_error('noinstances', 'repository', $CFG->wwwroot . '/user/view.php'); diff --git a/user/tabs.php b/user/tabs.php index 010488d80ffdf..8d2da76cc8d11 100644 --- a/user/tabs.php +++ b/user/tabs.php @@ -325,7 +325,7 @@ if ($currenttab == 'editprofile' && ($user->id == $USER->id) && user_not_fully_set_up($USER)) { /// We're being forced here to fix profile - notify(get_string('moreprofileinfoneeded')); + echo $OUTPUT->notification(get_string('moreprofileinfoneeded')); } else { /// Print out the tabs and continue! print_tabs($tabs, $currenttab, $inactive, $activetwo); diff --git a/user/view.php b/user/view.php index b0b2741fcfdda..6e22971327470 100644 --- a/user/view.php +++ b/user/view.php @@ -114,7 +114,7 @@ print_header("$strpersonalprofile: ", "$strpersonalprofile: ", $navigation, "", "", true, " ", navmenu($course)); echo $OUTPUT->heading(get_string('notenrolledprofile')); } - print_continue($_SERVER['HTTP_REFERER']); + echo $OUTPUT->continue_button($_SERVER['HTTP_REFERER']); echo $OUTPUT->footer(); exit; }