From: moodler Date: Wed, 28 Feb 2007 06:25:22 +0000 (+0000) Subject: Merged Nicolas' changes from MDL-8582 into HEAD. X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=6ba65fa08d4c9709b4a712fbb166303a71ab590d;p=moodle.git Merged Nicolas' changes from MDL-8582 into HEAD. --- diff --git a/admin/handlevirus.php b/admin/handlevirus.php index f2b20e2126..7a09c1eb67 100644 --- a/admin/handlevirus.php +++ b/admin/handlevirus.php @@ -40,7 +40,7 @@ while(!feof($fd)) { $user = get_record("user","id",$log->userid); $course = get_record("course","id",$log->course); - $subject = get_string('virusfoundsubject','moodle',$site->fullname); + $subject = get_string('virusfoundsubject','moodle',format_string($site->fullname)); $a->date = userdate($log->time); $a->action = $action; @@ -78,7 +78,7 @@ function notify_admins_unknown($file,$a) { global $site; $admins = get_admins(); - $subject = get_string('virusfoundsubject','moodle',$site->fullname); + $subject = get_string('virusfoundsubject','moodle',format_string($site->fullname)); $body = get_string('virusfoundlateradminnolog','moodle',$a); foreach ($admins as $admin) { email_to_user($admin,$admin,$subject,$body); diff --git a/admin/mnet/enr_course_enrol.php b/admin/mnet/enr_course_enrol.php index 906e2280f4..94af92e175 100644 --- a/admin/mnet/enr_course_enrol.php +++ b/admin/mnet/enr_course_enrol.php @@ -258,7 +258,7 @@ $strsearchresults = get_string('searchresults'); admin_externalpage_print_header($adminroot); print_box('' . s($mnet_peer->name) . ' : ' - . s($course->shortname) .' '. s($course->fullname) + . format_string($course->shortname) .' '. format_string($course->fullname) . '
' . get_string("enrolcourseenrol_desc", "mnet")); diff --git a/admin/mnet/enr_courses.php b/admin/mnet/enr_courses.php index 079668f5ab..f1157dbe1b 100644 --- a/admin/mnet/enr_courses.php +++ b/admin/mnet/enr_courses.php @@ -41,10 +41,10 @@ . "host={$mnethost}&courseid={$course->id}&sesskey={$USER->sesskey}"; print ('' . "$icon" - . "".s($course->fullname). "" + . "".format_string($course->fullname). "" . '' . '' - . ''.s($course->shortname). ' - ' .s($course->cat_name).'' + . ''.format_string($course->shortname). ' - ' .format_string($course->cat_name).'' . '' . '' . "{$course->summary}" diff --git a/admin/oacleanup.php b/admin/oacleanup.php index bc603691fb..78ac48f39a 100644 --- a/admin/oacleanup.php +++ b/admin/oacleanup.php @@ -99,7 +99,7 @@ function online_assignment_cleanup($output=false) { /// grab the section record if (!($section = get_record('course_sections', 'id', $newsection))) { - if ($output) echo 'Serious error: Cannot retrieve section: '.$newsection.' for course: '.$course->fullname.'
'; + if ($output) echo 'Serious error: Cannot retrieve section: '.$newsection.' for course: '. format_string($course->fullname) .'
'; continue; } diff --git a/admin/process_email.php b/admin/process_email.php index 77f72c3f92..8e5091abcd 100755 --- a/admin/process_email.php +++ b/admin/process_email.php @@ -16,8 +16,8 @@ if ($_ENV['RECIPIENT'] == $CFG->noreplyaddress) { } $site = get_site(); - $subject = get_string('noreplybouncesubject','moodle',$site->fullname); - $body = get_string('noreplybouncemessage','moodle',$site->fullname)."\n\n"; + $subject = get_string('noreplybouncesubject','moodle',format_string($site->fullname)); + $body = get_string('noreplybouncemessage','moodle',format_string($site->fullname))."\n\n"; $fd = fopen('php://stdin','r'); if ($fd) { diff --git a/admin/register.php b/admin/register.php index 6f5c34c8bf..cc142feb75 100644 --- a/admin/register.php +++ b/admin/register.php @@ -34,7 +34,7 @@ $strregistration = get_string("registration"); $strregistrationinfo = get_string("registrationinfo"); - print_header("$site->shortname: $strregistration", "$site->fullname", + print_header("$site->shortname: $strregistration", $site->fullname, "admin/index.php\">$stradministration -> $strregistration"); print_heading($strregistration); diff --git a/admin/roles/assign.php b/admin/roles/assign.php index 24d3a38340..11d1c263cd 100755 --- a/admin/roles/assign.php +++ b/admin/roles/assign.php @@ -103,7 +103,7 @@ /// site header } else { - print_header("$course->fullname: $fullname", "$course->fullname", + print_header("$course->fullname: $fullname", $course->fullname, "wwwroot/user/view.php?id=$userid&course=$courseid\">$fullname -> $straction", "", "", true, " ", navmenu($course)); } diff --git a/admin/roles/override.php b/admin/roles/override.php index a52124f691..b94ea7e1cd 100755 --- a/admin/roles/override.php +++ b/admin/roles/override.php @@ -129,7 +129,7 @@ /// site header } else { - print_header("$course->fullname: $fullname", "$course->fullname", + print_header("$course->fullname: $fullname", $course->fullname, "wwwroot/user/view.php?id=$userid&course=$course->id\">$fullname -> $straction", "", "", true, " ", navmenu($course)); } $showroles = 1; diff --git a/admin/roles/tabs.php b/admin/roles/tabs.php index a69baa0101..f240896af4 100755 --- a/admin/roles/tabs.php +++ b/admin/roles/tabs.php @@ -31,7 +31,7 @@ if ($currenttab != 'update') { $streditcoursesettings = get_string("editcoursesettings"); $course = get_record('course', 'id', $context->instanceid); - print_header($streditcoursesettings, "$course->fullname", + print_header($streditcoursesettings, $course->fullname, "wwwroot/course/view.php?id=$course->id\">$course->shortname -> $straction"); } break; diff --git a/auth/cas/forbidden.php b/auth/cas/forbidden.php index ce1b8b2daf..918261ecf6 100644 --- a/auth/cas/forbidden.php +++ b/auth/cas/forbidden.php @@ -10,7 +10,7 @@ $loginsite = get_string("loginsite"); $errormsg = get_string("auth_cas_invalidcaslogin", "auth"); - print_header("$site->fullname: $loginsite", "$site->fullname", $loginsite); + print_header("$site->fullname: $loginsite", $site->fullname, $loginsite); include("forbidden.html"); print_footer(); exit; diff --git a/auth/cas/login.php b/auth/cas/login.php index d2148b6011..7551bc88c4 100644 --- a/auth/cas/login.php +++ b/auth/cas/login.php @@ -143,12 +143,12 @@ defined('MOODLE_INTERNAL') or die('Direct access to this script is forbidden.'); if ($ldapauth->config->expiration == 1) { $days2expire = $ldapauth->password_expire($USER->username); if (intval($days2expire) > 0 && intval($days2expire) < intval($CFG->{$USER->auth.'_expiration_warning'})) { - print_header("$site->fullname: $loginsite", "$site->fullname", $loginsite, $focus, "", true, "
$langmenu
"); + print_header("$site->fullname: $loginsite", $site->fullname, $loginsite, $focus, "", true, "
$langmenu
"); notice_yesno(get_string('auth_passwordwillexpire', 'auth', $days2expire), $passwordchangeurl, $urltogo); print_footer(); exit; } elseif (intval($days2expire) < 0 ) { - print_header("$site->fullname: $loginsite", "$site->fullname", $loginsite, $focus, "", true, "
$langmenu
"); + print_header("$site->fullname: $loginsite", $site->fullname, $loginsite, $focus, "", true, "
$langmenu
"); notice_yesno(get_string('auth_passwordisexpired', 'auth'), $passwordchangeurl, $urltogo); print_footer(); exit; @@ -247,12 +247,12 @@ defined('MOODLE_INTERNAL') or die('Direct access to this script is forbidden.'); if ($ldapauth->config->expiration == 1) { $days2expire = $ldapauth->password_expire($USER->username); if (intval($days2expire) > 0 && intval($days2expire) < intval($CFG->{$USER->auth.'_expiration_warning'})) { - print_header("$site->fullname: $loginsite", "$site->fullname", $loginsite, $focus, "", true, "
$langmenu
"); + print_header("$site->fullname: $loginsite", $site->fullname, $loginsite, $focus, "", true, "
$langmenu
"); notice_yesno(get_string('auth_passwordwillexpire', 'auth', $days2expire), $passwordchangeurl, $urltogo); print_footer(); exit; } elseif (intval($days2expire) < 0 ) { - print_header("$site->fullname: $loginsite", "$site->fullname", $loginsite, $focus, "", true, "
$langmenu
"); + print_header("$site->fullname: $loginsite", $site->fullname, $loginsite, $focus, "", true, "
$langmenu
"); notice_yesno(get_string('auth_passwordisexpired', 'auth'), $passwordchangeurl, $urltogo); print_footer(); exit; @@ -302,7 +302,7 @@ defined('MOODLE_INTERNAL') or die('Direct access to this script is forbidden.'); $show_instructions = false; } - print_header("$site->fullname: $loginsite", "$site->fullname", $loginsite, $focus, "", true, "
$langmenu
"); + print_header("$site->fullname: $loginsite", $site->fullname, $loginsite, $focus, "", true, "
$langmenu
"); include($CFG->dirroot.'/auth/cas/index_form.html'); print_footer(); diff --git a/auth/mnet/auth.php b/auth/mnet/auth.php index 9c8c07a394..338a9b259b 100644 --- a/auth/mnet/auth.php +++ b/auth/mnet/auth.php @@ -271,7 +271,7 @@ class auth_plugin_mnet list($code, $message) = array_map('trim',explode(':', $errormessage, 2)); if($code == 702) { $site = get_site(); - print_error('mnet_session_prohibited','mnet', $remotewwwroot, $site->fullname); + print_error('mnet_session_prohibited','mnet', $remotewwwroot, format_string($site->fullname)); exit; } $message .= "ERROR $code:
$errormessage
"; diff --git a/backup/backup.php b/backup/backup.php index f87a6d4aa7..d6a8265df3 100644 --- a/backup/backup.php +++ b/backup/backup.php @@ -78,7 +78,7 @@ print_heading(get_string("choosecourse")); print_simple_box_start("center"); foreach ($courses as $course) { - echo ''.s($course->fullname).' ('.s($course->shortname).')
'."\n"; + echo ''.format_string($course->fullname).' ('.format_string($course->shortname).')
'."\n"; } print_simple_box_end(); } else { @@ -106,7 +106,7 @@ } //Print form - print_heading("$strcoursebackup: $course->fullname ($course->shortname)"); + print_heading(format_string("$strcoursebackup: $course->fullname ($course->shortname)")); print_simple_box_start("center"); //Adjust some php variables to the execution of this script diff --git a/backup/restore_check.html b/backup/restore_check.html index d28cf701ec..065df0a94b 100644 --- a/backup/restore_check.html +++ b/backup/restore_check.html @@ -222,7 +222,7 @@ } else { $optdimmed = ''; } - echo "id&launch=check&id=$id&file=$file\">".s($course->fullname).' ('.s($course->shortname).')
'."\n"; + echo "id&launch=check&id=$id&file=$file\">".format_string($course->fullname).' ('.format_string($course->shortname).')
'."\n"; } print_simple_box_end(); } else { diff --git a/backup/restorelib.php b/backup/restorelib.php index 57a4aeffbe..e4fbc728a1 100644 --- a/backup/restorelib.php +++ b/backup/restorelib.php @@ -5762,7 +5762,7 @@ echo "
  • ".get_string("usingexistingcourse"); echo "