merged nick's fix for MDL-8582, ampersand in course name/shortname causes xtheml strict problems

This commit is contained in:
toyomoyo
2007-02-23 06:03:09 +00:00
parent 99571c3e85
commit e2cd3ed012
5 changed files with 37 additions and 25 deletions
+2 -2
View File
@@ -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', '', $course->shortname).'</a>';
$this->content->items[]='<a href="enrol.php?id='.$this->instance->pageid.'">'.get_string('enrolme', '', s($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', '', $course->shortname).'</a>';
$this->content->items[]='<a href="unenrol.php?id='.$this->instance->pageid.'">'.get_string('unenrolme', '', s($course->shortname)).'</a>';
$this->content->icons[]='<img src="'.$CFG->pixpath.'/i/user.gif" class="icon" alt="" />';
}
}