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);
// 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').': ';
$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;
}
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();
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>";
$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).'" />'.
// 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>' .
$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>';
}
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>";
}
//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) {
/// 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);
$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) {
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
'<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;
}
$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&return=1\">$fullname</a>] ";
}
} else {
$context = get_context_instance(CONTEXT_COURSE, $course->id);
$fullname = fullname($user, true);
- $username = "<a$target href=\"$CFG->wwwroot/user/view.php?id=$user->id&course=$course->id\">$fullname</a>";
+ $username = "<a $CFG->frametarget href=\"$CFG->wwwroot/user/view.php?id=$user->id&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&switchrole=0&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>';
}
$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, » replaced with a 'silent' character.
$nav_text = get_string('youarehere','access');
$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";
}
$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()."\" />".
$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>";
}
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()."\" />".
$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\" />".
$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>';
$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)."\" />".
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" />'.
$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>";
//Accessibility: added Alt text, replaced > < 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&user=0&date=0&id='.
$course->id.'&modid='.$selectmod->cm.'">'.
'<img class="icon log" src="'.$CFG->pixpath.'/i/log.gif" alt="'.$logstext.'" /></a>';
}
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>';
$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));
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);
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>';
$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);
'<a class="data autolink" title="'.
$strippedcontent.'" href="'.
$CFG->wwwroot.'/mod/data/view.php?d='. $datacontent->dataid .
- '&rid='. $datacontent->recordid .'"'.$target.'>',
+ '&rid='. $datacontent->recordid .'" '.$CFG->frametarget.'>',
'</a>', false, true);
}
} // End foreach
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>';
$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>";
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.'" />'
$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>';
// 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>';
$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" />'.
$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>';
$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);
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);
}
}
$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))) {
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"));
}
/// 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
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"));
}
$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');
$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>) ';
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') {
?>
$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));
// 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)) {
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>';
}
// 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;
}
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>");
}
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>");
}
?>
<?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&ss=1&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()) ?>&warning=1&profile=css2&usermedium=all"><img src="<?php echo "$CFG->themewww/$CFG->theme" ?>/css.gif" alt="CSS Validator" /></a>