From: skodak Date: Wed, 14 Feb 2007 22:05:23 +0000 (+0000) Subject: MDL-8520 resource navigation borked by accessibility frame changes X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=69995c4a1e0294d4ce28de091fdc585c96a77f8c;p=moodle.git MDL-8520 resource navigation borked by accessibility frame changes --- diff --git a/lib/weblib.php b/lib/weblib.php index 6f28d620a2..d49405d0b0 100644 --- a/lib/weblib.php +++ b/lib/weblib.php @@ -2738,7 +2738,7 @@ function print_navigation ($navigation, $separator=0, $return=false) { $site->shortname = get_string('home'); } $navigation = "
  • $separator ". str_replace('->', "
  • \n
  • $separator", $navigation) ."
  • \n"; - $output .= '
  • frametarget.' href="'. $CFG->wwwroot.((!has_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM, SITEID)) && !empty($USER->id) && !empty($CFG->mymoodleredirect) && !isguest()) + $output .= '
  • 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 ."
  • \n". $navigation; $output .= "\n"; } diff --git a/mod/resource/lib.php b/mod/resource/lib.php index 2ef5358fe4..bb9c25f542 100644 --- a/mod/resource/lib.php +++ b/mod/resource/lib.php @@ -109,10 +109,10 @@ function resource_base($cmid=0) { $this->strresources = get_string("modulenameplural", "resource"); if ($this->course->id != SITEID) { - $this->navigation = "frametarget href=\"$CFG->wwwroot/course/view.php?id={$this->course->id}\">{$this->course->shortname} -> ". - "frametarget href=\"index.php?id={$this->course->id}\">$this->strresources ->"; + $this->navigation = "frametarget onclick=\"this.target='$CFG->framename'\" href=\"$CFG->wwwroot/course/view.php?id={$this->course->id}\">{$this->course->shortname} -> ". + "frametarget onclick=\"this.target='$CFG->framename'\" href=\"index.php?id={$this->course->id}\">$this->strresources ->"; } else { - $this->navigation = "frametarget href=\"index.php?id={$this->course->id}\">$this->strresources ->"; + $this->navigation = "frametarget onclick=\"this.target='$CFG->framename'\" href=\"index.php?id={$this->course->id}\">$this->strresources ->"; } if (!$this->cm->visible and !has_capability('moodle/course:viewhiddenactivities', get_context_instance(CONTEXT_MODULE, $this->cm->id))) {