Merged Nicolas' changes from MDL-8582 into HEAD.
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -258,7 +258,7 @@ $strsearchresults = get_string('searchresults');
|
||||
admin_externalpage_print_header($adminroot);
|
||||
|
||||
print_box('<strong>' . s($mnet_peer->name) . ' : '
|
||||
. s($course->shortname) .' '. s($course->fullname)
|
||||
. format_string($course->shortname) .' '. format_string($course->fullname)
|
||||
. '</strong><br />'
|
||||
. get_string("enrolcourseenrol_desc", "mnet"));
|
||||
|
||||
|
||||
@@ -41,10 +41,10 @@
|
||||
. "host={$mnethost}&courseid={$course->id}&sesskey={$USER->sesskey}";
|
||||
print ('<tr>'
|
||||
. "<td>$icon</td>"
|
||||
. "<td><a href=\"$link\">".s($course->fullname). "</a></td>"
|
||||
. "<td><a href=\"$link\">".format_string($course->fullname). "</a></td>"
|
||||
. '</tr><tr>'
|
||||
. '<td></td>'
|
||||
. '<td>'.s($course->shortname). ' - ' .s($course->cat_name).'</td>'
|
||||
. '<td>'.format_string($course->shortname). ' - ' .format_string($course->cat_name).'</td>'
|
||||
. '</tr><tr>'
|
||||
. '<td></td>'
|
||||
. "<td align=\"left\" >{$course->summary}</td>"
|
||||
|
||||
+1
-1
@@ -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.'<br />';
|
||||
if ($output) echo 'Serious error: Cannot retrieve section: '.$newsection.' for course: '. format_string($course->fullname) .'<br />';
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
@@ -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) {
|
||||
|
||||
+1
-1
@@ -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,
|
||||
"<a href=\"../$CFG->admin/index.php\">$stradministration</a> -> $strregistration");
|
||||
|
||||
print_heading($strregistration);
|
||||
|
||||
@@ -103,7 +103,7 @@
|
||||
|
||||
/// site header
|
||||
} else {
|
||||
print_header("$course->fullname: $fullname", "$course->fullname",
|
||||
print_header("$course->fullname: $fullname", $course->fullname,
|
||||
"<a href=\"$CFG->wwwroot/user/view.php?id=$userid&course=$courseid\">$fullname</a> -> $straction", "", "", true, " ", navmenu($course));
|
||||
}
|
||||
|
||||
|
||||
@@ -129,7 +129,7 @@
|
||||
|
||||
/// site header
|
||||
} else {
|
||||
print_header("$course->fullname: $fullname", "$course->fullname",
|
||||
print_header("$course->fullname: $fullname", $course->fullname,
|
||||
"<a href=\"$CFG->wwwroot/user/view.php?id=$userid&course=$course->id\">$fullname</a> -> $straction", "", "", true, " ", navmenu($course));
|
||||
}
|
||||
$showroles = 1;
|
||||
|
||||
@@ -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,
|
||||
"<a href=\"$CFG->wwwroot/course/view.php?id=$course->id\">$course->shortname</a> -> $straction");
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -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;
|
||||
|
||||
+5
-5
@@ -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, "<div align=\"right\">$langmenu</div>");
|
||||
print_header("$site->fullname: $loginsite", $site->fullname, $loginsite, $focus, "", true, "<div align=\"right\">$langmenu</div>");
|
||||
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, "<div align=\"right\">$langmenu</div>");
|
||||
print_header("$site->fullname: $loginsite", $site->fullname, $loginsite, $focus, "", true, "<div align=\"right\">$langmenu</div>");
|
||||
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, "<div class=\"langmenu\">$langmenu</div>");
|
||||
print_header("$site->fullname: $loginsite", $site->fullname, $loginsite, $focus, "", true, "<div class=\"langmenu\">$langmenu</div>");
|
||||
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, "<div class=\"langmenu\">$langmenu</div>");
|
||||
print_header("$site->fullname: $loginsite", $site->fullname, $loginsite, $focus, "", true, "<div class=\"langmenu\">$langmenu</div>");
|
||||
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, "<div align=\"right\">$langmenu</div>");
|
||||
print_header("$site->fullname: $loginsite", $site->fullname, $loginsite, $focus, "", true, "<div align=\"right\">$langmenu</div>");
|
||||
include($CFG->dirroot.'/auth/cas/index_form.html');
|
||||
print_footer();
|
||||
|
||||
|
||||
+1
-1
@@ -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:<br/>$errormessage<br/>";
|
||||
|
||||
+2
-2
@@ -78,7 +78,7 @@
|
||||
print_heading(get_string("choosecourse"));
|
||||
print_simple_box_start("center");
|
||||
foreach ($courses as $course) {
|
||||
echo '<a href="backup.php?id='.$course->id.'">'.s($course->fullname).' ('.s($course->shortname).')</a><br />'."\n";
|
||||
echo '<a href="backup.php?id='.$course->id.'">'.format_string($course->fullname).' ('.format_string($course->shortname).')</a><br />'."\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
|
||||
|
||||
@@ -222,7 +222,7 @@
|
||||
} else {
|
||||
$optdimmed = '';
|
||||
}
|
||||
echo "<a $optdimmed href=\"restore.php?course_id=$course->id&launch=check&id=$id&file=$file\">".s($course->fullname).' ('.s($course->shortname).')</a><br />'."\n";
|
||||
echo "<a $optdimmed href=\"restore.php?course_id=$course->id&launch=check&id=$id&file=$file\">".format_string($course->fullname).' ('.format_string($course->shortname).')</a><br />'."\n";
|
||||
}
|
||||
print_simple_box_end();
|
||||
} else {
|
||||
|
||||
@@ -5762,7 +5762,7 @@
|
||||
echo "<li>".get_string("usingexistingcourse");
|
||||
echo "<ul>";
|
||||
echo "<li>".get_string("from").": ".$course_header->course_fullname." (".$course_header->course_shortname.")".'</li>';
|
||||
echo "<li>".get_string("to").": ".$course->fullname." (".$course->shortname.")".'</li>';
|
||||
echo "<li>".get_string("to").": ". format_string($course->fullname) ." (".format_string($course->shortname).")".'</li>';
|
||||
if (($restore->deleting)) {
|
||||
echo "<li>".get_string("deletingexistingcoursedata").'</li>';
|
||||
} else {
|
||||
|
||||
+3
-3
@@ -27,15 +27,15 @@
|
||||
|
||||
$courses = get_records("course");
|
||||
foreach ($courses as $course) {
|
||||
echo "Start course ".$course->fullname;
|
||||
echo "Start course ". format_string($course->fullname);
|
||||
$preferences = schedule_backup_course_configure($course);
|
||||
if ($preferences && $status) {
|
||||
$status = schedule_backup_course_execute($preferences);
|
||||
}
|
||||
if ($status && $preferences) {
|
||||
echo "End course ".$course->fullname." OK\n\n";
|
||||
echo "End course ". format_string($course->fullname)." OK\n\n";
|
||||
} else {
|
||||
echo "End course ".$course->fullname." FAIL\n\n";
|
||||
echo "End course ". format_string($course->fullname)." FAIL\n\n";
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -164,10 +164,10 @@ class block_admin extends block_list {
|
||||
|
||||
if (empty($course->metacourse) && ($course->id!==SITEID)) {
|
||||
if (has_capability('moodle/legacy:guest', $context, NULL, false)) { // Are a guest now
|
||||
$this->content->items[]='<a href="enrol.php?id='.$this->instance->pageid.'">'.get_string('enrolme', '', s($course->shortname)).'</a>';
|
||||
$this->content->items[]='<a href="enrol.php?id='.$this->instance->pageid.'">'.get_string('enrolme', '', format_string($course->shortname)).'</a>';
|
||||
$this->content->icons[]='<img src="'.$CFG->pixpath.'/i/user.gif" class="icon" alt="" />';
|
||||
} else if (has_capability('moodle/role:unassignself', $context, NULL, false)) { // Have some role
|
||||
$this->content->items[]='<a href="unenrol.php?id='.$this->instance->pageid.'">'.get_string('unenrolme', '', s($course->shortname)).'</a>';
|
||||
$this->content->items[]='<a href="unenrol.php?id='.$this->instance->pageid.'">'.get_string('unenrolme', '', format_string($course->shortname)).'</a>';
|
||||
$this->content->icons[]='<img src="'.$CFG->pixpath.'/i/user.gif" class="icon" alt="" />';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,8 +44,8 @@ class block_course_list extends block_list {
|
||||
continue;
|
||||
}
|
||||
$linkcss = $course->visible ? "" : " class=\"dimmed\" ";
|
||||
$this->content->items[]="<a $linkcss title=\"" . s($course->shortname) . "\" ".
|
||||
"href=\"$CFG->wwwroot/course/view.php?id=$course->id\">" . s($course->fullname) . "</a>";
|
||||
$this->content->items[]="<a $linkcss title=\"" . format_string($course->shortname) . "\" ".
|
||||
"href=\"$CFG->wwwroot/course/view.php?id=$course->id\">" . format_string($course->fullname) . "</a>";
|
||||
$this->content->icons[]=$icon;
|
||||
}
|
||||
$this->title = get_string('mycourses');
|
||||
@@ -65,7 +65,7 @@ class block_course_list extends block_list {
|
||||
if (count($categories) > 1 || (count($categories) == 1 && count_records('course') > 200)) { // Just print top level category links
|
||||
foreach ($categories as $category) {
|
||||
$linkcss = $category->visible ? "" : " class=\"dimmed\" ";
|
||||
$this->content->items[]="<a $linkcss href=\"$CFG->wwwroot/course/category.php?id=$category->id\">" . s($category->name) . "</a>";
|
||||
$this->content->items[]="<a $linkcss href=\"$CFG->wwwroot/course/category.php?id=$category->id\">" . format_string($category->name) . "</a>";
|
||||
$this->content->icons[]=$icon;
|
||||
}
|
||||
$this->content->icons[] = '';
|
||||
@@ -83,14 +83,18 @@ class block_course_list extends block_list {
|
||||
if ($courses) {
|
||||
foreach ($courses as $course) {
|
||||
$linkcss = $course->visible ? "" : " class=\"dimmed\" ";
|
||||
$this->content->items[]="<a $linkcss title=\"".s($course->shortname)."\" ".
|
||||
"href=\"$CFG->wwwroot/course/view.php?id=$course->id\">$course->fullname</a>";
|
||||
|
||||
$this->content->items[]="<a $linkcss title=\""
|
||||
. format_string($course->shortname)."\" ".
|
||||
"href=\"$CFG->wwwroot/course/view.php?id=$course->id\">"
|
||||
. format_string($course->fullname) . "</a>";
|
||||
$this->content->icons[]=$icon;
|
||||
}
|
||||
/// If we can update any course of the view all isn't hidden, show the view all courses link
|
||||
if (has_capability('moodle/course:update', get_context_instance(CONTEXT_SYSTEM)) || empty($CFG->block_course_list_hideallcourseslink)) {
|
||||
$this->content->icons[] = '';
|
||||
$this->content->items[] = " <a href=\"$CFG->wwwroot/course/index.php\">".get_string("fulllistofcourses")."</a>...";
|
||||
$this->content->items[] = " <a href=\"$CFG->wwwroot/course/index.php\">"
|
||||
.get_string("fulllistofcourses")."</a>...";
|
||||
}
|
||||
$this->get_remote_courses();
|
||||
} else {
|
||||
@@ -123,8 +127,9 @@ class block_course_list extends block_list {
|
||||
$this->content->items[] = get_string('remotecourses','mnet');
|
||||
$this->content->icons[] = '';
|
||||
foreach ($courses as $course) {
|
||||
$this->content->items[]="<a title=\"$course->shortname\" ".
|
||||
"href=\"{$CFG->wwwroot}/auth/mnet/jump.php?hostid={$course->hostid}&wantsurl=/course/view.php?id={$course->remoteid}\">$course->fullname</a>";
|
||||
$this->content->items[]="<a title=\"" . format_string($course->shortname) . "\" ".
|
||||
"href=\"{$CFG->wwwroot}/auth/mnet/jump.php?hostid={$course->hostid}&wantsurl=/course/view.php?id={$course->remoteid}\">"
|
||||
. format_string($course->fullname) . "</a>";
|
||||
$this->content->icons[]=$icon;
|
||||
}
|
||||
// if we listed courses, we are done
|
||||
|
||||
+3
-3
@@ -225,7 +225,7 @@
|
||||
}
|
||||
$catlinkcss = $subcategory->visible ? "" : " class=\"dimmed\" ";
|
||||
echo '<a '.$catlinkcss.' href="category.php?id='.$subcategory->id.'">'.
|
||||
$subcategory->name.'</a><br />';
|
||||
format_string($subcategory->name).'</a><br />';
|
||||
}
|
||||
}
|
||||
if (!$firstentry) {
|
||||
@@ -312,7 +312,7 @@
|
||||
|
||||
$linkcss = $acourse->visible ? "" : ' class="dimmed" ';
|
||||
echo '<tr>';
|
||||
echo '<td><a '.$linkcss.' href="view.php?id='.$acourse->id.'">'.$acourse->fullname.'</a></td>';
|
||||
echo '<td><a '.$linkcss.' href="view.php?id='.$acourse->id.'">'. format_string($acourse->fullname) .'</a></td>';
|
||||
if ($creatorediting) {
|
||||
echo "<td>";
|
||||
if (has_capability('moodle/course:update', $coursecontext)) {
|
||||
@@ -432,7 +432,7 @@
|
||||
echo '<form id="renameform" action="category.php" method="post">';
|
||||
echo '<input type="hidden" name="id" value="'.$category->id.'" />';
|
||||
echo '<input type="hidden" name="sesskey" value="'.$USER->sesskey.'" />';
|
||||
echo '<input type="text" size="30" name="rename" value="'.s($category->name).'" alt="'.$strrename.'" />';
|
||||
echo '<input type="text" size="30" name="rename" value="'.format_string($category->name).'" alt="'.$strrename.'" />';
|
||||
echo '<input type="submit" value="'.$strrename.'" />';
|
||||
echo "</form>";
|
||||
echo "<br />";
|
||||
|
||||
+4
-3
@@ -37,7 +37,8 @@
|
||||
"<a href=\"category.php?id=$course->category\">$category->name</a> -> ".
|
||||
"$strdeletecheck");
|
||||
|
||||
notice_yesno("$strdeletecoursecheck<br /><br />$course->fullname ($course->shortname)",
|
||||
notice_yesno("$strdeletecoursecheck<br /><br />" . format_string($course->fullname) .
|
||||
" (" . format_string($course->shortname) . ")",
|
||||
"delete.php?id=$course->id&delete=".md5($course->timemodified)."&sesskey=$USER->sesskey",
|
||||
"category.php?id=$course->category");
|
||||
|
||||
@@ -57,7 +58,7 @@
|
||||
|
||||
add_to_log(SITEID, "course", "delete", "view.php?id=$course->id", "$course->fullname (ID $course->id)");
|
||||
|
||||
$strdeletingcourse = get_string("deletingcourse", "", $course->shortname);
|
||||
$strdeletingcourse = get_string("deletingcourse", "", format_string($course->shortname));
|
||||
|
||||
print_header("$site->shortname: $strdeletingcourse", $site->fullname,
|
||||
"<a href=\"../$CFG->admin/index.php\">$stradministration</a> -> ".
|
||||
@@ -70,7 +71,7 @@
|
||||
delete_course($course->id);
|
||||
fix_course_sortorder(); //update course count in catagories
|
||||
|
||||
print_heading( get_string("deletedcourse", "", $course->shortname) );
|
||||
print_heading( get_string("deletedcourse", "", format_string($course->shortname)) );
|
||||
|
||||
print_continue("category.php?id=$course->category");
|
||||
|
||||
|
||||
+2
-2
@@ -102,11 +102,11 @@ if (!empty($course)) {
|
||||
$strcategories = get_string("categories");
|
||||
|
||||
if (!empty($course)) {
|
||||
print_header($streditcoursesettings, "$course->fullname",
|
||||
print_header($streditcoursesettings, $course->fullname,
|
||||
"<a href=\"$CFG->wwwroot/course/view.php?id=$course->id\">$course->shortname</a>
|
||||
-> $streditcoursesettings", $editform->focus());
|
||||
} else {
|
||||
print_header("$site->shortname: $straddnewcourse", "$site->fullname",
|
||||
print_header("$site->shortname: $straddnewcourse", $site->fullname,
|
||||
"<a href=\"$CFG->wwwroot/$CFG->admin/index.php\">$stradministration</a> -> ".
|
||||
"<a href=\"index.php\">$strcategories</a> -> $straddnewcourse", $editform->focus());
|
||||
}
|
||||
|
||||
+1
-1
@@ -87,7 +87,7 @@
|
||||
|
||||
/// OK, we have all the data, now present it to the user
|
||||
|
||||
print_header("$course->shortname: $strgrades", "$course->fullname",
|
||||
print_header("$course->shortname: $strgrades", $course->fullname,
|
||||
"<a href=\"$CFG->wwwroot/course/view.php?id=$course->id\">$course->shortname</a>
|
||||
-> $strgrades");
|
||||
|
||||
|
||||
+3
-3
@@ -31,7 +31,7 @@
|
||||
/// Get a list of all students
|
||||
if ($currentgroup) {
|
||||
if (!$students = get_group_students($currentgroup, "u.lastname ASC")) {
|
||||
print_header("$course->shortname: $strgrades", "$course->fullname",
|
||||
print_header("$course->shortname: $strgrades", $course->fullname,
|
||||
"<a href=\"$CFG->wwwroot/course/view.php?id=$course->id\">$course->shortname</a>
|
||||
-> $strgrades");
|
||||
setup_and_print_groups($course, $groupmode, "grades.php?id=$course->id");
|
||||
@@ -41,7 +41,7 @@
|
||||
}
|
||||
} else {
|
||||
if (!$students = get_course_students($course->id, "u.lastname ASC")) {
|
||||
print_header("$course->shortname: $strgrades", "$course->fullname",
|
||||
print_header("$course->shortname: $strgrades", $course->fullname,
|
||||
"<a href=\"$CFG->wwwroot/course/view.php?id=$course->id\">$course->shortname</a>
|
||||
-> $strgrades");
|
||||
notice(get_string("nostudentsyet"), "$CFG->wwwroot/course/view.php?id=$course->id");
|
||||
@@ -289,7 +289,7 @@
|
||||
|
||||
} else { // Just print the web page
|
||||
|
||||
print_header("$course->shortname: $strgrades", "$course->fullname",
|
||||
print_header("$course->shortname: $strgrades", $course->fullname,
|
||||
"<a href=\"$CFG->wwwroot/course/view.php?id=$course->id\">$course->shortname</a>
|
||||
-> $strgrades");
|
||||
|
||||
|
||||
+1
-1
@@ -61,7 +61,7 @@
|
||||
$strgroupmemberssee = get_string('groupmemberssee');
|
||||
$strparticipants = get_string('participants');
|
||||
|
||||
print_header("$course->shortname: $strgroups", "$course->fullname",
|
||||
print_header("$course->shortname: $strgroups", $course->fullname,
|
||||
"<a href=\"$CFG->wwwroot/course/view.php?id=$course->id\">$course->shortname</a> ".
|
||||
"-> <a href=\"$CFG->wwwroot/user/index.php?id=$course->id\">$strparticipants</a> ".
|
||||
"-> $strgroups", "", "", true, '', user_login_string($course, $USER));
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
print_header("$course->shortname: $strimportactivities", "$course->fullname",
|
||||
print_header("$course->shortname: $strimportactivities", $course->fullname,
|
||||
"<a href=\"$CFG->wwwroot/course/view.php?id=$course->id\">$course->shortname</a> ".
|
||||
"-> <a href=\"$CFG->wwwroot/course/import.php?id=$course->id\">".get_string('import')."</a> ".
|
||||
"-> $strimportactivities");
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
|
||||
/// Print the header
|
||||
|
||||
print_header("$course->shortname: $strimportgroups", "$course->fullname",
|
||||
print_header("$course->shortname: $strimportgroups", $course->fullname,
|
||||
"<a href=\"$CFG->wwwroot/course/view.php?id=$course->id\">$course->shortname</a> ".
|
||||
"-> <a href=\"$CFG->wwwroot/course/import.php?id=$course->id\">".get_string('import')."</a> ".
|
||||
"-> $strimportgroups");
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
$strshowall = get_string("showall");
|
||||
|
||||
print_header("$course->shortname: $strassigncourses",
|
||||
"$site->fullname",
|
||||
$site->fullname,
|
||||
"<a href=\"view.php?id=$course->id\">$course->shortname</a> -> $strassigncourses",
|
||||
"searchtext");
|
||||
|
||||
|
||||
+5
-5
@@ -106,9 +106,9 @@
|
||||
$newcategory->name = $form->addcategory;
|
||||
$newcategory->sortorder = 999;
|
||||
if (!insert_record('course_categories', $newcategory)) {
|
||||
notify("Could not insert the new category '" . s($newcategory->name) . "'");
|
||||
notify("Could not insert the new category '" . format_string($newcategory->name) . "'");
|
||||
} else {
|
||||
notify(get_string('categoryadded', '', s($newcategory->name)));
|
||||
notify(get_string('categoryadded', '', format_string($newcategory->name)));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -145,11 +145,11 @@
|
||||
|
||||
/// Finally delete the category itself
|
||||
if (delete_records('course_categories', 'id', $deletecat->id)) {
|
||||
notify(get_string('categorydeleted', '', s($deletecat->name)));
|
||||
notify(get_string('categorydeleted', '', format_string($deletecat->name)));
|
||||
}
|
||||
}
|
||||
else {
|
||||
$strdeletecategorycheck = get_string('deletecategorycheck','', s($deletecat->name));
|
||||
$strdeletecategorycheck = get_string('deletecategorycheck','', format_string($deletecat->name));
|
||||
notice_yesno($strdeletecategorycheck,
|
||||
"index.php?delete=$delete&sure=".md5($deletecat->timemodified)."&sesskey=$USER->sesskey",
|
||||
"index.php?sesskey=$USER->sesskey");
|
||||
@@ -353,7 +353,7 @@ function print_category_edit($category, $displaylist, $parentslist, $depth=-1, $
|
||||
$linkcss = $category->visible ? '' : ' class="dimmed" ';
|
||||
echo '<a '.$linkcss.' title="'.$str->edit.'" '.
|
||||
' href="category.php?id='.$category->id.'&categoryedit=on&sesskey='.sesskey().'">'.
|
||||
s($category->name).'</a>';
|
||||
format_string($category->name).'</a>';
|
||||
echo '</td>';
|
||||
|
||||
echo '<td class="count">'.$category->coursecount.'</td>';
|
||||
|
||||
+1
-1
@@ -30,7 +30,7 @@
|
||||
|
||||
print_header(get_string("summaryof", "", $course->fullname));
|
||||
|
||||
echo "<h3 align=\"center\">$course->fullname<br />($course->shortname)</h3>";
|
||||
echo "<h3 align=\"center\">" . format_string($course->fullname) . "<br />(" . format_string($course->shortname) . ")</h3>";
|
||||
|
||||
echo "<center>";
|
||||
if ($course->guest) {
|
||||
|
||||
+13
-13
@@ -988,7 +988,7 @@ function print_overview($courses) {
|
||||
if (empty($course->visible)) {
|
||||
$linkcss = 'class="dimmed"';
|
||||
}
|
||||
print_heading('<a title="'.$course->fullname.'" '.$linkcss.' href="'.$CFG->wwwroot.'/course/view.php?id='.$course->id.'">'.$course->fullname.'</a>');
|
||||
print_heading('<a title="'. format_string($course->fullname).'" '.$linkcss.' href="'.$CFG->wwwroot.'/course/view.php?id='.$course->id.'">'. format_string($course->fullname).'</a>');
|
||||
if (array_key_exists($course->id,$htmlarray)) {
|
||||
foreach ($htmlarray[$course->id] as $modname => $html) {
|
||||
echo $html;
|
||||
@@ -1534,7 +1534,7 @@ function rebuild_course_cache($courseid=0) {
|
||||
foreach ($courses as $course) {
|
||||
$modinfo = serialize(get_array_of_activities($course->id));
|
||||
if (!set_field("course", "modinfo", $modinfo, "id", $course->id)) {
|
||||
notify("Could not cache module information for course '$course->fullname'!");
|
||||
notify("Could not cache module information for course '" . format_string($course->fullname) . "'!");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1557,9 +1557,9 @@ function make_categories_list(&$list, &$parents, $category=NULL, $path="") {
|
||||
|
||||
if ($category) {
|
||||
if ($path) {
|
||||
$path = $path.' / '.s($category->name);
|
||||
$path = $path.' / '.format_string($category->name);
|
||||
} else {
|
||||
$path = s($category->name);
|
||||
$path = format_string($category->name);
|
||||
}
|
||||
$list[$category->id] = $path;
|
||||
} else {
|
||||
@@ -1678,7 +1678,7 @@ function print_category_info($category, $depth, $files = false) {
|
||||
|
||||
echo '<td valign="top" class="category image">'.$catimage.'</td>';
|
||||
echo '<td valign="top" class="category name">';
|
||||
echo '<a '.$catlinkcss.' href="'.$CFG->wwwroot.'/course/category.php?id='.$category->id.'">'.$category->name.'</a>';
|
||||
echo '<a '.$catlinkcss.' href="'.$CFG->wwwroot.'/course/category.php?id='.$category->id.'">'. format_string($category->name).'</a>';
|
||||
echo '</td>';
|
||||
echo '<td class="category info"> </td>';
|
||||
echo '</tr>';
|
||||
@@ -1688,7 +1688,7 @@ function print_category_info($category, $depth, $files = false) {
|
||||
$linkcss = $course->visible ? '' : ' class="dimmed" ';
|
||||
echo '<tr><td valign="top"> ';
|
||||
echo '</td><td valign="top" class="course name">';
|
||||
echo '<a '.$linkcss.' href="'.$CFG->wwwroot.'/course/view.php?id='.$course->id.'">'.$course->fullname.'</a>';
|
||||
echo '<a '.$linkcss.' href="'.$CFG->wwwroot.'/course/view.php?id='.$course->id.'">'. format_string($course->fullname).'</a>';
|
||||
echo '</td><td align="right" valign="top" class="course info">';
|
||||
if ($course->guest ) {
|
||||
echo '<a title="'.$strallowguests.'" href="'.$CFG->wwwroot.'/course/view.php?id='.$course->id.'">';
|
||||
@@ -1724,7 +1724,7 @@ function print_category_info($category, $depth, $files = false) {
|
||||
}
|
||||
|
||||
echo '<td valign="top" class="category name">';
|
||||
echo '<a '.$catlinkcss.' href="'.$CFG->wwwroot.'/course/category.php?id='.$category->id.'">'.$category->name.'</a>';
|
||||
echo '<a '.$catlinkcss.' href="'.$CFG->wwwroot.'/course/category.php?id='.$category->id.'">'. format_string($category->name).'</a>';
|
||||
echo '</td>';
|
||||
echo '<td valign="top" class="category number">';
|
||||
if ($category->coursecount) {
|
||||
@@ -1791,7 +1791,7 @@ function print_course($course) {
|
||||
echo '<div class="info">';
|
||||
echo '<div class="name"><a title="'.get_string('entercourse').'"'.
|
||||
$linkcss.' href="'.$CFG->wwwroot.'/course/view.php?id='.$course->id.'">'.
|
||||
$course->fullname.'</a></div>';
|
||||
format_string($course->fullname).'</a></div>';
|
||||
|
||||
/// first find all roles that are supposed to be displayed
|
||||
if ($managerroles = get_config('', 'coursemanager')) {
|
||||
@@ -1946,10 +1946,10 @@ function print_remote_course($course, $width="100%") {
|
||||
echo '<div class="info">';
|
||||
echo '<div class="name"><a title="'.get_string('entercourse').'"'.
|
||||
$linkcss.' href="'.$url.'">'
|
||||
. s($course->fullname) .'</a><br />'
|
||||
. s($course->hostname) . ' : '
|
||||
. s($course->cat_name) . ' : '
|
||||
. s($course->shortname). '</div>';
|
||||
. format_string($course->fullname) .'</a><br />'
|
||||
. format_string($course->hostname) . ' : '
|
||||
. format_string($course->cat_name) . ' : '
|
||||
. format_string($course->shortname). '</div>';
|
||||
echo '</div><div class="summary">';
|
||||
$options = NULL;
|
||||
$options->noclean = true;
|
||||
@@ -2336,7 +2336,7 @@ function make_editing_buttons($mod, $absolute=false, $moveselect=true, $indent=-
|
||||
*/
|
||||
function course_format_name ($course,$max=100) {
|
||||
|
||||
$str = $course->shortname.': '.$course->fullname;
|
||||
$str = $course->shortname.': '. $course->fullname;
|
||||
if (strlen($str) <= $max) {
|
||||
return $str;
|
||||
}
|
||||
|
||||
+2
-2
@@ -109,8 +109,8 @@
|
||||
//do not output raw html from request, quote html entities using s()!!
|
||||
$table->data[] = array(((!empty($course->password)) ?
|
||||
'<img hspace="1" alt="'.$strrequireskey.'" class="icon" src="'.$CFG->pixpath.'/i/key.gif" />' : ''),
|
||||
s($course->shortname),s($course->fullname),fullname($requester),
|
||||
s($course->summary),s($course->reason),
|
||||
format_string($course->shortname),format_string($course->fullname),fullname($requester),
|
||||
format_string($course->summary),format_string($course->reason),
|
||||
'<a href="pending.php?approve='.$course->id.'&sesskey='.sesskey().'">'.get_string('approve').'</a> | '
|
||||
.'<a href="pending.php?reject='.$course->id.'&sesskey='.sesskey().'">'.get_string('reject').'</a>');
|
||||
}
|
||||
|
||||
+5
-5
@@ -44,15 +44,15 @@
|
||||
$dateinfo = userdate($date, get_string("strftimedaydate"));
|
||||
|
||||
if ($course->id != SITEID) {
|
||||
print_header("$course->shortname: $strrecentactivity", "$course->fullname",
|
||||
print_header("$course->shortname: $strrecentactivity", $course->fullname,
|
||||
"<a href=\"view.php?id=$course->id\">$course->shortname</a> ->
|
||||
<a href=\"recent.php?id=$course->id\">$strrecentactivity</a> -> $userinfo, $dateinfo", "", $meta);
|
||||
} else {
|
||||
print_header("$course->shortname: $strrecentactivity", "$course->fullname",
|
||||
print_header("$course->shortname: $strrecentactivity", $course->fullname,
|
||||
"<a href=\"recent.php?id=$course->id\">$strrecentactivity</a> -> $userinfo, $dateinfo", "", $meta);
|
||||
}
|
||||
|
||||
print_heading("$course->fullname: $userinfo, $dateinfo (".usertimezone().")", '', 3);
|
||||
print_heading(format_string($course->fullname) . ": $userinfo, $dateinfo (".usertimezone().")", '', 3);
|
||||
$advancedfilter = 1;
|
||||
print_recent_selector_form($course, $advancedfilter, $user, $date, $modname, $modid, $modaction, $selectedgroup, $sortby);
|
||||
|
||||
@@ -69,10 +69,10 @@
|
||||
}
|
||||
|
||||
if ($course->id != SITEID) {
|
||||
print_header("$course->shortname: $strrecentactivity", "$course->fullname",
|
||||
print_header("$course->shortname: $strrecentactivity", $course->fullname,
|
||||
"<a href=\"view.php?id=$course->id\">$course->shortname</a> -> $strrecentactivity", "", $meta);
|
||||
} else {
|
||||
print_header("$course->shortname: $strrecentactivity", "$course->fullname",
|
||||
print_header("$course->shortname: $strrecentactivity", $course->fullname,
|
||||
"$strrecentactivity", "", $meta);
|
||||
}
|
||||
|
||||
|
||||
@@ -86,7 +86,7 @@
|
||||
<a href=\"index.php?id=$course->id\">$strlogs</a> -> $userinfo, $dateinfo", '');
|
||||
}
|
||||
|
||||
print_heading("$course->fullname: $userinfo, $dateinfo (".usertimezone().")");
|
||||
print_heading(format_string($course->fullname) . ": $userinfo, $dateinfo (".usertimezone().")");
|
||||
print_mnet_log_selector_form($hostid, $course, $user, $date, $modname, $modid, $modaction, $group, $showcourses, $showusers, $logformat);
|
||||
|
||||
if($hostid == $CFG->mnet_localhost_id) {
|
||||
|
||||
@@ -335,7 +335,7 @@ function print_log_selector_form($course, $selecteduser=0, $selecteddate='today'
|
||||
if ($ccc = get_records("course", "", "", "fullname","id,fullname,category")) {
|
||||
foreach ($ccc as $cc) {
|
||||
if ($cc->category) {
|
||||
$courses["$cc->id"] = "$cc->fullname";
|
||||
$courses["$cc->id"] = $cc->fullname;
|
||||
} else {
|
||||
$courses["$cc->id"] = " $cc->fullname (Site)";
|
||||
}
|
||||
|
||||
@@ -29,12 +29,12 @@
|
||||
$strtodaylogs = get_string("todaylogs");
|
||||
$strreports = get_string("reports");
|
||||
|
||||
print_header("$course->shortname: $stractivityreport", "$course->fullname",
|
||||
print_header("$course->shortname: $stractivityreport", $course->fullname,
|
||||
"<a href=\"../../view.php?id=$course->id\">$course->shortname</a> ->
|
||||
<a href=\"../../report.php?id=$course->id\">$strreports</a> ->
|
||||
$stractivityreport");
|
||||
|
||||
print_heading("$course->fullname");
|
||||
print_heading(format_string($course->fullname));
|
||||
|
||||
echo "<table cellpadding=\"10\" align=\"center\"><tr>";
|
||||
echo "<td>$stractivityreport: </td>";
|
||||
|
||||
@@ -51,10 +51,10 @@
|
||||
$strallactions = get_string('allactions');
|
||||
$strreports = get_string('reports');
|
||||
|
||||
$strnav = "<a href=\"../../view.php?id=$course->id\">$course->shortname</a> ->
|
||||
$strnav = "<a href=\"../../view.php?id=$course->id\">" . format_string($course->shortname) . "</a> ->
|
||||
<a href=\"../../report.php?id=$course->id\">$strreports</a> -> ". $strparticipation;
|
||||
|
||||
print_header("$course->shortname: $strparticipation", "$course->fullname",
|
||||
print_header("$course->shortname: $strparticipation", $course->fullname,
|
||||
"<a href=\"../../view.php?id=$course->id\">$course->shortname</a> ->
|
||||
<a href=\"../../report.php?id=$course->id\">$strreports</a> ->
|
||||
$strparticipation");
|
||||
|
||||
@@ -54,11 +54,11 @@
|
||||
|
||||
$menu = report_stats_mode_menu($course, $mode, $time, "$CFG->wwwroot/course/report/stats/index.php");
|
||||
|
||||
$crumb = "<a href=\"../../view.php?id=$course->id\">$course->shortname</a> ->
|
||||
$crumb = "<a href=\"../../view.php?id=$course->id\">" . format_string($course->shortname) . "</a> ->
|
||||
<a href=\"../../report.php?id=$course->id\">$strreports</a> ->
|
||||
$strstats";
|
||||
|
||||
print_header("$course->shortname: $strstats", "$course->fullname",
|
||||
print_header("$course->shortname: $strstats", $course->fullname,
|
||||
$crumb, '', '', true, ' ', $menu);
|
||||
|
||||
|
||||
|
||||
@@ -107,7 +107,7 @@
|
||||
|
||||
$stats = stats_fix_zeros($stats,$param->timeafter,$param->table,(!empty($param->line2)));
|
||||
|
||||
print_heading($course->shortname.' - '.get_string('statsreport'.$report)
|
||||
print_heading(format_string($course->shortname).' - '.get_string('statsreport'.$report)
|
||||
.((!empty($user)) ? ' '.get_string('statsreportforuser').' ' .fullname($user,true) : '')
|
||||
.((!empty($roleid)) ? ' '.get_field('role','name','id',$roleid) : ''));
|
||||
|
||||
|
||||
+3
-3
@@ -105,7 +105,7 @@
|
||||
// $scales_site_uses = site_scale_used($scale->id,$courses);
|
||||
$scalemenu = make_menu_from_list($scale->scale);
|
||||
|
||||
print_header("$course->shortname: $strscales", "$course->fullname",
|
||||
print_header("$course->shortname: $strscales", $course->fullname,
|
||||
"$course->shortname -> $strscales -> $scale->name", "", "", true, " ", " ");
|
||||
|
||||
close_window_button();
|
||||
@@ -164,7 +164,7 @@
|
||||
}
|
||||
|
||||
//Print out the headers
|
||||
print_header("$course->shortname: $strscales", "$course->fullname",
|
||||
print_header("$course->shortname: $strscales", $course->fullname,
|
||||
"<a href=\"view.php?id=$course->id\">$course->shortname</a>".
|
||||
" -> <a href=\"scales.php?id=$course->id\">$strscales</a>".
|
||||
" -> ".get_string("editinga","",$strscale), $focus);
|
||||
@@ -372,7 +372,7 @@
|
||||
|
||||
/// Print out the main page
|
||||
|
||||
print_header("$course->shortname: $strscales", "$course->fullname",
|
||||
print_header("$course->shortname: $strscales", $course->fullname,
|
||||
"<a href=\"view.php?id=$course->id\">$course->shortname</a>
|
||||
-> $strscales");
|
||||
|
||||
|
||||
+1
-1
@@ -232,7 +232,7 @@
|
||||
}
|
||||
|
||||
echo "<tr>";
|
||||
echo "<td><a $linkcss href=\"view.php?id=$course->id\">$course->fullname</a></td>";
|
||||
echo "<td><a $linkcss href=\"view.php?id=$course->id\">" . format_string($course->fullname) . "</a></td>";
|
||||
echo "<td>".$displaylist[$course->category]."</td>";
|
||||
echo "<td align=\"center\">";
|
||||
|
||||
|
||||
+2
-2
@@ -43,13 +43,13 @@
|
||||
$fullname = fullname($user, true);
|
||||
|
||||
if ($course->id != SITEID) {
|
||||
print_header("$course->shortname: $stractivityreport ($mode)", "$course->fullname",
|
||||
print_header("$course->shortname: $stractivityreport ($mode)", $course->fullname,
|
||||
"<a href=\"../course/view.php?id=$course->id\">$course->shortname</a> ->
|
||||
<a href=\"../user/index.php?id=$course->id\">$strparticipants</a> ->
|
||||
<a href=\"../user/view.php?id=$user->id&course=$course->id\">$fullname</a> ->
|
||||
$stractivityreport -> $strmode");
|
||||
} else {
|
||||
print_header("$course->shortname: $stractivityreport ($mode)", "$course->fullname",
|
||||
print_header("$course->shortname: $stractivityreport ($mode)", $course->fullname,
|
||||
"<a href=\"../user/view.php?id=$user->id&course=$course->id\">$fullname</a> ->
|
||||
$stractivityreport -> $strmode");
|
||||
}
|
||||
|
||||
@@ -258,7 +258,7 @@ class enrolment_plugin_authorize
|
||||
$a->user = fullname($USER);
|
||||
email_to_user($paymentmanager,
|
||||
$USER,
|
||||
get_string("enrolmentnew", '', $course->shortname),
|
||||
get_string("enrolmentnew", '', format_string($course->shortname)),
|
||||
get_string('enrolmentnewuser', '', $a));
|
||||
}
|
||||
if (!empty($CFG->enrol_mailadmins)) {
|
||||
@@ -269,7 +269,7 @@ class enrolment_plugin_authorize
|
||||
foreach ($admins as $admin) {
|
||||
email_to_user($admin,
|
||||
$USER,
|
||||
get_string("enrolmentnew", '', $course->shortname),
|
||||
get_string("enrolmentnew", '', format_string($course->shortname)),
|
||||
get_string('enrolmentnewuser', '', $a));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -242,7 +242,7 @@ function authorize_print_order_details($orderno)
|
||||
$table->data[] = array("<b>$authstrs->amount:</b>", "$order->currency $order->amount");
|
||||
if (empty($cmdcapture) and empty($cmdrefund) and empty($cmdvoid) and empty($cmddelete)) {
|
||||
$color = authorize_get_status_color($status->status);
|
||||
$table->data[] = array("<b>$strs->course:</b>", $course->shortname);
|
||||
$table->data[] = array("<b>$strs->course:</b>", format_string($course->shortname));
|
||||
$table->data[] = array("<b>$strs->status:</b>", "<font style='color:$color'>" . $authstrs->{$status->status} . "</font>");
|
||||
if ($order->paymentmethod == AN_METHOD_CC) {
|
||||
$table->data[] = array("<b>$authstrs->nameoncard:</b>", $order->ccname);
|
||||
@@ -287,7 +287,7 @@ function authorize_print_order_details($orderno)
|
||||
}
|
||||
else {
|
||||
$table->data[] = array("<b><font color='red'>$strs->error:</font></b>",
|
||||
"Error while trying to enrol ".fullname($user)." in '$course->shortname'");
|
||||
"Error while trying to enrol ".fullname($user)." in '" . format_string($course->shortname) . "'");
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -283,9 +283,9 @@ function sync_enrolments($role = null) {
|
||||
if ($to_prune) {
|
||||
foreach ($to_prune as $role_assignment) {
|
||||
if (role_unassign($role->id, $role_assignment->userid, 0, $role_assignment->contextid)){
|
||||
print "Unassigned {$role->shortname} assignment #{$role_assignment->id} for course {$course->id} ({$course->shortname}); user {$role_assignment->userid}\n";
|
||||
print "Unassigned {$role->shortname} assignment #{$role_assignment->id} for course {$course->id} (" . format_string($course->shortname) . "); user {$role_assignment->userid}\n";
|
||||
} else {
|
||||
print "Failed to unassign {$role->shortname} assignment #{$role_assignment->id} for course {$course->id} ({$course->shortname}); user {$role_assignment->userid}\n";
|
||||
print "Failed to unassign {$role->shortname} assignment #{$role_assignment->id} for course {$course->id} (" . format_string($course->shortname) . "); user {$role_assignment->userid}\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -325,9 +325,9 @@ function sync_enrolments($role = null) {
|
||||
}
|
||||
|
||||
if (role_assign($role->id, $userid, 0, $context->id, 0, 0, 0, 'database')){
|
||||
print "Assigned role {$role->shortname} to user {$userid} in course {$course->id} ({$course->shortname})\n";
|
||||
print "Assigned role {$role->shortname} to user {$userid} in course {$course->id} (" . format_string($course->shortname) . ")\n";
|
||||
} else {
|
||||
print "Failed to assign role {$role->shortname} to user {$userid} in course {$course->id} ({$course->shortname})\n";
|
||||
print "Failed to assign role {$role->shortname} to user {$userid} in course {$course->id} (" . format_string($course->shortname) . ")\n";
|
||||
}
|
||||
|
||||
} // end foreach member
|
||||
|
||||
@@ -10,7 +10,7 @@ if (!$site = get_site()) {
|
||||
/// get language strings
|
||||
$str = get_strings(array('enrolments', 'users', 'administration', 'settings'));
|
||||
|
||||
print_header("$site->shortname: $str->enrolments", "$site->fullname",
|
||||
print_header("$site->shortname: $str->enrolments", $site->fullname,
|
||||
"<a href=\"../../$CFG->admin/index.php\">$str->administration</a> ->
|
||||
$str->enrolments -> IMS import");
|
||||
|
||||
|
||||
@@ -155,7 +155,7 @@ if (count($categories) < 1) {
|
||||
getElementById('allowedcoursesform').addcategories.selectedIndex=-1;" >
|
||||
<?php
|
||||
foreach ($allowedcategories as $category) {
|
||||
echo "<option value=\"$category->id\"> $category->name </option>\n";
|
||||
echo "<option value=\"$category->id\"> " . format_string($category->name) . " </option>\n";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
@@ -176,7 +176,7 @@ if (count($categories) < 1) {
|
||||
getElementById('allowedcoursesform').removecategories.selectedIndex=-1;">
|
||||
<?php
|
||||
foreach ($potentialcategories as $category) {
|
||||
echo "<option value=\"$category->id\"> $category->name </option>\n";
|
||||
echo "<option value=\"$category->id\"> " . format_string($category->name) . " </option>\n";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
@@ -212,7 +212,7 @@ if (count($courses) < 1) {
|
||||
getElementById('allowedcoursesform').addcourses.selectedIndex=-1;">
|
||||
<?php
|
||||
foreach ($allowedcourses as $course) {
|
||||
echo "<option value=\"$course->id\"> $course->shortname </option>\n";
|
||||
echo "<option value=\"$course->id\"> " . format_string($course->shortname) . " </option>\n";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
@@ -233,7 +233,7 @@ if (count($courses) < 1) {
|
||||
getElementById('allowedcoursesform').removecourses.selectedIndex=-1;">
|
||||
<?php
|
||||
foreach ($potentialcourses as $course) {
|
||||
echo "<option value=\"$course->id\"> $course->shortname </option>\n";
|
||||
echo "<option value=\"$course->id\"> " . format_string($course->shortname) . " </option>\n";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
|
||||
@@ -168,21 +168,21 @@
|
||||
$teacher = get_teacher($course->id);
|
||||
|
||||
if (!empty($CFG->enrol_mailstudents)) {
|
||||
$a->coursename = "$course->fullname";
|
||||
$a->coursename = $course->fullname;
|
||||
$a->profileurl = "$CFG->wwwroot/user/view.php?id=$user->id";
|
||||
email_to_user($user, $teacher, get_string("enrolmentnew", '', $course->shortname),
|
||||
get_string('welcometocoursetext', '', $a));
|
||||
}
|
||||
|
||||
if (!empty($CFG->enrol_mailteachers)) {
|
||||
$a->course = "$course->fullname";
|
||||
$a->course = $course->fullname;
|
||||
$a->user = fullname($user);
|
||||
email_to_user($teacher, $user, get_string("enrolmentnew", '', $course->shortname),
|
||||
get_string('enrolmentnewuser', '', $a));
|
||||
}
|
||||
|
||||
if (!empty($CFG->enrol_mailadmins)) {
|
||||
$a->course = "$course->fullname";
|
||||
$a->course = $course->fullname;
|
||||
$a->user = fullname($user);
|
||||
$admins = get_admins();
|
||||
foreach ($admins as $admin) {
|
||||
|
||||
+1
-1
@@ -130,7 +130,7 @@
|
||||
}
|
||||
|
||||
} else {
|
||||
print_header("$course->shortname: $strfiles", "$course->fullname",
|
||||
print_header("$course->shortname: $strfiles", $course->fullname,
|
||||
"<a href=\"../course/view.php?id=$course->id\">$course->shortname".
|
||||
"</a> -> $fullnav", $formfield);
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
$group = get_current_group($course->id);
|
||||
|
||||
print_header("$course->shortname: ".get_string('grades'), "$course->fullname", grade_nav($course, $action));
|
||||
print_header("$course->shortname: ".get_string('grades'), $course->fullname, grade_nav($course, $action));
|
||||
|
||||
grade_preferences_menu($action, $course, $group);
|
||||
|
||||
|
||||
+5
-4
@@ -2362,7 +2362,8 @@ function grade_set_grade_weights() {
|
||||
}
|
||||
}
|
||||
else {
|
||||
echo '<center><font color="red">'.get_string('nonumericweight','grades').$category->name.': "'.$submitted_category.'"</font></center><br />';
|
||||
echo '<center><font color="red">'.get_string('nonumericweight','grades').
|
||||
format_string($category->name) .': "'.$submitted_category.'"</font></center><br />';
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2403,7 +2404,7 @@ function grade_display_grade_weights() {
|
||||
if ($category->name == UNCATEGORISED) {
|
||||
$category->name = get_string(UNCATEGORISED, 'grades');
|
||||
}
|
||||
echo '<tr><td align="center" class="generalboxcontent">'.$category->name.'</td>';
|
||||
echo '<tr><td align="center" class="generalboxcontent">'. format_string($category->name) .'</td>';
|
||||
echo '<td align="center" class="generalboxcontent"><input type="text" size="5" name="'.$form_catname.'" value="'.$val.'" /></td>';
|
||||
echo '<td align="center" class="generalboxcontent"><input type="text" size="5" name="drop_x_lowest'.$form_catname.'" value="'.$category->drop_x_lowest.'" /></td>';
|
||||
echo '<td align="center" class="generalboxcontent"><input type="text" size="5" name="bonus_points'.$form_catname.'" value="'.$category->bonus_points.'" /></td>';
|
||||
@@ -2701,10 +2702,10 @@ function grade_category_select($id_selected = 0) {
|
||||
$category->name = get_string('uncategorised', 'grades');
|
||||
}
|
||||
if ($category->id == $id_selected) {
|
||||
echo '<option value="'.$category->id.'" selected="selected">'.$category->name.'</option>';
|
||||
echo '<option value="'.$category->id.'" selected="selected">'. format_string($category->name) .'</option>';
|
||||
}
|
||||
else {
|
||||
echo '<option value="'.$category->id.'">'.$category->name.'</option>';
|
||||
echo '<option value="'.$category->id.'">'. format_string($category->name) .'</option>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -78,7 +78,7 @@ if ($success) {
|
||||
$groupname = groups_get_group_displayname($groupid);
|
||||
|
||||
print_header("$course->shortname: $strgroups",
|
||||
"$course->fullname",
|
||||
$course->fullname,
|
||||
"<a href=\"$CFG->wwwroot/course/view.php?id=$courseid\">$course->shortname</a> ".
|
||||
"-> <a href=\"$CFG->wwwroot/user/index.php?id=$courseid\">$strparticipants</a> ".
|
||||
"-> $strgroups", '', '', true, '', user_login_string($course, $USER));
|
||||
|
||||
+1
-1
@@ -139,7 +139,7 @@ if ($success) {
|
||||
/// Print the page and form
|
||||
|
||||
print_header("$course->shortname: ". $strheading,
|
||||
"$course->fullname",
|
||||
$course->fullname,
|
||||
"<a href=\"$CFG->wwwroot/course/view.php?id=$courseid\">$course->shortname</a> ".
|
||||
"-> <a href=\"$CFG->wwwroot/user/index.php?id=$courseid\">$strparticipants</a> ".
|
||||
"-> $strgroups", '', '', true, '', user_login_string($course, $USER));
|
||||
|
||||
+1
-1
@@ -104,7 +104,7 @@ if ($success) {
|
||||
/// Print the page and form
|
||||
|
||||
print_header("$course->shortname: $strgroups",
|
||||
"$course->fullname",
|
||||
$course->fullname,
|
||||
"<a href=\"$CFG->wwwroot/course/view.php?id=$courseid\">$course->shortname</a> ".
|
||||
"-> <a href=\"$CFG->wwwroot/user/index.php?id=$courseid\">$strparticipants</a> ".
|
||||
"-> $strgroups", '', '', true, '', user_login_string($course, $USER));
|
||||
|
||||
@@ -48,7 +48,7 @@ if (!$error) {
|
||||
$strparticipants = get_string('participants');
|
||||
// Print the page and form
|
||||
print_header("$course->shortname: $strgroups",
|
||||
"$course->fullname",
|
||||
$course->fullname,
|
||||
"<a href=\"$CFG->wwwroot/course/view.php?id=$courseid\">$course->shortname</a> ".
|
||||
"-> <a href=\"$CFG->wwwroot/user/index.php?id=$courseid\">$strparticipants</a> ".
|
||||
"-> $strgroups", "", "", true, '', user_login_string($course, $USER));
|
||||
|
||||
@@ -38,7 +38,7 @@ if ($success) {
|
||||
// Print the page and form
|
||||
$strgroups = get_string('groups');
|
||||
$strparticipants = get_string('participants');
|
||||
print_header("$course->shortname: $strgroups", "$course->fullname",
|
||||
print_header("$course->shortname: $strgroups", $course->fullname,
|
||||
"<a href=\"$CFG->wwwroot/course/view.php?id=$courseid\">$course->shortname</a> ".
|
||||
"-> <a href=\"$CFG->wwwroot/user/index.php?id=$courseid\">$strparticipants</a> ".
|
||||
"-> <a href=\"$CFG->wwwroot/group/groupui/index.php?id=$courseid\">$strgroups</a>".
|
||||
|
||||
+2
-2
@@ -145,7 +145,7 @@ if ($success) {
|
||||
$strparticipants = get_string('participants');
|
||||
|
||||
print_header("$course->shortname: $strgroups home", //TODO: home
|
||||
"$course->fullname",
|
||||
$course->fullname,
|
||||
"<a href=\"$CFG->wwwroot/course/view.php?id=$courseid\">$course->shortname</a> ".
|
||||
"-> <a href=\"$CFG->wwwroot/user/index.php?id=$courseid\">$strparticipants</a> ".
|
||||
"-> $strgroups", '', '', true, '', user_login_string($course, $USER));
|
||||
@@ -154,7 +154,7 @@ if ($success) {
|
||||
//TODO: eventually we'll implement all buttons, meantime hide the ones we haven't finised.
|
||||
$shownotdone = false;
|
||||
|
||||
print_heading($course->shortname.' '.$strgroups, 'center', 3);
|
||||
print_heading(format_string($course->shortname) .' '.$strgroups, 'center', 3);
|
||||
?>
|
||||
<form id="groupeditform" action="index.php" method="post">
|
||||
<div>
|
||||
|
||||
+2
-2
@@ -2511,13 +2511,13 @@ function print_context_name($context) {
|
||||
|
||||
case CONTEXT_COURSECAT: // Coursecat -> coursecat or site
|
||||
if ($category = get_record('course_categories', 'id', $context->instanceid)) {
|
||||
$name = get_string('category').': '.$category->name;
|
||||
$name = get_string('category').': '. format_string($category->name);
|
||||
}
|
||||
break;
|
||||
|
||||
case CONTEXT_COURSE: // 1 to 1 to course cat
|
||||
if ($course = get_record('course', 'id', $context->instanceid)) {
|
||||
$name = get_string('course').': '.$course->fullname;
|
||||
$name = get_string('course').': '. format_string($course->fullname);
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
+6
-6
@@ -126,7 +126,7 @@ function main_upgrade($oldversion=0) {
|
||||
$mod->instance = $news->id;
|
||||
$mod->section = 0;
|
||||
if (! $mod->coursemodule = add_course_module($mod) ) {
|
||||
notify("Could not add a new course module to the course '$course->fullname'");
|
||||
notify("Could not add a new course module to the course '" . format_string($course->fullname) . "'");
|
||||
return false;
|
||||
}
|
||||
if (! $sectionid = add_mod_to_section($mod) ) {
|
||||
@@ -144,7 +144,7 @@ function main_upgrade($oldversion=0) {
|
||||
$mod->instance = $social->id;
|
||||
$mod->section = 0;
|
||||
if (! $mod->coursemodule = add_course_module($mod) ) {
|
||||
notify("Could not add a new course module to the course '$course->fullname'");
|
||||
notify("Could not add a new course module to the course '" . format_string($course->fullname) . "'");
|
||||
return false;
|
||||
}
|
||||
if (! $sectionid = add_mod_to_section($mod) ) {
|
||||
@@ -169,7 +169,7 @@ function main_upgrade($oldversion=0) {
|
||||
$modinfo = serialize(get_array_of_activities($course->id));
|
||||
|
||||
if (!set_field("course", "modinfo", $modinfo, "id", $course->id)) {
|
||||
notify("Could not cache module information for course '$course->fullname'!");
|
||||
notify("Could not cache module information for course '" . format_string($course->fullname) . "'!");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -199,7 +199,7 @@ function main_upgrade($oldversion=0) {
|
||||
$modinfo = serialize(get_array_of_activities($course->id));
|
||||
|
||||
if (!set_field("course", "modinfo", $modinfo, "id", $course->id)) {
|
||||
notify("Could not cache module information for course '$course->fullname'!");
|
||||
notify("Could not cache module information for course '" . format_string($course->fullname) . "'!");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -286,7 +286,7 @@ function main_upgrade($oldversion=0) {
|
||||
$modinfo = serialize(get_array_of_activities($course->id));
|
||||
|
||||
if (!set_field("course", "modinfo", $modinfo, "id", $course->id)) {
|
||||
notify("Could not cache module information for course '$course->fullname'!");
|
||||
notify("Could not cache module information for course '" . format_string($course->fullname) . "'!");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -506,7 +506,7 @@ function main_upgrade($oldversion=0) {
|
||||
|
||||
if ($courses = get_records_select("course", "category > 0")) {
|
||||
foreach ($courses as $course) {
|
||||
notify("Processing $course->fullname ...", "green");
|
||||
notify("Processing " . format_string($course->fullname) . " ...", "green");
|
||||
flush();
|
||||
if ($users = get_records_select("user_teachers", "course = '$course->id'",
|
||||
"id", "id, userid, timeaccess")) {
|
||||
|
||||
@@ -63,7 +63,7 @@ function main_upgrade($oldversion=0) {
|
||||
$modinfo = serialize(get_array_of_activities($course->id));
|
||||
|
||||
if (!set_field("course", "modinfo", $modinfo, "id", $course->id)) {
|
||||
notify("Could not cache module information for course '$course->fullname'!");
|
||||
notify("Could not cache module information for course '" . format_string($course->fullname) . "'!");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -255,7 +255,7 @@ function main_upgrade($oldversion=0) {
|
||||
|
||||
if ($courses = get_records_select("course", "category > 0")) {
|
||||
foreach ($courses as $course) {
|
||||
notify("Processing $course->fullname ...", "green");
|
||||
notify("Processing " . format_string($course->fullname) . " ...", "green");
|
||||
flush();
|
||||
if ($users = get_records_select("user_teachers", "course = '$course->id'",
|
||||
"id", "id, userid, timeaccess")) {
|
||||
|
||||
+4
-4
@@ -1752,7 +1752,7 @@ function require_login($courseorid=0, $autologinguest=true, $cm=null) {
|
||||
case 1: /// Guests always allowed
|
||||
if (!has_capability('moodle/course:view', $context)) { // Prohibited by capability
|
||||
print_header_simple();
|
||||
notice(get_string('guestsnotallowed', '', $COURSE->fullname), "$CFG->wwwroot/login/index.php");
|
||||
notice(get_string('guestsnotallowed', '', format_string($COURSE->fullname)), "$CFG->wwwroot/login/index.php");
|
||||
}
|
||||
if (!empty($cm) and !$cm->visible) { // Not allowed to see module, send to course page
|
||||
redirect($CFG->wwwroot.'/course/view.php?id='.$cm->course,
|
||||
@@ -1773,9 +1773,9 @@ function require_login($courseorid=0, $autologinguest=true, $cm=null) {
|
||||
default: /// Guests not allowed
|
||||
print_header_simple('', '', get_string('loggedinasguest'));
|
||||
if (empty($USER->switchrole[$context->id])) { // Normal guest
|
||||
notice(get_string('guestsnotallowed', '', $COURSE->fullname), "$CFG->wwwroot/login/index.php");
|
||||
notice(get_string('guestsnotallowed', '', format_string($COURSE->fullname)), "$CFG->wwwroot/login/index.php");
|
||||
} else {
|
||||
notify(get_string('guestsnotallowed', '', $COURSE->fullname));
|
||||
notify(get_string('guestsnotallowed', '', format_string($COURSE->fullname)));
|
||||
echo '<div class="notifyproblem">'.switchroles_form($COURSE->id).'</div>';
|
||||
print_footer($COURSE);
|
||||
exit;
|
||||
@@ -3663,7 +3663,7 @@ function email_welcome_message_to_user($course, $user=NULL) {
|
||||
}
|
||||
|
||||
if (!empty($course->welcomemessage)) {
|
||||
$subject = get_string('welcometocourse', '', $course->fullname);
|
||||
$subject = get_string('welcometocourse', '', format_string($course->fullname));
|
||||
|
||||
$a->coursename = $course->fullname;
|
||||
$a->profileurl = "$CFG->wwwroot/user/view.php?id=$USER->id&course=$course->id";
|
||||
|
||||
+1
-1
@@ -495,7 +495,7 @@ function question_delete_course($course, $feedback=true) {
|
||||
if (!isset($course->shortname)) {
|
||||
$course->shortname = 'id=' . $course->id;
|
||||
}
|
||||
$concat->name = get_string('savedfromdeletedcourse', 'quiz', $course->shortname);
|
||||
$concat->name = get_string('savedfromdeletedcourse', 'quiz', format_string($course->shortname));
|
||||
$concat->info = $concat->name;
|
||||
$concat->publish = 1;
|
||||
$concat->stamp = make_unique_id_code();
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
/**
|
||||
* Unit tests for (some of) ../weblib.php.
|
||||
*
|
||||
* @copyright © 2006 The Open University
|
||||
* @author T.J.Hunt@open.ac.uk
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU Public License
|
||||
* @package moodlecore
|
||||
*/
|
||||
|
||||
/** */
|
||||
require_once(dirname(__FILE__) . '/../../config.php');
|
||||
|
||||
global $CFG;
|
||||
require_once($CFG->libdir . '/simpletestlib.php');
|
||||
require_once($CFG->libdir . '/weblib.php');
|
||||
|
||||
class web_test extends UnitTestCase {
|
||||
|
||||
function setUp() {
|
||||
}
|
||||
|
||||
function tearDown() {
|
||||
}
|
||||
|
||||
function test_format_string() {
|
||||
$this->assertEqual(format_string("& &&&&& &&"), "& &&&&& &&");
|
||||
$this->assertEqual(format_string("ANother & &&&&& Category"), "ANother & &&&&& Category");
|
||||
$this->assertEqual(format_string("ANother & &&&&& Category", true), "ANother & &&&&& Category");
|
||||
$this->assertEqual(format_string("Nick's Test Site & Other things", true), "Nick's Test Site & Other things");
|
||||
}
|
||||
}
|
||||
?>
|
||||
+53
-15
@@ -1410,7 +1410,10 @@ function format_title($string, $plaintext=true, $courseid=null) {
|
||||
function format_string ($string, $striplinks = false, $courseid=NULL ) {
|
||||
|
||||
global $CFG, $COURSE;
|
||||
|
||||
|
||||
// First replace all ampersands not followed html entity code
|
||||
$string = preg_replace("/\&(?![a-z0-9]{1,8};)/", "&", $string);
|
||||
|
||||
//We'll use a in-memory cache here to speed up repeated strings
|
||||
static $strcache = false;
|
||||
|
||||
@@ -1436,7 +1439,8 @@ function format_string ($string, $striplinks = false, $courseid=NULL ) {
|
||||
|
||||
//Store to cache
|
||||
$strcache[$md5] = $string;
|
||||
|
||||
|
||||
|
||||
return $string;
|
||||
}
|
||||
|
||||
@@ -2032,7 +2036,9 @@ function print_header ($title='', $heading='', $navigation='', $focus='',
|
||||
$usexml=false, $bodytags='', $return=false) {
|
||||
|
||||
global $USER, $CFG, $THEME, $SESSION, $ME, $SITE, $COURSE;
|
||||
|
||||
|
||||
$heading = format_string($heading); // Fix for MDL-8582
|
||||
|
||||
/// This makes sure that the header is never repeated twice on a page
|
||||
if (defined('HEADER_PRINTED')) {
|
||||
debugging('print_header() was called more than once - this should not happen. Please check the code for this page closely. Note: error() and redirect() are now safe to call after print_header().');
|
||||
@@ -2222,7 +2228,8 @@ function print_header ($title='', $heading='', $navigation='', $focus='',
|
||||
$bodytags .= ' class="'.$pageclass.'" id="'.$pageid.'"';
|
||||
|
||||
ob_start();
|
||||
$title = s($title); // fix for MDL-8582
|
||||
|
||||
$title = format_string($title); // fix for MDL-8582
|
||||
include($CFG->header);
|
||||
$output = ob_get_contents();
|
||||
ob_end_clean();
|
||||
@@ -2317,10 +2324,10 @@ function print_header_simple($title='', $heading='', $navigation='', $focus='',
|
||||
|
||||
$shortname ='';
|
||||
if ($COURSE->id != SITEID) {
|
||||
$shortname = '<a href="'.$CFG->wwwroot.'/course/view.php?id='. $COURSE->id .'">'. s($COURSE->shortname) .'</a> ->';
|
||||
$shortname = '<a href="'.$CFG->wwwroot.'/course/view.php?id='. $COURSE->id .'">'. $COURSE->shortname .'</a> ->';
|
||||
}
|
||||
|
||||
$output = print_header(s($COURSE->shortname) .': '. s($title), s($COURSE->fullname) .' '. s($heading), $shortname.' '. $navigation, $focus, $meta,
|
||||
$output = print_header($COURSE->shortname .': '. $title, $COURSE->fullname .' '. $heading, $shortname.' '. $navigation, $focus, $meta,
|
||||
$cache, $button, $menu, $usexml, $bodytags, true);
|
||||
|
||||
if ($return) {
|
||||
@@ -2358,7 +2365,7 @@ function print_footer($course=NULL, $usercourse=NULL, $return=false) {
|
||||
$home = true;
|
||||
} else {
|
||||
$homelink = '<div class="homelink"><a '.$CFG->frametarget.' href="'.$CFG->wwwroot.
|
||||
'/course/view.php?id='.$course->id.'">'.s($course->shortname).'</a></div>';
|
||||
'/course/view.php?id='.$course->id.'">'.format_string($course->shortname).'</a></div>';
|
||||
$home = false;
|
||||
}
|
||||
} else {
|
||||
@@ -2813,16 +2820,47 @@ function print_navigation ($navigation, $separator=0, $return=false) {
|
||||
}
|
||||
|
||||
if ($navigation) {
|
||||
|
||||
if (!is_array($navigation)) {
|
||||
$ar = explode('->', $navigation);
|
||||
$navigation = array();
|
||||
|
||||
foreach ($ar as $a) {
|
||||
if (strpos($a, '</a>') === false) {
|
||||
$navigation[trim(format_string($a))] = '';
|
||||
} else {
|
||||
if (preg_match('/<a.*href="([^"]*)">(.*)<\/a>/', $a, $matches)) {
|
||||
$navigation[trim(format_string($matches[2]))] = $matches[1];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (! $site = get_site()) {
|
||||
$site = new object();
|
||||
$site->shortname = get_string('home');
|
||||
}
|
||||
|
||||
//Accessibility: breadcrumb links now in a list, » replaced with a 'silent' character.
|
||||
$nav_text = get_string('youarehere','access');
|
||||
$output .= '<h2 class="accesshide">'.$nav_text."</h2><ul>\n";
|
||||
if (! $site = get_site()) {
|
||||
$site->shortname = get_string('home');
|
||||
}
|
||||
|
||||
$navigation = "<li>$separator ". str_replace('->', "</li>\n<li>$separator", $navigation) ."</li>\n";
|
||||
$output .= '<li class="first"><a '.$CFG->frametarget.' onclick="this.target=\''.$CFG->framename.'\'" href="'. $CFG->wwwroot.((!has_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM, SITEID)) && !empty($USER->id) && !empty($CFG->mymoodleredirect) && !isguest())
|
||||
? '/my' : '') .'/">'. $site->shortname ."</a></li>\n". $navigation;
|
||||
|
||||
$output .= '<li class="first"><a '.$CFG->frametarget.' onclick="this.target=\''.$CFG->framename.'\'" href="'
|
||||
.$CFG->wwwroot.((!has_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM, SITEID))
|
||||
&& !empty($USER->id) && !empty($CFG->mymoodleredirect) && !isguest())
|
||||
? '/my' : '') .'/">'. format_string($site->shortname) ."</a></li>\n";
|
||||
|
||||
|
||||
foreach ($navigation as $title=>$url) {
|
||||
$title = strip_tags(format_string($title));
|
||||
if (empty($url)) {
|
||||
$output .= '<li class="first">'."$separator $title</li>\n";
|
||||
} else {
|
||||
$output .= '<li class="first">' . $separator . ' <a '.$CFG->frametarget.' onclick="this.target=\''.$CFG->framename.'\'" href="'
|
||||
.$url.'">'."$title</a></li>\n";
|
||||
}
|
||||
}
|
||||
|
||||
$output .= "</ul>\n";
|
||||
}
|
||||
|
||||
@@ -5730,4 +5768,4 @@ function frametarget() {
|
||||
}
|
||||
|
||||
// vim:autoindent:expandtab:shiftwidth=4:tabstop=4:tw=140:
|
||||
?>
|
||||
?>
|
||||
|
||||
+2
-2
@@ -51,10 +51,10 @@
|
||||
|
||||
/// Header on this page
|
||||
if ($tab == 'contacts') {
|
||||
print_header(get_string('messages', 'message').' - '.$SITE->fullname, '', '', '',
|
||||
print_header(get_string('messages', 'message').' - '.format_string($SITE->fullname), '', '', '',
|
||||
'<meta http-equiv="refresh" content="'. $CFG->message_contacts_refresh .'; url=index.php" />');
|
||||
} else {
|
||||
print_header(get_string('messages', 'message').' - '.$SITE->fullname);
|
||||
print_header(get_string('messages', 'message').' - '.format_string($SITE->fullname));
|
||||
}
|
||||
|
||||
echo '<table cellspacing="2" cellpadding="2" border="0" align="center" width="95%">';
|
||||
|
||||
@@ -1763,7 +1763,7 @@ function assignment_cron () {
|
||||
course_setup($course);
|
||||
|
||||
if (!has_capability('moodle/course:view', get_context_instance(CONTEXT_COURSE, $submission->course), $user->id)) {
|
||||
echo fullname($user)." not an active participant in $course->shortname\n";
|
||||
echo fullname($user)." not an active participant in " . format_string($course->shortname) . "\n";
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
<title>
|
||||
<?php echo "$strchat: $course->shortname: ".format_string($chat->name,true)."$groupname" ?>
|
||||
<?php echo "$strchat: " . format_string($course->shortname) . ": ".format_string($chat->name,true)."$groupname" ?>
|
||||
</title>
|
||||
</head>
|
||||
<frameset cols="*,200" border="5" framespacing="no" frameborder="yes" marginwidth="2" marginheight="1">
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
<title>
|
||||
<?php echo "$strchat: $course->shortname: ".format_string($chat->name,true)."$groupname" ?>
|
||||
<?php echo "$strchat: " . format_string($course->shortname) . ": ".format_string($chat->name,true)."$groupname" ?>
|
||||
</title>
|
||||
</head>
|
||||
<frameset cols="*,200" border="5" framespacing="no" frameborder="yes" marginwidth="2" marginheight="1">
|
||||
|
||||
+1
-1
@@ -122,7 +122,7 @@
|
||||
echo '<p align="center">'. get_string('noguestchoose', 'choice') .'</p>';
|
||||
echo '<div class="continuebutton">';
|
||||
print_single_button($CFG->wwwroot.'/course/enrol.php?id='.$course->id, NULL,
|
||||
get_string('enrolme', '', $course->shortname), 'post', $CFG->framename);
|
||||
get_string('enrolme', '', format_string($course->shortname)), 'post', $CFG->framename);
|
||||
echo '</div>'."\n";
|
||||
print_simple_box_end();
|
||||
|
||||
|
||||
+1
-1
@@ -96,7 +96,7 @@
|
||||
if (!empty($CFG->enablerssfeeds) && !empty($CFG->data_enablerssfeeds) && $data->rssarticles > 0) {
|
||||
$rsspath = rss_get_url($course->id, $USER->id, 'data', $data->id);
|
||||
$meta .= '<link rel="alternate" type="application/rss+xml" ';
|
||||
$meta .= 'title ="'.$course->shortname.': %fullname%" href="'.$rsspath.'" />';
|
||||
$meta .= 'title ="'. format_string($course->shortname) .': %fullname%" href="'.$rsspath.'" />';
|
||||
}
|
||||
if ($data->csstemplate) {
|
||||
$meta .= '<link rel="stylesheet" type="text/css" href="'.$CFG->wwwroot.'/mod/data/css.php?d='.$data->id.'" /> ';
|
||||
|
||||
+1
-1
@@ -222,7 +222,7 @@
|
||||
if (!empty($CFG->enablerssfeeds) && !empty($CFG->data_enablerssfeeds) && $data->rssarticles > 0) {
|
||||
$rsspath = rss_get_url($course->id, $USER->id, 'data', $data->id);
|
||||
$meta .= '<link rel="alternate" type="application/rss+xml" ';
|
||||
$meta .= 'title ="'.$course->shortname.': %fullname%" href="'.$rsspath.'" />';
|
||||
$meta .= 'title ="'. format_string($course->shortname) .': %fullname%" href="'.$rsspath.'" />';
|
||||
}
|
||||
if ($data->csstemplate) {
|
||||
$meta .= '<link rel="stylesheet" type="text/css" href="'.$CFG->wwwroot.'/mod/data/css.php?d='.$data->id.'" /> ';
|
||||
|
||||
@@ -152,11 +152,11 @@
|
||||
$searchform = forum_search_form($course);
|
||||
|
||||
if ($course->id != SITEID) {
|
||||
print_header("$course->shortname: ".format_string($discussion->name), "$course->fullname",
|
||||
print_header("$course->shortname: ".format_string($discussion->name), $course->fullname,
|
||||
"<a href=\"../../course/view.php?id=$course->id\">$course->shortname</a> ->
|
||||
$navmiddle $navtail", "", "", true, $searchform, navmenu($course, $cm));
|
||||
} else {
|
||||
print_header("$course->shortname: ".format_string($discussion->name), "$course->fullname",
|
||||
print_header("$course->shortname: ".format_string($discussion->name), $course->fullname,
|
||||
"$navmiddle $navtail", "", "", true, $searchform, navmenu($course, $cm));
|
||||
}
|
||||
|
||||
|
||||
+4
-4
@@ -149,10 +149,10 @@
|
||||
$returnto = forum_go_back_to("index.php?id=$course->id");
|
||||
if ($subscribe) {
|
||||
add_to_log($course->id, "forum", "subscribeall", "index.php?id=$course->id", $course->id);
|
||||
redirect($returnto, get_string("nowallsubscribed", "forum", $course->shortname), 1);
|
||||
redirect($returnto, get_string("nowallsubscribed", "forum", format_string($course->shortname)), 1);
|
||||
} else {
|
||||
add_to_log($course->id, "forum", "unsubscribeall", "index.php?id=$course->id", $course->id);
|
||||
redirect($returnto, get_string("nowallunsubscribed", "forum", $course->shortname), 1);
|
||||
redirect($returnto, get_string("nowallunsubscribed", "forum", format_string($course->shortname)), 1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -453,11 +453,11 @@
|
||||
/// Output the page
|
||||
|
||||
if ($course->id != SITEID) {
|
||||
print_header("$course->shortname: $strforums", "$course->fullname",
|
||||
print_header("$course->shortname: $strforums", $course->fullname,
|
||||
"<a href=\"../../course/view.php?id=$course->id\">$course->shortname</a> -> $strforums",
|
||||
"", "", true, $searchform, navmenu($course));
|
||||
} else {
|
||||
print_header("$course->shortname: $strforums", "$course->fullname", "$strforums",
|
||||
print_header("$course->shortname: $strforums", $course->fullname, "$strforums",
|
||||
"", "", true, $searchform, navmenu($course));
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -1726,7 +1726,7 @@ function forum_get_course_forum($courseid, $type) {
|
||||
$mod->instance = $forum->id;
|
||||
$mod->section = 0;
|
||||
if (! $mod->coursemodule = add_course_module($mod) ) { // assumes course/lib.php is loaded
|
||||
notify("Could not add a new course module to the course '$course->fullname'");
|
||||
notify("Could not add a new course module to the course '" . format_string($course->fullname) . "'");
|
||||
return false;
|
||||
}
|
||||
if (! $sectionid = add_mod_to_section($mod) ) { // assumes course/lib.php is loaded
|
||||
|
||||
+2
-2
@@ -654,13 +654,13 @@
|
||||
}
|
||||
if ($course->id != SITEID) {
|
||||
print_header("$course->shortname: $strdiscussionname ".
|
||||
format_string($toppost->subject), "$course->fullname",
|
||||
format_string($toppost->subject), $course->fullname,
|
||||
"<a href=\"../../course/view.php?id=$course->id\">$course->shortname</a> ->
|
||||
$navmiddle $navtail", $mform_post->focus(), "", true, "", navmenu($course, $cm));
|
||||
|
||||
} else {
|
||||
print_header("$course->shortname: $strdiscussionname ".
|
||||
format_string($toppost->subject), "$course->fullname",
|
||||
format_string($toppost->subject), $course->fullname,
|
||||
"$navmiddle $navtail", $mform_post->focus(), "", true, "", navmenu($course, $cm));
|
||||
|
||||
}
|
||||
|
||||
+2
-2
@@ -37,13 +37,13 @@
|
||||
$fullname = fullname($user, has_capability('moodle/site:viewfullnames', $syscontext));
|
||||
|
||||
if ($course->id != SITEID) {
|
||||
print_header("$course->shortname: $fullname: $strmode", "$course->fullname",
|
||||
print_header("$course->shortname: $fullname: $strmode", $course->fullname,
|
||||
"<a href=\"$CFG->wwwroot/course/view.php?id=$course->id\">$course->shortname</a> ->
|
||||
<a href=\"$CFG->wwwroot/user/index.php?id=$course->id\">$strparticipants</a> ->
|
||||
<a href=\"$CFG->wwwroot/user/view.php?id=$user->id&course=$course->id\">$fullname</a> ->
|
||||
$strforumposts -> $strmode");
|
||||
} else {
|
||||
print_header("$course->shortname: $fullname: $strmode", "$course->fullname",
|
||||
print_header("$course->shortname: $fullname: $strmode", $course->fullname,
|
||||
"<a href=\"$CFG->wwwroot/user/view.php?id=$user->id&course=$course->id\">$fullname</a> ->
|
||||
$strforumposts -> $strmode");
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
require_login($course->id);
|
||||
}
|
||||
|
||||
print_header("$course->shortname: ".format_string($glossary->name), "$course->fullname",
|
||||
print_header("$course->shortname: ".format_string($glossary->name), $course->fullname,
|
||||
"$navigation <a href=\"index.php?id=$course->id\">$strglossaries</a> -> ".format_string($glossary->name),
|
||||
"", "", true, update_module_button($cm->id, $course->id, $strglossary),
|
||||
navmenu($course, $cm));
|
||||
|
||||
@@ -145,8 +145,8 @@
|
||||
|
||||
$site = get_record("course","id",1);
|
||||
echo '<p align="right"><font size="-1">' . userdate(time()) . '</font></p>';
|
||||
echo get_string("site") . ': <strong>' . $site->fullname . '</strong><br />';
|
||||
echo get_string("course") . ': <strong>' . $course->fullname . ' ('. $course->shortname . ')</strong><br />';
|
||||
echo get_string("site") . ': <strong>' . format_string($site->fullname) . '</strong><br />';
|
||||
echo get_string("course") . ': <strong>' . format_string($course->fullname) . ' ('. format_string($course->shortname) . ')</strong><br />';
|
||||
echo get_string("modulename","glossary") . ': <strong>' . format_string($glossary->name, true) . '</strong>';
|
||||
if ( $allentries ) {
|
||||
foreach ($allentries as $entry) {
|
||||
|
||||
@@ -49,10 +49,10 @@
|
||||
|
||||
$CFG->framename = "newwindow";
|
||||
if ($course->id != SITEID) {
|
||||
print_header(strip_tags("$course->shortname: $strglossaries $strsearch"), "$course->fullname",
|
||||
print_header(strip_tags("$course->shortname: $strglossaries $strsearch"), $course->fullname,
|
||||
"<a target=\"newwindow\" href=\"$CFG->wwwroot/course/view.php?id=$course->id\">$course->shortname</a> -> $strglossaries -> $strsearch", "", "", true, " ", " ");
|
||||
} else {
|
||||
print_header(strip_tags("$course->shortname: $strglossaries $strsearch"), "$course->fullname",
|
||||
print_header(strip_tags("$course->shortname: $strglossaries $strsearch"), $course->fullname,
|
||||
"$strglossaries -> $strsearch", "", "", true, " ", " ");
|
||||
}
|
||||
|
||||
|
||||
@@ -34,9 +34,9 @@
|
||||
|
||||
// Print the header
|
||||
|
||||
$title = "$course->shortname: $strmodulenameplural";
|
||||
$heading = "$course->fullname";
|
||||
$navigation = "$strmodulenameplural";
|
||||
$title = format_string($course->shortname) . ": $strmodulenameplural";
|
||||
$heading = $course->fullname;
|
||||
$navigation = $strmodulenameplural;
|
||||
if ($course->id != SITEID) {
|
||||
$navigation = "<a href=\"../../course/view.php?id=$course->id\">$course->shortname</a> -> $navigation";
|
||||
}
|
||||
|
||||
@@ -398,8 +398,8 @@ function hotpot_print_report_heading(&$course, &$cm, &$hotpot, &$mode) {
|
||||
$strmodulenameplural = get_string("modulenameplural", "hotpot");
|
||||
$strmodulename = get_string("modulename", "hotpot");
|
||||
|
||||
$title = "$course->shortname: $hotpot->name";
|
||||
$heading = "$course->fullname";
|
||||
$title = format_string($course->shortname) . ": $hotpot->name";
|
||||
$heading = $course->fullname;
|
||||
|
||||
$navigation = "<a href=index.php?id=$course->id>$strmodulenameplural</a> -> ";
|
||||
$navigation .= "<a href=\"view.php?id=$cm->id\">$hotpot->name</a> -> ";
|
||||
|
||||
@@ -50,8 +50,8 @@
|
||||
$strmodulenameplural = get_string("modulenameplural", "hotpot");
|
||||
$strmodulename = get_string("modulename", "hotpot");
|
||||
// print header
|
||||
$title = "$course->shortname: $hotpot->name";
|
||||
$heading = "$course->fullname";
|
||||
$title = format_string($course->shortname) . ": $hotpot->name";
|
||||
$heading = $course->fullname;
|
||||
$navigation = "<a href=\"index.php?id=$course->id\">$strmodulenameplural</a> -> ".get_string("review", "quiz");
|
||||
if ($course->id != SITEID) {
|
||||
$navigation = "<a href=\"../../course/view.php?id=$course->id\">$course->shortname</a> -> $navigation";
|
||||
|
||||
+2
-2
@@ -40,8 +40,8 @@
|
||||
// set nextpage (for error messages)
|
||||
$nextpage = "$CFG->wwwroot/course/view.php?id=$course->id";
|
||||
// header strings
|
||||
$title = strip_tags($course->shortname.': '.$hotpot->name);
|
||||
$heading = "$course->fullname";
|
||||
$title = format_string($course->shortname.': '.$hotpot->name, true);
|
||||
$heading = $course->fullname;
|
||||
$navigation = '<a '.$CFG->frametarget.' href="'.$CFG->wwwroot.'/mod/hotpot/index.php?id='.$course->id.'">'.get_string("modulenameplural", "hotpot")."</a> -> $hotpot->name";
|
||||
if ($course->id != SITEID) {
|
||||
$navigation = '<a '.$CFG->frametarget.' href="'.$CFG->wwwroot.'/course/view.php?id='.$course->id.'">'.$course->shortname.'</a> -> '.$navigation;
|
||||
|
||||
+1
-1
@@ -28,7 +28,7 @@
|
||||
$navigation = "<a href=\"../../course/view.php?id=$course->id\">$course->shortname</a> ->";
|
||||
}
|
||||
|
||||
print_header("$course->shortname: $strlamss", "$course->fullname", "$navigation $strlamss", "", "", true, "", navmenu($course));
|
||||
print_header("$course->shortname: $strlamss", $course->fullname, "$navigation $strlamss", "", "", true, "", navmenu($course));
|
||||
|
||||
/// Get all the appropriate data
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
$navigation = '';
|
||||
}
|
||||
|
||||
print_header("$course->shortname: $strlessons", "$course->fullname", "$navigation $strlessons", "", "", true, "", navmenu($course));
|
||||
print_header("$course->shortname: $strlessons", $course->fullname, "$navigation $strlessons", "", "", true, "", navmenu($course));
|
||||
|
||||
/// Get all the appropriate data
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
$strsummary = get_string("summary");
|
||||
$strlastmodified = get_string("lastmodified");
|
||||
|
||||
print_header("$course->shortname: $strresources", "$course->fullname", "$navigation $strresources",
|
||||
print_header("$course->shortname: $strresources", $course->fullname, "$navigation $strresources",
|
||||
"", "", true, "", navmenu($course));
|
||||
|
||||
if (! $resources = get_all_instances_in_course("resource", $course)) {
|
||||
|
||||
@@ -354,7 +354,7 @@ function display() {
|
||||
echo "<html dir=\"ltr\">\n";
|
||||
echo '<head>';
|
||||
echo '<meta http-equiv="content-type" content="text/html; charset=utf-8" />';
|
||||
echo "<title>{$course->shortname}: ".strip_tags(format_string($resource->name,true))."</title></head>\n";
|
||||
echo "<title>" . format_string($course->shortname) . ": ".strip_tags(format_string($resource->name,true))."</title></head>\n";
|
||||
echo "<frameset rows=\"$CFG->resource_framesize,*\">";
|
||||
echo "<frame src=\"view.php?id={$cm->id}&type={$resource->type}&frameset=top\" title=\"".get_string('modulename','resource')."\"/>";
|
||||
if (!empty($localpath)) { // Show it like this so we interpose some HTML
|
||||
|
||||
@@ -347,7 +347,7 @@ function display() {
|
||||
echo "<html dir=\"ltr\">\n";
|
||||
echo '<head>';
|
||||
echo '<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />';
|
||||
echo "<title>{$course->shortname}: ".strip_tags(format_string($resource->name,true))."</title></head>\n";
|
||||
echo "<title>" . format_string($course->shortname) . ": ".strip_tags(format_string($resource->name,true))."</title></head>\n";
|
||||
echo "<frameset rows=\"$CFG->resource_framesize,*\">";
|
||||
echo "<frame src=\"view.php?id={$cm->id}&type={$resource->type}&frameset=top\" title=\"".get_string('modulename','resource')."\"/>";
|
||||
if (!empty($localpath)) { // Show it like this so we interpose some HTML
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
$pagetitle = strip_tags("$course->shortname: ".format_string($scorm->name));
|
||||
|
||||
if (!$cm->visible and !has_capability('moodle/course:viewhiddenactivities', get_context_instance(CONTEXT_COURSE,$course->id))) {
|
||||
print_header($pagetitle, "$course->fullname",
|
||||
print_header($pagetitle, $course->fullname,
|
||||
"$navigation <a $CFG->frametarget href=\"view.php?id=$cm->id\">".format_string($scorm->name,true)."</a>",
|
||||
'', '', true, update_module_button($cm->id, $course->id, $strscorm), '', false);
|
||||
notice(get_string("activityiscurrentlyhidden"));
|
||||
@@ -125,7 +125,7 @@
|
||||
$bodyscript = 'onunload="main.close();"';
|
||||
}
|
||||
$exitlink = '(<a href="'.$CFG->wwwroot.'/course/view.php?id='.$cm->course.'">'.get_string('exit','scorm').'</a>) ';
|
||||
print_header($pagetitle, "$course->fullname",
|
||||
print_header($pagetitle, $course->fullname,
|
||||
"$navigation <a $CFG->frametarget href=\"view.php?id=$cm->id\">".format_string($scorm->name,true)."</a>",
|
||||
'', '', true, $exitlink.update_module_button($cm->id, $course->id, $strscorm), '', false, $bodyscript);
|
||||
if ($sco->scormtype == 'sco') {
|
||||
|
||||
@@ -70,19 +70,19 @@
|
||||
$strname = get_string('name');
|
||||
if (empty($b)) {
|
||||
if (empty($a)) {
|
||||
print_header("$course->shortname: ".format_string($scorm->name), "$course->fullname",
|
||||
print_header("$course->shortname: ".format_string($scorm->name), $course->fullname,
|
||||
"$navigation <a href=\"index.php?id=$course->id\">$strscorms</a>
|
||||
-> <a href=\"view.php?id=$cm->id\">".format_string($scorm->name,true)."</a> -> $strreport",
|
||||
'', '', true);
|
||||
} else {
|
||||
print_header("$course->shortname: ".format_string($scorm->name), "$course->fullname",
|
||||
print_header("$course->shortname: ".format_string($scorm->name), $course->fullname,
|
||||
"$navigation <a href=\"index.php?id=$course->id\">$strscorms</a>
|
||||
-> <a href=\"view.php?id=$cm->id\">".format_string($scorm->name,true)."</a>
|
||||
-> <a href=\"report.php?id=$cm->id\">$strreport</a> -> $strattempt $attempt - ".fullname($userdata),
|
||||
'', '', true);
|
||||
}
|
||||
} else {
|
||||
print_header("$course->shortname: ".format_string($scorm->name), "$course->fullname",
|
||||
print_header("$course->shortname: ".format_string($scorm->name), $course->fullname,
|
||||
"$navigation <a href=\"index.php?id=$course->id\">$strscorms</a>
|
||||
-> <a href=\"view.php?id=$cm->id\">".format_string($scorm->name,true)."</a>
|
||||
-> <a href=\"report.php?id=$cm->id\">$strreport</a>
|
||||
|
||||
+1
-1
@@ -66,7 +66,7 @@
|
||||
//
|
||||
// Print the page header
|
||||
//
|
||||
print_header($pagetitle, "$course->fullname",
|
||||
print_header($pagetitle, $course->fullname,
|
||||
"$navigation <a $CFG->frametarget href=\"view.php?id=$cm->id\">".format_string($scorm->name,true)."</a>",
|
||||
'', '', true, update_module_button($cm->id, $course->id, $strscorm), navmenu($course, $cm));
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
<a href=\"view.php?id=$cm->id\">".format_string($survey->name,true)."</a> -> ";
|
||||
}
|
||||
|
||||
print_header("$course->shortname: ".format_string($survey->name), "$course->fullname", "$navigation $strreport",
|
||||
print_header("$course->shortname: ".format_string($survey->name), $course->fullname, "$navigation $strreport",
|
||||
"", "", true,
|
||||
update_module_button($cm->id, $course->id, $strsurvey), navmenu($course, $cm));
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Frameset//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd\">\n";
|
||||
echo "<html $direction>\n";
|
||||
echo "<head><meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\" />\n";
|
||||
echo "<title>{$course->shortname}: ".format_string($workshop->name,true)."</title></head>\n";
|
||||
echo "<title>" . format_string($course->shortname) . ": ".format_string($workshop->name,true)."</title></head>\n";
|
||||
echo "<frameset rows=\"50%,*\" border=\"10\">";
|
||||
echo " <frame src=\"assess.php?id=$id&sid=$sid&frameset=top&redirect=$redirect\" border=\"10\" />";
|
||||
echo " <frame src=\"assess.php?id=$id&sid=$sid&frameset=bottom&redirect=$redirect\" />";
|
||||
|
||||
@@ -427,7 +427,7 @@ class question_category_object {
|
||||
|
||||
$edittable->align['category'] = "left";
|
||||
$edittable->wrap['category'] = "nowrap";
|
||||
$row['category'] = '<input type="text" name="updatename" value="' . $category->name . '" size="15" />';
|
||||
$row['category'] = '<input type="text" name="updatename" value="' . format_string($category->name) . '" size="15" />';
|
||||
|
||||
$edittable->align['info'] = "left";
|
||||
$edittable->wrap['info'] = "nowrap";
|
||||
@@ -583,7 +583,7 @@ class question_category_object {
|
||||
error("No such category $destcategoryid!", "category.php?id={$this->course->id}");
|
||||
}
|
||||
if (! set_field('question', 'category', $destcategoryid, 'category', $deletecat)) {
|
||||
error("Error while moving questions from category '$category->name' to '$category2->name'", "category.php?id={$this->course->id}");
|
||||
error("Error while moving questions from category '" . format_string($category->name) . "' to '$category2->name'", "category.php?id={$this->course->id}");
|
||||
}
|
||||
|
||||
} else {
|
||||
@@ -622,7 +622,7 @@ class question_category_object {
|
||||
|
||||
/// Finally delete the category itself
|
||||
if (delete_records("question_categories", "id", $category->id)) {
|
||||
notify(get_string("categorydeleted", "quiz", $category->name), 'notifysuccess');
|
||||
notify(get_string("categorydeleted", "quiz", format_string($category->name)), 'notifysuccess');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -104,7 +104,7 @@
|
||||
-> <a href=\"view.php?id=$user->id&course=$course->id\">$userfullname</a>
|
||||
-> $streditmyprofile", "");
|
||||
} else {
|
||||
print_header("$course->shortname: $streditmyprofile", "$course->fullname",
|
||||
print_header("$course->shortname: $streditmyprofile", $course->fullname,
|
||||
"<a href=\"view.php?id=$user->id&course=$course->id\">$userfullname</a>
|
||||
-> $streditmyprofile", "");
|
||||
}
|
||||
|
||||
@@ -174,7 +174,7 @@
|
||||
-> <a href=\"view.php?id=$user->id&course=$course->id\">$userfullname</a>
|
||||
-> $streditmyprofile", "");
|
||||
} else {
|
||||
print_header("$course->shortname: $streditmyprofile", "$course->fullname",
|
||||
print_header("$course->shortname: $streditmyprofile", $course->fullname,
|
||||
"<a href=\"view.php?id=$user->id&course=$course->id\">$userfullname</a>
|
||||
-> $streditmyprofile", "");
|
||||
}
|
||||
|
||||
@@ -414,7 +414,7 @@ function profile_edit_category($id, $redirect, $adminroot) {
|
||||
if (empty($id)) {
|
||||
$strheading = get_string('profilecreatenewcategory', 'admin');
|
||||
} else {
|
||||
$strheading = get_string('profileeditcategory', 'admin', $category->name);
|
||||
$strheading = get_string('profileeditcategory', 'admin', format_string($category->name));
|
||||
}
|
||||
|
||||
/// Print the page
|
||||
|
||||
@@ -123,7 +123,7 @@ foreach ($categories as $category) {
|
||||
}
|
||||
}
|
||||
|
||||
print_heading($category->name.' '.profile_category_icons($category));
|
||||
print_heading(format_string($category->name) .' '.profile_category_icons($category));
|
||||
if (count($table->data)) {
|
||||
print_table($table);
|
||||
} else {
|
||||
|
||||
+2
-2
@@ -31,7 +31,7 @@
|
||||
if ($filtertype == 'site') {
|
||||
|
||||
$site = get_site();
|
||||
print_heading($site->fullname);
|
||||
print_heading(format_string($site->fullname));
|
||||
|
||||
if ($CFG->bloglevel >= 4) {
|
||||
if (has_capability('moodle/course:viewparticipants', get_context_instance(CONTEXT_SYSTEM, SITEID))) {
|
||||
@@ -49,7 +49,7 @@
|
||||
} else if ($filtertype == 'course' && $filterselect) {
|
||||
|
||||
$course = get_record('course','id',$filterselect);
|
||||
print_heading($course->fullname);
|
||||
print_heading(format_string($course->fullname));
|
||||
|
||||
if ($CFG->bloglevel >= 3) {
|
||||
|
||||
|
||||
+4
-3
@@ -126,7 +126,7 @@
|
||||
<a href=\"index.php?id=$course->id\">$strparticipants</a> -> $fullname",
|
||||
"", "", true, " ", navmenu($course));
|
||||
} else {
|
||||
print_header("$course->fullname: $strpersonalprofile: $fullname", "$course->fullname",
|
||||
print_header("$course->fullname: $strpersonalprofile: $fullname", $course->fullname,
|
||||
"$fullname", "", "", true, " ", navmenu($course));
|
||||
}
|
||||
|
||||
@@ -296,10 +296,11 @@
|
||||
foreach ($mycourses as $mycourse) {
|
||||
if ($mycourse->visible and $mycourse->category) {
|
||||
if ($mycourse->id != $course->id){
|
||||
$courselisting .= "<a href=\"$CFG->wwwroot/user/view.php?id=$user->id&course=$mycourse->id\">$mycourse->fullname</a>, ";
|
||||
$courselisting .= "<a href=\"$CFG->wwwroot/user/view.php?id=$user->id&course=$mycourse->id\">"
|
||||
. format_string($mycourse->fullname) . "</a>, ";
|
||||
}
|
||||
else {
|
||||
$courselisting .= "$mycourse->fullname, ";
|
||||
$courselisting .= format_string($mycourse->fullname) . ", ";
|
||||
}
|
||||
}
|
||||
$shown++;
|
||||
|
||||
Reference in New Issue
Block a user