mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
Fixed notice() so that you can pass a course if you want
This commit is contained in:
parent
978abb4291
commit
c7731ab5e2
2 changed files with 9 additions and 6 deletions
|
@ -291,8 +291,7 @@
|
||||||
if (!set_config("release", $release)) {
|
if (!set_config("release", $release)) {
|
||||||
notify("ERROR: Could not update release version in database!!");
|
notify("ERROR: Could not update release version in database!!");
|
||||||
}
|
}
|
||||||
notice(get_string('releasenoteslink', 'admin', 'http://docs.moodle.org/en/Release_Notes'), 'index.php');
|
notice(get_string('releasenoteslink', 'admin', 'http://docs.moodle.org/en/Release_Notes'), 'index.php', 'none');
|
||||||
exit;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Send $CFG->unicodedb to DB to have it available for next requests
|
/// Send $CFG->unicodedb to DB to have it available for next requests
|
||||||
|
|
|
@ -4584,8 +4584,8 @@ function emoticonhelpbutton($form, $field) {
|
||||||
* @param string $link ?
|
* @param string $link ?
|
||||||
* @todo Finish documenting this function
|
* @todo Finish documenting this function
|
||||||
*/
|
*/
|
||||||
function notice ($message, $link='') {
|
function notice ($message, $link='', $course=NULL) {
|
||||||
global $CFG;
|
global $CFG, $SITE;
|
||||||
|
|
||||||
$message = clean_text($message);
|
$message = clean_text($message);
|
||||||
$link = clean_text($link);
|
$link = clean_text($link);
|
||||||
|
@ -4601,8 +4601,12 @@ function notice ($message, $link='') {
|
||||||
echo '<br />';
|
echo '<br />';
|
||||||
print_simple_box($message, 'center', '50%', '', '20', 'generalbox', 'notice');
|
print_simple_box($message, 'center', '50%', '', '20', 'generalbox', 'notice');
|
||||||
print_continue($link);
|
print_continue($link);
|
||||||
print_footer(get_site());
|
if (empty($course)) {
|
||||||
die;
|
print_footer($SITE);
|
||||||
|
} else {
|
||||||
|
print_footer($course);
|
||||||
|
}
|
||||||
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue