]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-8050 1.2 Remove all target="_top" - refactoring of previous commit
authorskodak <skodak>
Thu, 4 Jan 2007 18:23:55 +0000 (18:23 +0000)
committerskodak <skodak>
Thu, 4 Jan 2007 18:23:55 +0000 (18:23 +0000)
33 files changed:
admin/auth.php
admin/auth_config.php
admin/dbperformance.php
admin/enrol.php
admin/enrol_config.php
admin/lang.php
admin/pagelib.php
blog/blogpage.php
calendar/lib.php
filter/activitynames/filter.php
lib/weblib.php
mod/assignment/lib.php
mod/chat/pagelib.php
mod/data/filter.php
mod/data/pagelib.php
mod/forum/lib.php
mod/hotpot/index.php
mod/hotpot/lib.php
mod/hotpot/view.php
mod/lesson/locallib.php
mod/quiz/pagelib.php
mod/resource/filter.php
mod/resource/lib.php
mod/resource/type/file/resource.class.php
mod/resource/type/ims/deploy.php
mod/resource/type/repository/resource.class.php
mod/scorm/locallib.php
mod/scorm/player.php
mod/scorm/view.php
mod/workshop/assess.php
mod/workshop/submissions.php
mod/workshop/view.php
theme/chameleon/footer.html

index 4c34e95c81f9d18f0855049b9ad50a0b1bcf7ad3..0b2d3f73231d189bdc624d4a2eca6cd1f317dca7 100644 (file)
@@ -216,12 +216,7 @@ foreach ($displayauths as $auth => $name) {
 admin_externalpage_print_header($adminroot);
 print_simple_box(get_string('configauthenticationplugins', 'admin'), 'center', '700');
 
-if (empty($CFG->framename) or $CFG->framename=='_top') { 
-    $target = '';
-} else {
-    $target = ' target="'.$CFG->framename.'"';
-}
-echo "<form$target name=\"authmenu\" method=\"post\" action=\"auth.php\">";
+echo "<form $CFG->frametarget name=\"authmenu\" method=\"post\" action=\"auth.php\">";
 echo "<input type=\"hidden\" name=\"sesskey\" value=\"".$USER->sesskey."\">";
 print_table($table);
 
index f7ce6833925b54a29dfb78ad9a9146f4d4fce85f..47e2516e222c0da9ee398f8f4ad993dcdb577bec 100644 (file)
@@ -61,13 +61,8 @@ asort($options);
 // output configuration form
 admin_externalpage_print_header($adminroot);
 
-if (empty($CFG->framename) or $CFG->framename=='_top') { 
-    $target = '';
-} else {
-    $target = ' target="'.$CFG->framename.'"';
-}
 // choose an authentication method
-echo "<form$target name=\"authmenu\" method=\"post\" action=\"auth_config.php\">\n";
+echo "<form $CFG->frametarget name=\"authmenu\" method=\"post\" action=\"auth_config.php\">\n";
 echo "<input type=\"hidden\" name=\"sesskey\" value=\"".$USER->sesskey."\">\n";
 echo "<div align=\"center\"><p><b>\n";
 echo get_string('chooseauthmethod').': ';
index 5d6e62d51407acdddf8dccccf66b2678a654c4a3..77316aca5d52cabff5455339d50a3518c0f5b091 100644 (file)
     $site = get_site();
 
     if (!empty($topframe)) {
-        if (empty($CFG->framename) or $CFG->framename=='_top') { 
-            $target = '';
-        } else {
-            $target = ' target="'.$CFG->framename.'"';
-        }
-
         print_header("$site->shortname: $strdatabaseperformance", "$site->fullname", 
-                     "<a$target href=\"index.php\">$stradministration</a> -> Database performance");
+                     "<a $CFG->frametarget href=\"index.php\">$stradministration</a> -> Database performance");
         exit;
     }
 
index 973b18440d3d3968dd6d74079f961f69a4d6ac7d..6d07cdd9398b8264e9c19c0b85dd00325ee109b4 100644 (file)
 
     print_simple_box(get_string('configenrolmentplugins', 'admin'), 'center', '700');
 
-    if (empty($CFG->framename) or $CFG->framename=='_top') { 
-        $target = '';
-    } else {
-        $target = ' target="'.$CFG->framename.'"';
-    }
-
-    echo "<form$target name=\"enrolmenu\" method=\"post\" action=\"enrol.php\">";
+    echo "<form $CFG->frametarget name=\"enrolmenu\" method=\"post\" action=\"enrol.php\">";
     echo "<input type=\"hidden\" name=\"sesskey\" value=\"".$USER->sesskey."\" />";
 
     $table = new stdClass();
index 0ae37e81ae768f00ca15999008a4ef494c3c9664..925546cab857050e7eeb419bcc625d41aa7541e9 100644 (file)
 
     admin_externalpage_print_header($adminroot);
 
-    if (empty($CFG->framename) or $CFG->framename=='_top') { 
-        $target = '';
-    } else {
-        $target = ' target="'.$CFG->framename.'"';
-    }
-
-    echo "<form$target name=\"enrolmenu\" method=\"post\" action=\"enrol_config.php\">";
+    echo "<form $CFG->frametarget name=\"enrolmenu\" method=\"post\" action=\"enrol_config.php\">";
     echo "<input type=\"hidden\" name=\"sesskey\" value=\"".$USER->sesskey."\">";
     echo "<div align=\"center\"><p><b>";
 
index ea3fafe5a409f5eacba5846a86194b766d581936..83a4e06fd394b4e620bcad339936652a61a2044b 100644 (file)
 
     $currentlang = current_language();
 
-    if (empty($CFG->framename) or $CFG->framename=='_top') { 
-        $target = '';
-    } else {
-        $target = ' target="'.$CFG->framename.'"';
-    }
-
     switch ($mode) {
         case "missing":
             // Missing array keys are not bugs here but missing strings
             error_reporting(E_ALL ^ E_NOTICE);
             $navigation = "<a href=\"lang.php\">$strlanguage</a> -> $strmissingstrings";
             $title = $strmissingstrings;
-            $button = '<form'.$target.' method="get" action="'.$CFG->wwwroot.'/'.$CFG->admin.'/lang.php">'.
+            $button = '<form '.$CFG->frametarget.' method="get" action="'.$CFG->wwwroot.'/'.$CFG->admin.'/lang.php">'.
                       '<input type="hidden" name="mode" value="compare" />'.
                       '<input type="submit" value="'.$streditstrings.'" /></form>';
             break;
         case "compare":
             $navigation = "<a href=\"lang.php\">$strlanguage</a> -> $streditstrings";
             $title = $streditstrings;
-            $button = '<form '.$target.' method="get" action="'.$CFG->wwwroot.'/'.$CFG->admin.'/lang.php">'.
+            $button = '<form  '.$CFG->frametarget.' method="get" action="'.$CFG->wwwroot.'/'.$CFG->admin.'/lang.php">'.
                       '<input type="hidden" name="mode" value="missing" />'.
                       '<input type="submit" value="'.$strmissingstrings.'" /></form>';
             break;
         echo '</strong> ';
         helpbutton('langswitchstorage', $strfilestoredinhelp, 'moodle');
         
-        echo '<form'.$target.' method="get" action="'.$CFG->wwwroot.'/'.$CFG->admin.'/lang.php">'.
+        echo '<form '.$CFG->frametarget.' method="get" action="'.$CFG->wwwroot.'/'.$CFG->admin.'/lang.php">'.
              '<input type="hidden" name="mode" value="compare" />'.
              '<input type="hidden" name="currentfile" value="'.$currentfile.'" />'.
              '<input type="hidden" name="uselocal" value="'.(1 - $uselocal % 2).'" />'.
index f8d3b8a466751f298043bac07b8c6ab9cd0cdf7f..5832e91a6788a77d115fa8eb278f3ce79a89ae2c 100644 (file)
@@ -110,13 +110,7 @@ class page_admin extends page_base {
                                     // if not, print_header() has to be called with a $section parameter
 
         if ($this->user_allowed_editing()) {
-            if (empty($CFG->framename) or $CFG->framename=='_top') { 
-                $target = '';
-            } else {
-                $target = ' target="'.$CFG->framename.'"';
-            }
-
-            $buttons = '<table><tr><td><form'.$target.' method="get" action="' . $this->url_get_path() . '">'.
+            $buttons = '<table><tr><td><form '.$CFG->frametarget.' method="get" action="' . $this->url_get_path() . '">'.
                        '<input type="hidden" name="adminedit" value="'.($this->user_is_editing()?'off':'on').'" />'.
                        '<input type="hidden" name="section" value="'.$this->section.'" />'.
                        '<input type="submit" value="'.get_string($this->user_is_editing()?'blockseditoff':'blocksediton').'" /></form></td>' . 
index 4d560863799dd758fee2b22b10a159a395e63f77..c760e56ad8c5d3524423787eae37f99955d623e9 100644 (file)
@@ -186,13 +186,7 @@ class page_blog extends page_base {
                 $paramstring .= '<input type="hidden" name="'.$key.'" value="'.s($val).'" />';
             }
 
-            if (empty($CFG->framename) or $CFG->framename=='_top') { 
-                $target = '';
-            } else {
-                $target = ' target="'.$CFG->framename.'"';
-            }
-
-            $editformstring = '<form'.$target.' method="get" action="'.$this->url_get_path().'">'
+            $editformstring = '<form '.$CFG->frametarget.' method="get" action="'.$this->url_get_path().'">'
                              .$paramstring.'<input type="submit" value="'.$editingString.'" /></form>';
         }
 
index 5a6700a79d202f2b1cc5eafe4f7d03fb2f7b5851..bb5a64ac898e2e7f5e7cd811915bdb3f606eb6c5 100644 (file)
@@ -1265,13 +1265,7 @@ function calendar_preferences_button() {
         return '';
     }
 
-    if (empty($CFG->framename) or $CFG->framename=='_top') { 
-        $target = '';
-    } else {
-        $target = ' target="'.$CFG->framename.'"';
-    }
-
-    return "<form$target method=\"get\" ".
+    return "<form $CFG->frametarget method=\"get\" ".
            " action=\"$CFG->wwwroot/calendar/preferences.php\">".
            "<input type=\"submit\" value=\"".get_string("preferences", "calendar")." ...\" /></form>";
 }
index d421844c14b63a546182a7f97e9e68e4a65fbfd1..8ab80466b513edfe88b616e4edcf6ba033057ced 100644 (file)
                 //Sort modinfo by name length
                 usort($modinfo,'comparemodulenamesbylength');
 
-                if (empty($CFG->framename) or $CFG->framename=='_top') { 
-                    $target = '';
-                } else {
-                    $target = ' target="'.$CFG->framename.'"';
-                }
-
                 foreach ($modinfo as $activity) {
                     //Exclude labels and hidden items
                     if ($activity->mod != "label" && $activity->visible) {
@@ -42,7 +36,7 @@
                         /// Avoid empty or unlinkable activity names
                         if (!empty($title)) {
                             $title = str_replace('"', "'", $title);
-                            $href_tag_begin = "<a class=\"autolink\" title=\"$title\" href=\"$CFG->wwwroot/mod/$activity->mod/view.php?id=$activity->cm\"$target>";
+                            $href_tag_begin = "<a class=\"autolink\" title=\"$title\" href=\"$CFG->wwwroot/mod/$activity->mod/view.php?id=$activity->cm\" $CFG->frametarget>";
                             $currentname = urldecode($activity->name);
                             if ($currentname = trim($currentname)) {
                                 $activitylist[] = new filterobject($currentname, $href_tag_begin, '</a>', false, true);
index cd21c2aba983408a46ab3148bc80b9aad48bffef..a4e026bf556a69e612cfa1839f18b0c9997c6c1b 100644 (file)
@@ -950,17 +950,11 @@ function popup_form($common, $options, $formid, $selected='', $nothing='choose',
         $nothing = $choose.'...';
     }
 
-    if (empty($CFG->framename) or $CFG->framename=='_top') { 
-        $target = '';
-    } else {
-        $target = ' target="'.$CFG->framename.'"';
-    }
-
     // changed reference to document.getElementById('id_abc') instead of document.abc
     // MDL-7861
     $output = '<form action="'.$CFG->wwwroot.'/course/jumpto.php"'.
-                        ' method="get"'.
-                        $target.
+                        ' method="get" '.
+                         $CFG->frametarget.
                         ' id="'.$formid.'"'.
                         ' class="popupform">';
     if ($help) {
@@ -2332,12 +2326,6 @@ function print_header_simple($title='', $heading='', $navigation='', $focus='',
 function print_footer($course=NULL, $usercourse=NULL, $return=false) {
     global $USER, $CFG, $THEME;
 
-    if (empty($CFG->framename) or $CFG->framename=='_top') { 
-        $target = '';
-    } else {
-        $target = ' target="'.$CFG->framename.'"';
-    }
-
 /// Course links
     if ($course) {
         if (is_string($course) && $course == 'none') {          // Don't print any links etc
@@ -2351,13 +2339,13 @@ function print_footer($course=NULL, $usercourse=NULL, $return=false) {
                '<br /><img style="width:100px;height:30px" src="pix/moodlelogo.gif" alt="moodlelogo" /></a></div>';
             $home  = true;
         } else {
-            $homelink = '<div class="homelink"><a'.$target.' href="'.$CFG->wwwroot.
+            $homelink = '<div class="homelink"><a '.$CFG->frametarget.' href="'.$CFG->wwwroot.
                         '/course/view.php?id='.$course->id.'">'.$course->shortname.'</a></div>';
             $home  = false;
         }
     } else {
         $course = get_site();  // Set course as site course by default
-        $homelink = '<div class="homelink"><a'.$target.' href="'.$CFG->wwwroot.'/">'.get_string('home').'</a></div>';
+        $homelink = '<div class="homelink"><a '.$CFG->frametarget.' href="'.$CFG->wwwroot.'/">'.get_string('home').'</a></div>';
         $home  = false;
     }
 
@@ -2664,16 +2652,10 @@ function user_login_string($course=NULL, $user=NULL) {
         $course = $SITE;
     }
 
-    if (empty($CFG->framename) or $CFG->framename=='_top') { 
-        $target = '';
-    } else {
-        $target = ' target="'.$CFG->framename.'"';
-    }
-
     if (isset($user->realuser)) {
         if ($realuser = get_record('user', 'id', $user->realuser)) {
             $fullname = fullname($realuser, true);
-            $realuserinfo = " [<a$target
+            $realuserinfo = " [<a $CFG->frametarget
             href=\"$CFG->wwwroot/course/loginas.php?id=$course->id&amp;return=1\">$fullname</a>] ";
         }
     } else {
@@ -2693,28 +2675,28 @@ function user_login_string($course=NULL, $user=NULL) {
         $context = get_context_instance(CONTEXT_COURSE, $course->id);
 
         $fullname = fullname($user, true);
-        $username = "<a$target href=\"$CFG->wwwroot/user/view.php?id=$user->id&amp;course=$course->id\">$fullname</a>";
+        $username = "<a $CFG->frametarget href=\"$CFG->wwwroot/user/view.php?id=$user->id&amp;course=$course->id\">$fullname</a>";
         if (is_mnet_remote_user($user) and $idprovider = get_record('mnet_host', 'id', $user->mnethostid)) {
-            $username .= " from <a$target href=\"{$idprovider->wwwroot}\">{$idprovider->name}</a>";
+            $username .= " from <a $CFG->frametarget href=\"{$idprovider->wwwroot}\">{$idprovider->name}</a>";
         }
         if (isset($user->username) && $user->username == 'guest') {
             $loggedinas = $realuserinfo.get_string('loggedinasguest').
-                      " (<a$target href=\"$wwwroot/login/index.php\">".get_string('login').'</a>)';
+                      " (<a $CFG->frametarget href=\"$wwwroot/login/index.php\">".get_string('login').'</a>)';
         } else if (!empty($user->switchrole[$context->id])) {
             $rolename = '';
             if ($role = get_record('role', 'id', $user->switchrole[$context->id])) {
                 $rolename = ': '.format_string($role->name);
             }
             $loggedinas = get_string('loggedinas', 'moodle', $username).$rolename.
-                      " (<a$target
+                      " (<a $CFG->frametarget
                       href=\"$CFG->wwwroot/course/view.php?id=$course->id&amp;switchrole=0&amp;sesskey=".sesskey()."\">".get_string('switchrolereturn').'</a>)';
         } else {
             $loggedinas = $realuserinfo.get_string('loggedinas', 'moodle', $username).' '.
-                      " (<a$target href=\"$CFG->wwwroot/login/logout.php\">".get_string('logout').'</a>)';
+                      " (<a $CFG->frametarget href=\"$CFG->wwwroot/login/logout.php\">".get_string('logout').'</a>)';
         }
     } else {
         $loggedinas = get_string('loggedinnot', 'moodle').
-                      " (<a$target href=\"$wwwroot/login/index.php\">".get_string('login').'</a>)';
+                      " (<a $CFG->frametarget href=\"$wwwroot/login/index.php\">".get_string('login').'</a>)';
     }
     return '<div class="logininfo">'.$loggedinas.'</div>';
 }
@@ -2779,12 +2761,6 @@ function print_navigation ($navigation, $separator=0, $return=false) {
         $separator = '<span class="sep">'. $separator .'</span>';
     }
 
-    if (empty($CFG->framename) or $CFG->framename=='_top') { 
-        $target = '';
-    } else {
-        $target = ' target="'.$CFG->framename.'"';
-    }
-
     if ($navigation) {
         //Accessibility: breadcrumb links now in a list, &raquo; replaced with a 'silent' character.
         $nav_text = get_string('youarehere','access');
@@ -2793,7 +2769,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'. $target .' 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.' 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";
     }
@@ -3846,13 +3822,7 @@ function update_course_icon($courseid) {
             $edit = '1';
         }
 
-        if (empty($CFG->framename) or $CFG->framename=='_top') { 
-            $target = '';
-        } else {
-            $target = ' target="'.$CFG->framename.'"';
-        }
-
-        return "<form$target method=\"get\" action=\"$CFG->wwwroot/course/view.php\"><div>".
+        return "<form $CFG->frametarget method=\"get\" action=\"$CFG->wwwroot/course/view.php\"><div>".
             "<input type=\"hidden\" name=\"id\" value=\"$courseid\" />".
             "<input type=\"hidden\" name=\"edit\" value=\"$edit\" />".
             "<input type=\"hidden\" name=\"sesskey\" value=\"".sesskey()."\" />".
@@ -3920,13 +3890,7 @@ function update_mymoodle_icon() {
         $edit = '1';
     }
 
-    if (empty($CFG->framename) or $CFG->framename=='_top') { 
-        $target = '';
-    } else {
-        $target = ' target="'.$CFG->framename.'"';
-    }
-
-    return "<form$target method=\"get\" action=\"$CFG->wwwroot/my/index.php\">".
+    return "<form $CFG->frametarget method=\"get\" action=\"$CFG->wwwroot/my/index.php\">".
         "<input type=\"hidden\" name=\"edit\" value=\"$edit\" />".
         "<input type=\"submit\" value=\"$string\" /></form>";
 }
@@ -3944,13 +3908,7 @@ function update_module_button($moduleid, $courseid, $string) {
     if (has_capability('moodle/course:manageactivities', get_context_instance(CONTEXT_MODULE, $moduleid))) {
         $string = get_string('updatethis', '', $string);
 
-        if (empty($CFG->framename) or $CFG->framename=='_top') { 
-            $target = '';
-        } else {
-            $target = ' target="'.$CFG->framename.'"';
-        }
-
-        return "<form$target method=\"get\" action=\"$CFG->wwwroot/course/mod.php\">".
+        return "<form $CFG->frametarget method=\"get\" action=\"$CFG->wwwroot/course/mod.php\">".
                "<input type=\"hidden\" name=\"update\" value=\"$moduleid\" />".
                "<input type=\"hidden\" name=\"return\" value=\"true\" />".
                "<input type=\"hidden\" name=\"sesskey\" value=\"".sesskey()."\" />".
@@ -3981,13 +3939,7 @@ function update_category_button($categoryid) {
             $edit = 'on';
         }
 
-        if (empty($CFG->framename) or $CFG->framename=='_top') { 
-            $target = '';
-        } else {
-            $target = ' target="'.$CFG->framename.'"';
-        }
-
-        return "<form$target method=\"get\" action=\"$CFG->wwwroot/course/category.php\">".
+        return "<form $CFG->frametarget method=\"get\" action=\"$CFG->wwwroot/course/category.php\">".
                "<input type=\"hidden\" name=\"id\" value=\"$categoryid\" />".
                "<input type=\"hidden\" name=\"categoryedit\" value=\"$edit\" />".
                "<input type=\"hidden\" name=\"sesskey\" value=\"$USER->sesskey\" />".
@@ -4014,13 +3966,7 @@ function update_categories_button() {
             $categoryedit = 'on';
         }
 
-        if (empty($CFG->framename) or $CFG->framename=='_top') { 
-            $target = '';
-        } else {
-            $target = ' target="'.$CFG->framename.'"';
-        }
-
-        return "<form$target method=\"get\" action=\"$CFG->wwwroot/course/index.php\">".
+        return "<form $CFG->frametarget method=\"get\" action=\"$CFG->wwwroot/course/index.php\">".
                '<input type="hidden" name="categoryedit" value="'. $categoryedit .'" />'.
                '<input type="hidden" name="sesskey" value="'.$USER->sesskey.'" />'.
                '<input type="submit" value="'. $string .'" /></form>';
@@ -4046,13 +3992,7 @@ function update_categories_search_button($search,$page,$perpage) {
             $edit = "on";
         }
 
-        if (empty($CFG->framename) or $CFG->framename=='_top') { 
-            $target = '';
-        } else {
-            $target = ' target="'.$CFG->framename.'"';
-        }
-
-        return "<form$target method=\"get\" action=\"$CFG->wwwroot/course/search.php\">".
+        return "<form $CFG->frametarget method=\"get\" action=\"$CFG->wwwroot/course/search.php\">".
                "<input type=\"hidden\" name=\"edit\" value=\"$edit\" />".
                "<input type=\"hidden\" name=\"sesskey\" value=\"$USER->sesskey\" />".
                "<input type=\"hidden\" name=\"search\" value=\"".s($search, true)."\" />".
@@ -4077,13 +4017,7 @@ function update_group_button($courseid, $groupid) {
     if (has_capability('moodle/course:managegroups', get_context_instance(CONTEXT_GROUP, $groupid))) {
         $string = get_string('editgroupprofile');
 
-        if (empty($CFG->framename) or $CFG->framename=='_top') { 
-            $target = '';
-        } else {
-            $target = ' target="'.$CFG->framename.'"';
-        }
-
-        return "<form$target method=\"get\" action=\"$CFG->wwwroot/course/group.php\">".
+        return "<form $CFG->frametarget method=\"get\" action=\"$CFG->wwwroot/course/group.php\">".
                '<input type="hidden" name="id" value="'. $courseid .'" />'.
                '<input type="hidden" name="group" value="'. $groupid .'" />'.
                '<input type="hidden" name="edit" value="on" />'.
@@ -4112,13 +4046,7 @@ function update_groups_button($courseid) {
             $edit = 'on';
         }
 
-        if (empty($CFG->framename) or $CFG->framename=='_top') { 
-            $target = '';
-        } else {
-            $target = ' target="'.$CFG->framename.'"';
-        }
-
-        return "<form$target method=\"get\" action=\"$CFG->wwwroot/course/groups.php\">".
+        return "<form $CFG->frametarget method=\"get\" action=\"$CFG->wwwroot/course/groups.php\">".
                "<input type=\"hidden\" name=\"id\" value=\"$courseid\" />".
                "<input type=\"hidden\" name=\"edit\" value=\"$edit\" />".
                "<input type=\"submit\" value=\"$string\" /></form>";
@@ -4284,15 +4212,9 @@ function navmenu($course, $cm=NULL, $targetwindow='self') {
     //Accessibility: added Alt text, replaced &gt; &lt; with 'silent' character and 'accesshide' text.
     check_theme_arrows();
 
-    if (empty($CFG->framename) or $CFG->framename=='_top') { 
-        $target = '';
-    } else {
-        $target = ' target="'.$CFG->framename.'"';
-    }
-
     if ($selectmod and has_capability('moodle/site:viewreports', $context)) {
         $logstext = get_string('alllogs');
-        $logslink = '<a title="'.$logstext.'"'.$target.' href="'.
+        $logslink = '<a title="'.$logstext.'" '.$CFG->frametarget.' href="'.
                     $CFG->wwwroot.'/course/report/log/index.php?chooselog=1&amp;user=0&amp;date=0&amp;id='.
                        $course->id.'&amp;modid='.$selectmod->cm.'">'.
                     '<img class="icon log" src="'.$CFG->pixpath.'/i/log.gif" alt="'.$logstext.'" /></a>';
@@ -4300,14 +4222,14 @@ function navmenu($course, $cm=NULL, $targetwindow='self') {
     }
     if ($backmod) {
         $backtext= get_string('activityprev', 'access');
-        $backmod = '<form action="'.$CFG->wwwroot.'/mod/'.$backmod->mod.'/view.php"'.$target.'><fieldset>'.
+        $backmod = '<form action="'.$CFG->wwwroot.'/mod/'.$backmod->mod.'/view.php" '.$CFG->frametarget.'><fieldset>'.
                    '<input type="hidden" name="id" value="'.$backmod->cm.'" />'.
                    '<button type="submit" title="'.$backtext.'">'.$THEME->larrow.
                    '<span class="accesshide">'.$backtext.'</span></button></fieldset></form>';
     }
     if ($nextmod) {
         $nexttext= get_string('activitynext', 'access');
-        $nextmod = '<form action="'.$CFG->wwwroot.'/mod/'.$nextmod->mod.'/view.php" '.$target.'><fieldset>'.
+        $nextmod = '<form action="'.$CFG->wwwroot.'/mod/'.$nextmod->mod.'/view.php"  '.$CFG->frametarget.'><fieldset>'.
                    '<input type="hidden" name="id" value="'.$nextmod->cm.'" />'.
                    '<button type="submit" title="'.$nexttext.'">'.$THEME->rarrow.
                    '<span class="accesshide">'.$nexttext.'</span></button></fieldset></form>';
index 7896641acf06e81d88d1bd9db4f96a9bbe8087db..ed2edba39b73f942392d7f5e564df0320cd25ea4 100644 (file)
@@ -77,17 +77,11 @@ class assignment_base {
             $this->strsubmissions = get_string('submissions', 'assignment');
             $this->strlastmodified = get_string('lastmodified');
 
-            if (empty($CFG->framename) or $CFG->framename=='_top') { 
-                $target = '';
-            } else {
-                $target = ' target="'.$CFG->framename.'"';
-            }
-
             if ($this->course->id != SITEID) {
-                $this->navigation = "<a$target href=\"$CFG->wwwroot/course/view.php?id={$this->course->id}\">{$this->course->shortname}</a> -> ".
-                                    "<a$target href=\"index.php?id={$this->course->id}\">$this->strassignments</a> ->";
+                $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->strassignments</a> ->";
             } else {
-                $this->navigation = "<a$target href=\"index.php?id={$this->course->id}\">$this->strassignments</a> ->";
+                $this->navigation = "<a $CFG->frametarget href=\"index.php?id={$this->course->id}\">$this->strassignments</a> ->";
             }
 
             $this->pagetitle = strip_tags($this->course->shortname.': '.$this->strassignment.': '.format_string($this->assignment->name,true));
@@ -150,13 +144,7 @@ class assignment_base {
         global $CFG;
 
         if ($subpage) {
-            if (empty($CFG->framename) or $CFG->framename=='_top') { 
-                $target = '';
-            } else {
-                $target = ' target="'.$CFG->framename.'"';
-            }
-
-            $extranav = '<a'.$target.' href="view.php?id='.$this->cm->id.'">'.
+            $extranav = '<a '.$CFG->frametarget.' href="view.php?id='.$this->cm->id.'">'.
                           format_string($this->assignment->name,true).'</a> -> '.$subpage;
         } else {
             $extranav = ' '.format_string($this->assignment->name,true);
index 8014cf9b2cb92f74f01c6f4c4dac0f1ab7bafb47..db4d9635b74238ba25044975ee4212208e558354 100644 (file)
@@ -65,12 +65,7 @@ class page_chat extends page_generic_activity {
         if(empty($morebreadcrumbs) && $this->user_allowed_editing()) {
             $buttons = '<table><tr><td>'.update_module_button($this->modulerecord->id, $this->courserecord->id, get_string('modulename', 'chat')).'</td>';
             if(!empty($CFG->showblocksonmodpages)) {
-            if (empty($CFG->framename) or $CFG->framename=='_top') { 
-                $target = '';
-            } else {
-                $target = ' target="'.$CFG->framename.'"';
-            }
-               $buttons .= '<td><form'.$target.' method="get" action="view.php">'.
+               $buttons .= '<td><form '.$CFG->frametarget.' method="get" action="view.php">'.
                     '<input type="hidden" name="id" value="'.$this->modulerecord->id.'" />'.
                     '<input type="hidden" name="edit" value="'.($this->user_is_editing()?'off':'on').'" />'.
                     '<input type="submit" value="'.get_string($this->user_is_editing()?'blockseditoff':'blocksediton').'" /></form></td>';
index 924e06ff05c53be9a36d2dfdc3e128d30b774778..c019304127688a0a74f8d35564361b83b99b50e1 100644 (file)
 
             $contentlist = array();
 
-            if (empty($CFG->framename) or $CFG->framename=='_top') { 
-                $target = '';
-            } else {
-                $target = ' target="'.$CFG->framename.'"';
-            }
             foreach ($datacontents as $datacontent) {
                 $currentcontent = trim($datacontent->content);
                 $strippedcontent = strip_tags($currentcontent);
@@ -62,7 +57,7 @@
                                             '<a class="data autolink" title="'.
                                             $strippedcontent.'" href="'.
                                             $CFG->wwwroot.'/mod/data/view.php?d='. $datacontent->dataid .
-                                            '&amp;rid='. $datacontent->recordid .'"'.$target.'>',
+                                            '&amp;rid='. $datacontent->recordid .'" '.$CFG->frametarget.'>',
                                             '</a>', false, true);
                 }
             } // End foreach
index 059e17a9879419f31b03969225dc1b51f975cecc..2b84d2597a0f0afeb261cce16995a88ab9d3b2f2 100755 (executable)
@@ -68,13 +68,7 @@ class page_data extends page_generic_activity {
         if(empty($morebreadcrumbs) && $this->user_allowed_editing()) {
             $buttons = '<table><tr><td>'.update_module_button($this->modulerecord->id, $this->courserecord->id, get_string('modulename', 'data')).'</td>';
             if(!empty($CFG->showblocksonmodpages)) {
-                if (empty($CFG->framename) or $CFG->framename=='_top') { 
-                    $target = '';
-                } else {
-                    $target = ' target="'.$CFG->framename.'"';
-                }
-
-                $buttons .= '<td><form'.$target.' method="get" action="view.php">'.
+                $buttons .= '<td><form '.$CFG->frametarget.' method="get" action="view.php">'.
                     '<input type="hidden" name="id" value="'.$this->modulerecord->id.'" />'.
                     '<input type="hidden" name="edit" value="'.($this->user_is_editing()?'off':'on').'" />'.
                     '<input type="submit" value="'.get_string($this->user_is_editing()?'blockseditoff':'blocksediton').'" /></form></td>';
index a831de4352baf0309944c7ffb2ccc02209c5fc01..93d2fdbb5f76a9e1766eafb9ab5cd0550eb3b515 100644 (file)
@@ -3674,13 +3674,7 @@ function forum_update_subscriptions_button($courseid, $forumid) {
         $edit = "on";
     }
 
-    if (empty($CFG->framename) or $CFG->framename=='_top') { 
-        $target = '';
-    } else {
-        $target = ' target="'.$CFG->framename.'"';
-    }
-
-    return "<form$target method=\"get\" action=\"$CFG->wwwroot/mod/forum/subscribers.php\">".
+    return "<form $CFG->frametarget method=\"get\" action=\"$CFG->wwwroot/mod/forum/subscribers.php\">".
            "<input type=\"hidden\" name=\"id\" value=\"$forumid\" />".
            "<input type=\"hidden\" name=\"edit\" value=\"$edit\" />".
            "<input type=\"submit\" value=\"$string\" /></form>";
index 3be9cd0af4544a9e58e443c5b68f0d1907661bc6..18a76ddfb7dd740168109d8e91b3589e36c5918f 100644 (file)
 
         if (has_capability('moodle/course:manageactivities', $coursecontext)) {
             $updatebutton = ''
-            .   '<form target="'.$CFG->framename.'" method="get" action="'.$CFG->wwwroot.'/course/mod.php">'
+            .   '<form '.$CFG->frametarget.'" method="get" action="'.$CFG->wwwroot.'/course/mod.php">'
             .   '<input type="hidden" name="update" value="'.$hotpot->coursemodule.'" />'
             .   $sesskey
             .   '<input type="submit" value="'.$strupdate.'" />'
index 19f9a825dc38d3558dca4ebce62258d503b59173..e540b9b60d2105779fcb75c0b503fd0c8ba89089 100644 (file)
@@ -1708,7 +1708,7 @@ class hotpot_xml_quiz extends hotpot_xml_tree {
             $replace .= '\\2';
         }
         if ($form_name) {
-            $replace = '<form action="'.$CFG->wwwroot.'/mod/hotpot/attempt.php" method="POST" name="'.$form_name.'" target="'.$CFG->framename.'">'.$replace.'</form>';
+            $replace = '<form action="'.$CFG->wwwroot.'/mod/hotpot/attempt.php" method="POST" name="'.$form_name.'" '.$CFG->frametarget.'">'.$replace.'</form>';
         }
         if ($center) {
             $replace = '<div style="margin-left:auto; margin-right:auto; text-align: center;">'.$replace.'</div>';
index b3beb2ed9dcc54b1fc967b46c2d6302e2b5eb2ef..7ca9bc0d42d09b9606838a6d21aaa956b4c81e9e 100644 (file)
     // header strings
     $title = strip_tags($course->shortname.': '.$hotpot->name);
     $heading = "$course->fullname";
-    $target = empty($CFG->framename) ? '' : ' target="'.$CFG->framename.'"'; 
-    $navigation = '<a'.$target.' href="'.$CFG->wwwroot.'/mod/hotpot/index.php?id='.$course->id.'">'.get_string("modulenameplural", "hotpot")."</a> -> $hotpot->name";
+    $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'.$target.' href="'.$CFG->wwwroot.'/course/view.php?id='.$course->id.'">'.$course->shortname.'</a> -> '.$navigation;
+        $navigation = '<a '.$CFG->frametarget.' href="'.$CFG->wwwroot.'/course/view.php?id='.$course->id.'">'.$course->shortname.'</a> -> '.$navigation;
     }
     $button = update_module_button($cm->id, $course->id, get_string("modulename", "hotpot").'" style="font-size:0.75em;');
     $loggedinas = '<span class="logininfo">'.user_login_string($course, $USER).'</span>';
index 7f387ee3488325e2fe56e0ac57a555c5cfeb1328..20d6af37fbc84c91ebf409eeb6e9b4bc228847c9 100644 (file)
@@ -242,15 +242,9 @@ function lesson_print_header($cm, $course, $lesson, $currenttab = '') {
                 $pageid = get_field('lesson_pages', 'id', 'lessonid', $lesson->id, 'prevpageid', 0);
             }
             if (!empty($pageid) and $pageid != LESSON_EOL) {
-                if (empty($CFG->framename) or $CFG->framename=='_top') { 
-                    $target = '';
-                } else {
-                    $target = ' target="'.$CFG->framename.'"';
-                }
-
                 $button =  '<table><tr><td>'.$button.
                            '</td><td>'.
-                           '<form'.$target.' method="get" action="'. $CFG->wwwroot .'/mod/lesson/lesson.php">'.
+                           '<form '.$CFG->frametarget.' method="get" action="'. $CFG->wwwroot .'/mod/lesson/lesson.php">'.
                            '<input type="hidden" name="id" value="'. $cm->id .'" />'.
                            '<input type="hidden" name="action" value="editpage" />'.
                            '<input type="hidden" name="redirect" value="navigation" />'.
index 957cf4eb32ffde885239d84871616d00d855fefa..74df0efaa5ecd331c41d4d55afd51cd1f7369e7f 100644 (file)
@@ -67,13 +67,7 @@ class page_quiz extends page_generic_activity {
             $buttons = '<table><tr><td>'.
                update_module_button($this->modulerecord->id, $this->courserecord->id, get_string('modulename', 'quiz')).'</td>';
             if(!empty($CFG->showblocksonmodpages)) {
-                if (empty($CFG->framename) or $CFG->framename=='_top') { 
-                    $target = '';
-                } else {
-                    $target = ' target="'.$CFG->framename.'"';
-                }
-
-                $buttons .= '<td><form'.$target.' method="get" action="view.php">'.
+                $buttons .= '<td><form '.$CFG->frametarget.' method="get" action="view.php">'.
                     '<input type="hidden" name="id" value="'.$this->modulerecord->id.'" />'.
                     '<input type="hidden" name="edit" value="'.($this->user_is_editing()?'off':'on').'" />'.
                     '<input type="submit" value="'.get_string($this->user_is_editing()?'blockseditoff':'blocksediton').'" /></form></td>';
index 845d9189672de6b3fbba76bad00929646adbef2e..8f28f9b5ac289a7870df802c70b526cc5bfbe684 100644 (file)
 
             $resourcelist = array();
 
-            if (empty($CFG->framename) or $CFG->framename=='_top') { 
-                $target = '';
-            } else {
-                $target = ' target="'.$CFG->framename.'"';
-            }
-
             foreach ($resources as $resource) {
                 $currentname = trim($resource->name);
                 $strippedname = strip_tags($currentname);
@@ -45,7 +39,7 @@
                 if (!empty($strippedname)) {
                     $resourcelist[] = new filterobject($currentname,
                             '<a class="resource autolink" title="'.$strippedname.'" href="'.
-                             $CFG->wwwroot.'/mod/resource/view.php?r='.$resource->id.'"'.$target.'>', 
+                             $CFG->wwwroot.'/mod/resource/view.php?r='.$resource->id.'" '.$CFG->frametarget.'>', 
                              '</a>', false, true);
                 }
             }
index 1dc735e1bd2f555349d4c78d0f908fee8d179843..7ad7334d237e5a7a726b35b08df6b774d9fb09d4 100644 (file)
@@ -113,17 +113,11 @@ function resource_base($cmid=0) {
         $this->strresource  = get_string("modulename", "resource");
         $this->strresources = get_string("modulenameplural", "resource");
 
-        if (empty($CFG->framename) or $CFG->framename=='_top') { 
-            $target = '';
-        } else {
-            $target = ' target="'.$CFG->framename.'"';
-        }
-
         if ($this->course->id != SITEID) {
-            $this->navigation = "<a$target href=\"$CFG->wwwroot/course/view.php?id={$this->course->id}\">{$this->course->shortname}</a> -> ".
-                                "<a$target href=\"index.php?id={$this->course->id}\">$this->strresources</a> ->";
+            $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> ->";
         } else {
-            $this->navigation = "<a$target href=\"index.php?id={$this->course->id}\">$this->strresources</a> ->";
+            $this->navigation = "<a $CFG->frametarget 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))) {
index 738a30de1aefc7c309dc8d800df190aa7dace76c..1ba435270d683db2235699fa1013a8f9f2b1b46c 100644 (file)
@@ -399,12 +399,7 @@ function display() {
         if ($inpopup) {
             print_header($pagetitle);
         } else {
-            if (empty($CFG->framename) or $CFG->framename=='_top') { 
-                $target = '';
-            } else {
-                $target = ' target="'.$CFG->framename.'"';
-            }
-            print_header($pagetitle, $course->fullname, "$this->navigation <a$target title=\"$strdirectlink\" href=\"$fullurl\"> ".format_string($resource->name,true)."</a>", "", "", true, update_module_button($cm->id, $course->id, $this->strresource), navmenu($course, $cm, "self"));
+            print_header($pagetitle, $course->fullname, "$this->navigation <a $CFG->frametarget title=\"$strdirectlink\" href=\"$fullurl\"> ".format_string($resource->name,true)."</a>", "", "", true, update_module_button($cm->id, $course->id, $this->strresource), navmenu($course, $cm, "self"));
 
         }
 
index 2be033ca8c6158e00b078753c38c890e7830f52c..086899dec3ed662ee5e34cd2bcbe70317933ed3c 100644 (file)
 
 /// Instantiate a resource_ims object and modify its navigation
     $resource_obj = new resource_ims ($cmid);
-    if (empty($CFG->framename) or $CFG->framename=='_top') { 
-        $target = '';
-    } else {
-        $target = ' target="'.$CFG->framename.'"';
-    }
     if ($resource_obj->course->id != SITEID) {
-        $resource_obj->navigation = "<a$target href=\"$CFG->wwwroot/course/view.php?id={$course->id}\">{$course->shortname}</a> -> ".
-                                    "<a$target href=\"$CFG->wwwroot/mod/resource/index.php?id={$course->id}\">$resource_obj->strresources</a> -> ";
+        $resource_obj->navigation = "<a $CFG->frametarget href=\"$CFG->wwwroot/course/view.php?id={$course->id}\">{$course->shortname}</a> -> ".
+                                    "<a $CFG->frametarget href=\"$CFG->wwwroot/mod/resource/index.php?id={$course->id}\">$resource_obj->strresources</a> -> ";
     } else {
-        $resource_obj->navigation = "<a$target href=\"$CFG->wwwroot/mod/resource/index.php?id={$course->id}\">$resource_obj->strresources</a> -> ";
+        $resource_obj->navigation = "<a $CFG->frametarget href=\"$CFG->wwwroot/mod/resource/index.php?id={$course->id}\">$resource_obj->strresources</a> -> ";
     }
 
 /// Print the header of the page
index 10e8f34b930ef9559c6e5a595bbffa87b6a57cb4..248e78cc10c37c3cac34de6f53dbbb5d39e98252 100644 (file)
@@ -382,12 +382,7 @@ function display() {
         if ($inpopup) {
             print_header($pagetitle);
         } else {
-            if (empty($CFG->framename) or $CFG->framename=='_top') { 
-                $target = '';
-            } else {
-                $target = ' target="'.$CFG->framename.'"';
-            }
-            print_header($pagetitle, $course->fullname, "$this->navigation <a$target title=\"$strdirectlink\" href=\"$fullurl\"> ".format_string($resource->name,true)."</a>", "", "", true, update_module_button($cm->id, $course->id, $this->strresource), navmenu($course, $cm, "self"));
+            print_header($pagetitle, $course->fullname, "$this->navigation <a $CFG->frametarget title=\"$strdirectlink\" href=\"$fullurl\"> ".format_string($resource->name,true)."</a>", "", "", true, update_module_button($cm->id, $course->id, $this->strresource), navmenu($course, $cm, "self"));
 
         }
 
index c18044ce7536cf1478af5c5fa05c725cf683841f..ba4eba024da3179aa1d9b291391dc970ba16c33f 100755 (executable)
@@ -496,7 +496,7 @@ function scorm_course_format_display($user,$course) {
             $trackedusers = get_record('scorm_scoes_track', 'scormid', $scorm->id, '', '', '', '', 'count(distinct(userid)) as c');
             if ($trackedusers->c > 0) {
                 $headertext .= '<td class="reportlink">'.
-                              '<a target="'.$CFG->framename.'" href="'.$CFG->wwwroot.'/mod/scorm/report.php?id='.$cm->id.'">'.
+                              '<a '.$CFG->frametarget.'" href="'.$CFG->wwwroot.'/mod/scorm/report.php?id='.$cm->id.'">'.
                                get_string('viewallreports','scorm',$trackedusers->c).'</a>';
             } else {
                 $headertext .= '<td class="reportlink">'.get_string('noreports','scorm');
index 2b8ab4e5cec8ec29cb3adc98034ccb1de227a165..d2f6e68695f9cf76ac8d3bd44556b591617ae78c 100755 (executable)
     $strpopup = get_string('popup','scorm');
 
     if ($course->id != SITEID) {
-        $navigation = "<a target=\"{$CFG->framename}\" href=\"../../course/view.php?id=$course->id\">$course->shortname</a> ->";
+        $navigation = "<a $CFG->frametarget href=\"../../course/view.php?id=$course->id\">$course->shortname</a> ->";
         if ($scorms = get_all_instances_in_course('scorm', $course)) {
             // The module SCORM/AICC activity with the first id is the course  
             $firstscorm = current($scorms);
             if (!(($course->format == 'scorm') && ($firstscorm->id == $scorm->id))) {
-                $navigation .= "<a target=\"{$CFG->framename}\" href=\"index.php?id=$course->id\">$strscorms</a> ->";
+                $navigation .= "<a $CFG->frametarget href=\"index.php?id=$course->id\">$strscorms</a> ->";
             }
         }
     } else {
-        $navigation = "<a target=\"{$CFG->framename}\" href=\"index.php?id=$course->id\">$strscorms</a> ->";
+        $navigation = "<a $CFG->frametarget href=\"index.php?id=$course->id\">$strscorms</a> ->";
     }
 
     $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",
-                 "$navigation <a target='{$CFG->framename}' href='view.php?id=$cm->id'>".format_string($scorm->name,true)."</a>",
+                 "$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"));
     }
     }
     $exitlink = '(<a href="'.$CFG->wwwroot.'/course/view.php?id='.$cm->course.'">'.get_string('exit','scorm').'</a>)&nbsp;';
     print_header($pagetitle, "$course->fullname",
-                 "$navigation <a target='{$CFG->framename}' href='view.php?id=$cm->id'>".format_string($scorm->name,true)."</a>",
+                 "$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') {
 ?>
index 45460c5cee4db5ead2eee0b7dbd3e359466cc6f0..766f77932c3bee9d46f127aa16a99a559e4e3437 100755 (executable)
     $strscorm  = get_string("modulename", "scorm");
 
     if ($course->id != SITEID) { 
-        $navigation = "<a target=\"{$CFG->framename}\" href=\"../../course/view.php?id=$course->id\">$course->shortname</a> ->";
+        $navigation = "<a $CFG->frametarget href=\"../../course/view.php?id=$course->id\">$course->shortname</a> ->";
         if ($scorms = get_all_instances_in_course('scorm', $course)) {
             // The module SCORM activity with the least id is the course  
             $firstscorm = current($scorms);
             if (!(($course->format == 'scorm') && ($firstscorm->id == $scorm->id))) {
-                $navigation .= "<a target=\"{$CFG->framename}\" href=\"index.php?id=$course->id\">$strscorms</a> ->";
+                $navigation .= "<a $CFG->frametarget href=\"index.php?id=$course->id\">$strscorms</a> ->";
             }       
         }
     } else {
-        $navigation = "<a target=\"{$CFG->framename}\" href=\"index.php?id=$course->id\">$strscorms</a> ->";
+        $navigation = "<a $CFG->frametarget href=\"index.php?id=$course->id\">$strscorms</a> ->";
     }
 
     $pagetitle = strip_tags($course->shortname.': '.format_string($scorm->name));
@@ -67,7 +67,7 @@
     // Print the page header
     //
     print_header($pagetitle, "$course->fullname",
-                 "$navigation <a target=\"{$CFG->framename}\" href=\"view.php?id=$cm->id\">".format_string($scorm->name,true)."</a>",
+                 "$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));
 
     if (empty($cm->visible) and !has_capability('moodle/course:manageactivities', $context)) {
@@ -77,7 +77,7 @@
     if (has_capability('moodle/course:manageactivities', $context)) {
         $trackedusers = get_record('scorm_scoes_track', 'scormid', $scorm->id, '', '', '', '', 'count(distinct(userid)) as c');
         if ($trackedusers->c > 0) {
-            echo "<div class=\"reportlink\"><a target=\"{$CFG->framename}\" href=\"report.php?id=$cm->id\"> ".get_string('viewallreports','scorm',$trackedusers->c).'</a></div>';
+            echo "<div class=\"reportlink\"><a $CFG->frametarget href=\"report.php?id=$cm->id\"> ".get_string('viewallreports','scorm',$trackedusers->c).'</a></div>';
         } else {
             echo '<div class="reportlink">'.get_string('noreports','scorm').'</div>';
         }
index b1bc4bfdedb21b0b2bd71f5bb9bd2691e705726e..c955b316bdb5842240221d38ad1bad2f0277c9a4 100644 (file)
         // show assessment and allow changes
         workshop_print_assessment($workshop, $assessment, true, $allowcomments, $redirect);
 
-        print_heading("<a target=\"{$CFG->framename}\" href=\"$redirect\">".get_string("cancel")."</a>");
+        print_heading("<a $CFG->frametarget href=\"$redirect\">".get_string("cancel")."</a>");
         print_footer($course);
         exit;
     }
index d1fb73604683a4477bc2cde18222e8a08f403f34..cf842c9324921d88f627cd5ae28f360de1618f24 100644 (file)
@@ -90,7 +90,7 @@
         echo "<input type=\"submit\" value=\"".get_string("amendtitle", "workshop")."\" />\n";
         echo "</center></form>\n";
 
-        print_heading("<a target=\"{$CFG->framename}\" href=\"view.php?id=$cm->id#sid=$submission->id\">".get_string("cancel")."</a>");
+        print_heading("<a $CFG->frametarget href=\"view.php?id=$cm->id#sid=$submission->id\">".get_string("cancel")."</a>");
     }
 
 
index bd4721b5b2d8e60ff0e410c06b07c2a23bb140fe..42ea478b7a56c8ce7f60419220910a4c40a00806 100644 (file)
         print_heading(get_string("submitexampleassignment", "workshop").":");
         workshop_print_upload_form($workshop);
 
-        print_heading("<a target=\"{$CFG->framename}\" href=\"view.php?id=$cm->id\">".get_string("cancel")."</a>");
+        print_heading("<a $CFG->frametarget href=\"view.php?id=$cm->id\">".get_string("cancel")."</a>");
     }
 
 
index 1e5a62a1e7f6fc6b26ef0cf976c7658b96f08b39..50c6a056facb532d75dc86311d6d77c1049ff7ec 100644 (file)
 ?>
 <?php echo $loggedinas ?>
 <?php echo $homelink;
-if (empty($CFG->framename) or $CFG->framename=='_top') { 
-    $target = '';
-} else {
-    $target = ' target="'.$CFG->framename.'"';
-}
 ?>
-<!-- <p><div class="homelink"><a<?php echo $target ?> href="<?php $CFG->wwwroot ?>/course/view.php?id=<?php $course->id ?>"> <?php $course->shortname ?> </a></div></p> -->
+<!-- <p><div class="homelink"><a <?php echo $CFG->frametarget ?> href="<?php $CFG->wwwroot ?>/course/view.php?id=<?php $course->id ?>"> <?php $course->shortname ?> </a></div></p> -->
 <p>
 <!-- <<a href="http://validator.w3.org/check?verbose=1&amp;ss=1&amp;uri=<?php echo urlencode(qualified_me()) ?>"><img src="<?php echo "$CFG->themewww/$CFG->theme" ?>/xhtml_1_0.gif" alt="XHTML Validator" /></a>
 <a href="http://jigsaw.w3.org/css-validator/validator?uri=<?php echo urlencode(qualified_me()) ?>&amp;warning=1&amp;profile=css2&amp;usermedium=all"><img src="<?php echo "$CFG->themewww/$CFG->theme" ?>/css.gif" alt="CSS Validator" /></a>