MDL-8520 resource navigation borked by accessibility frame changes; backported from HEAD
This commit is contained in:
+1
-1
@@ -2738,7 +2738,7 @@ function print_navigation ($navigation, $separator=0, $return=false) {
|
||||
$site->shortname = get_string('home');
|
||||
}
|
||||
$navigation = "<li>$separator ". str_replace('->', "</li>\n<li>$separator", $navigation) ."</li>\n";
|
||||
$output .= '<li class="first"><a '.$CFG->frametarget.' href="'. $CFG->wwwroot.((!has_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM, SITEID)) && !empty($USER->id) && !empty($CFG->mymoodleredirect) && !isguest())
|
||||
$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 .= "</ul>\n";
|
||||
}
|
||||
|
||||
@@ -109,10 +109,10 @@ function resource_base($cmid=0) {
|
||||
$this->strresources = get_string("modulenameplural", "resource");
|
||||
|
||||
if ($this->course->id != SITEID) {
|
||||
$this->navigation = "<a $CFG->frametarget href=\"$CFG->wwwroot/course/view.php?id={$this->course->id}\">{$this->course->shortname}</a> -> ".
|
||||
"<a $CFG->frametarget href=\"index.php?id={$this->course->id}\">$this->strresources</a> ->";
|
||||
$this->navigation = "<a $CFG->frametarget onclick=\"this.target='$CFG->framename'\" href=\"$CFG->wwwroot/course/view.php?id={$this->course->id}\">{$this->course->shortname}</a> -> ".
|
||||
"<a $CFG->frametarget onclick=\"this.target='$CFG->framename'\" href=\"index.php?id={$this->course->id}\">$this->strresources</a> ->";
|
||||
} else {
|
||||
$this->navigation = "<a $CFG->frametarget href=\"index.php?id={$this->course->id}\">$this->strresources</a> ->";
|
||||
$this->navigation = "<a $CFG->frametarget onclick=\"this.target='$CFG->framename'\" href=\"index.php?id={$this->course->id}\">$this->strresources</a> ->";
|
||||
}
|
||||
|
||||
if (!$this->cm->visible and !has_capability('moodle/course:viewhiddenactivities', get_context_instance(CONTEXT_MODULE, $this->cm->id))) {
|
||||
|
||||
Reference in New Issue
Block a user