Skip to content

Commit

Permalink
MDL-19825 Upgraded calls to helpbutton, print_simple_box* and notify
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolasconnault committed Aug 18, 2009
1 parent 8f6e7e6 commit 3aac07d
Show file tree
Hide file tree
Showing 14 changed files with 31 additions and 31 deletions.
4 changes: 2 additions & 2 deletions user/addnote.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@
echo '<input type="hidden" name="sesskey" value="'.sesskey().'" />';
echo '</fieldset>';
$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();
Expand Down
2 changes: 1 addition & 1 deletion user/edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -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&amp;course=$course->id", true);
$email_changed_html .= $OUTPUT->continue_button("$CFG->wwwroot/user/view.php?id=$user->id&amp;course=$course->id");
$email_changed = true;
}
}
Expand Down
4 changes: 2 additions & 2 deletions user/emailupdate.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@
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));
events_trigger('user_updated', $user);
$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 {
Expand Down
2 changes: 1 addition & 1 deletion user/extendenrol.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 "<form method=\"post\" action=\"extendenrol.php\">\n";
echo '<input type="hidden" name="id" value="'.$course->id.'" />';
echo '<input type="hidden" name="sesskey" value="'.sesskey().'" />';
Expand Down
4 changes: 2 additions & 2 deletions user/groupaddnote.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,11 @@
echo '</p>';

echo '<p>' . get_string('content', 'notes');
helpbutton('writing', get_string('helpwriting'));
echo $OUTPUT->help_icon(moodle_help_icon::make('writing', get_string('helpwriting')));
echo '<br /><textarea name="content" rows="5" cols="50">' . strip_tags(@$content) . '</textarea></p>';

echo '<p>' . $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 '</p>';

Expand Down
2 changes: 1 addition & 1 deletion user/groupextendenrol.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 '<form method="post" action="groupextendenrol.php">';
echo '<input type="hidden" name="id" value="'.$course->id.'" />';
echo '<input type="hidden" name="sesskey" value="'.sesskey().'" />';
Expand Down
10 changes: 5 additions & 5 deletions user/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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) {
Expand All @@ -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);
}
Expand Down Expand Up @@ -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";
Expand Down
14 changes: 7 additions & 7 deletions user/message.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<input type="hidden" name="id" value="<?php p($id) ?>" />
<input type="hidden" name="returnto" value="<?php p($returnto) ?>" />
<input type="hidden" name="deluser" value="" />
<?php print_simple_box_start("center", ""); ?>
<?php echo $OUTPUT->box_start(); ?>
<table border="0" cellpadding="5">
<tr valign="top">
<td align="right"><b>
Expand All @@ -15,14 +15,14 @@
<tr valign="top">
<td align="right" valign="middle" nowrap="nowrap">
<?php
helpbutton("reading", get_string("helpreading"), "moodle", true, true);
echo $OUTPUT->help_icon(moodle_help_icon::make("reading", get_string("helpreading"), "moodle", true));
echo "<br />";
helpbutton("writing", get_string("helpwriting"), "moodle", true, true);
echo $OUTPUT->help_icon(moodle_help_icon::make("writing", get_string("helpwriting"), "moodle", true));
echo "<br />";
helpbutton("questions", get_string("helpquestions"), "moodle", true, true);
echo $OUTPUT->help_icon(moodle_help_icon::make("questions", get_string("helpquestions"), "moodle", true));
echo "<br />";
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");
}
Expand All @@ -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")));
?>
</td>
</tr>

<tr><td align="center" colspan="2"><input type="submit" name="preview" value="<?php print_string('preview'); ?>" /></td></tr>
</table>
<?php print_simple_box_end(); ?>
<?php echo $OUTPUT->box_end(); ?>
<table align="center"><tr><th colspan="4" scope="row"><?php print_string('currentlyselectedusers'); ?></th></tr>
<?php
if (count($SESSION->emailto[$id])) {
Expand Down
6 changes: 3 additions & 3 deletions user/messageselect.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -114,14 +114,14 @@
echo $OUTPUT->footer();
exit;
} else {
notify(get_string('nousersyet'));
echo $OUTPUT->notification(get_string('nousersyet'));
}
}

echo '<p align="center"><a href="'.$returnto.'">'.get_string("keepsearching").'</a>'.((count($SESSION->emailto[$id])) ? ', '.get_string('usemessageform') : '').'</p>';

if ((!empty($send) || !empty($preview) || !empty($edit)) && (empty($messagebody))) {
notify(get_string('allfieldsrequired'));
echo $OUTPUT->notification(get_string('allfieldsrequired'));
}

if (count($SESSION->emailto[$id])) {
Expand Down
6 changes: 3 additions & 3 deletions user/portfolio.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand All @@ -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');
Expand Down
2 changes: 1 addition & 1 deletion user/profile/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@
if (count($table->data)) {
print_table($table);
} else {
notify($strnofields);
echo $OUTPUT->notification($strnofields);
}

} /// End of $categories foreach
Expand Down
2 changes: 1 addition & 1 deletion user/repository.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
2 changes: 1 addition & 1 deletion user/tabs.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion user/view.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
print_header("$strpersonalprofile: ", "$strpersonalprofile: ", $navigation, "", "", true, "&nbsp;", navmenu($course));
echo $OUTPUT->heading(get_string('notenrolledprofile'));
}
print_continue($_SERVER['HTTP_REFERER']);
echo $OUTPUT->continue_button($_SERVER['HTTP_REFERER']);
echo $OUTPUT->footer();
exit;
}
Expand Down

0 comments on commit 3aac07d

Please sign in to comment.