mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 00:12:56 +02:00
MDL-8050 1.2 Remove all target="_top"
This commit is contained in:
parent
ee5567d1ae
commit
e25cb71041
@ -123,8 +123,13 @@
|
||||
|
||||
admin_externalpage_print_header($adminroot);
|
||||
|
||||
|
||||
echo "<form target=\"{$CFG->framename}\" name=\"authmenu\" method=\"post\" action=\"auth.php\">";
|
||||
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 "<input type=\"hidden\" name=\"sesskey\" value=\"".$USER->sesskey."\" />";
|
||||
echo "<center><b>";
|
||||
print_string("chooseauthmethod","auth");
|
||||
|
@ -19,8 +19,14 @@
|
||||
$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=\"$CFG->framename\" href=\"index.php\">$stradministration</a> -> Database performance");
|
||||
"<a$target href=\"index.php\">$stradministration</a> -> Database performance");
|
||||
exit;
|
||||
}
|
||||
|
||||
|
@ -52,7 +52,13 @@
|
||||
|
||||
print_simple_box(get_string('configenrolmentplugins', 'admin'), 'center', '700');
|
||||
|
||||
echo "<form target=\"{$CFG->framename}\" name=\"enrolmenu\" method=\"post\" action=\"enrol.php\">";
|
||||
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 "<input type=\"hidden\" name=\"sesskey\" value=\"".$USER->sesskey."\" />";
|
||||
|
||||
$table = new stdClass();
|
||||
|
@ -44,7 +44,13 @@
|
||||
|
||||
admin_externalpage_print_header($adminroot);
|
||||
|
||||
echo "<form target=\"{$CFG->framename}\" name=\"enrolmenu\" method=\"post\" action=\"enrol_config.php\">";
|
||||
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 "<input type=\"hidden\" name=\"sesskey\" value=\"".$USER->sesskey."\">";
|
||||
echo "<div align=\"center\"><p><b>";
|
||||
|
||||
|
@ -88,21 +88,27 @@
|
||||
$strfilecreated = 'New file created';
|
||||
|
||||
$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="'.$CFG->framename.'" method="get" action="'.$CFG->wwwroot.'/'.$CFG->admin.'/lang.php">'.
|
||||
$button = '<form'.$target.' 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="'.$CFG->framename.'" method="get" action="'.$CFG->wwwroot.'/'.$CFG->admin.'/lang.php">'.
|
||||
$button = '<form '.$target.' method="get" action="'.$CFG->wwwroot.'/'.$CFG->admin.'/lang.php">'.
|
||||
'<input type="hidden" name="mode" value="missing" />'.
|
||||
'<input type="submit" value="'.$strmissingstrings.'" /></form>';
|
||||
break;
|
||||
@ -346,7 +352,7 @@
|
||||
echo '</strong> ';
|
||||
helpbutton('langswitchstorage', $strfilestoredinhelp, 'moodle');
|
||||
|
||||
echo '<form target="'.$CFG->framename.'" method="get" action="'.$CFG->wwwroot.'/'.$CFG->admin.'/lang.php">'.
|
||||
echo '<form'.$target.' 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).'" />'.
|
||||
|
@ -110,7 +110,13 @@ class page_admin extends page_base {
|
||||
// if not, print_header() has to be called with a $section parameter
|
||||
|
||||
if ($this->user_allowed_editing()) {
|
||||
$buttons = '<table><tr><td><form target="' . $CFG->framename . '" method="get" action="' . $this->url_get_path() . '">'.
|
||||
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() . '">'.
|
||||
'<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>' .
|
||||
|
@ -185,7 +185,14 @@ class page_blog extends page_base {
|
||||
foreach ($params as $key=>$val) {
|
||||
$paramstring .= '<input type="hidden" name="'.$key.'" value="'.s($val).'" />';
|
||||
}
|
||||
$editformstring = '<form target="'.$CFG->framename.'" method="get" action="'.$this->url_get_path().'">'
|
||||
|
||||
if (empty($CFG->framename) or $CFG->framename=='_top') {
|
||||
$target = '';
|
||||
} else {
|
||||
$target = ' target="'.$CFG->framename.'"';
|
||||
}
|
||||
|
||||
$editformstring = '<form'.$target.' method="get" action="'.$this->url_get_path().'">'
|
||||
.$paramstring.'<input type="submit" value="'.$editingString.'" /></form>';
|
||||
}
|
||||
|
||||
|
@ -1255,7 +1255,13 @@ function calendar_preferences_button() {
|
||||
return '';
|
||||
}
|
||||
|
||||
return "<form target=\"$CFG->framename\" method=\"get\" ".
|
||||
if (empty($CFG->framename) or $CFG->framename=='_top') {
|
||||
$target = '';
|
||||
} else {
|
||||
$target = ' target="'.$CFG->framename.'"';
|
||||
}
|
||||
|
||||
return "<form$target method=\"get\" ".
|
||||
" action=\"$CFG->wwwroot/calendar/preferences.php\">".
|
||||
"<input type=\"submit\" value=\"".get_string("preferences", "calendar")." ...\" /></form>";
|
||||
}
|
||||
|
@ -29,6 +29,12 @@
|
||||
//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) {
|
||||
@ -36,7 +42,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=\"$CFG->framename\">";
|
||||
$href_tag_begin = "<a class=\"autolink\" title=\"$title\" href=\"$CFG->wwwroot/mod/$activity->mod/view.php?id=$activity->cm\"$target>";
|
||||
$currentname = urldecode($activity->name);
|
||||
if ($currentname = trim($currentname)) {
|
||||
$activitylist[] = new filterobject($currentname, $href_tag_begin, '</a>', false, true);
|
||||
|
130
lib/weblib.php
130
lib/weblib.php
@ -950,11 +950,17 @@ 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
|
||||
$startoutput = '<form action="'.$CFG->wwwroot.'/course/jumpto.php"'.
|
||||
' method="get"'.
|
||||
' target="'.$CFG->framename.'"'.
|
||||
$target.
|
||||
' id="'.$formid.'"'.
|
||||
' class="popupform">';
|
||||
|
||||
@ -2322,6 +2328,12 @@ 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
|
||||
@ -2335,13 +2347,13 @@ function print_footer($course=NULL, $usercourse=NULL, $return=false) {
|
||||
'<br /><img width="100" height="30" src="pix/moodlelogo.gif" border="0" alt="moodlelogo" /></a></div>';
|
||||
$home = true;
|
||||
} else {
|
||||
$homelink = '<div class="homelink"><a target="'.$CFG->framename.'" href="'.$CFG->wwwroot.
|
||||
$homelink = '<div class="homelink"><a'.$target.' 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="'.$CFG->framename.'" href="'.$CFG->wwwroot.'/">'.get_string('home').'</a></div>';
|
||||
$homelink = '<div class="homelink"><a'.$target.'" href="'.$CFG->wwwroot.'/">'.get_string('home').'</a></div>';
|
||||
$home = false;
|
||||
}
|
||||
|
||||
@ -2648,10 +2660,16 @@ 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=\"{$CFG->framename}\"
|
||||
$realuserinfo = " [<a$target
|
||||
href=\"$CFG->wwwroot/course/loginas.php?id=$course->id&return=1\">$fullname</a>] ";
|
||||
}
|
||||
} else {
|
||||
@ -2671,25 +2689,25 @@ function user_login_string($course=NULL, $user=NULL) {
|
||||
$context = get_context_instance(CONTEXT_COURSE, $course->id);
|
||||
|
||||
$fullname = fullname($user, true);
|
||||
$username = "<a target=\"{$CFG->framename}\" href=\"$CFG->wwwroot/user/view.php?id=$user->id&course=$course->id\">$fullname</a>";
|
||||
$username = "<a$target href=\"$CFG->wwwroot/user/view.php?id=$user->id&course=$course->id\">$fullname</a>";
|
||||
if (isset($user->username) && $user->username == 'guest') {
|
||||
$loggedinas = $realuserinfo.get_string('loggedinasguest').
|
||||
" (<a target=\"{$CFG->framename}\" href=\"$wwwroot/login/index.php\">".get_string('login').'</a>)';
|
||||
" (<a$target 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=\"{$CFG->framename}\"
|
||||
" (<a$target
|
||||
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=\"{$CFG->framename}\" href=\"$CFG->wwwroot/login/logout.php\">".get_string('logout').'</a>)';
|
||||
" (<a$target href=\"$CFG->wwwroot/login/logout.php\">".get_string('logout').'</a>)';
|
||||
}
|
||||
} else {
|
||||
$loggedinas = get_string('loggedinnot', 'moodle').
|
||||
" (<a target=\"{$CFG->framename}\" href=\"$wwwroot/login/index.php\">".get_string('login').'</a>)';
|
||||
" (<a$target href=\"$wwwroot/login/index.php\">".get_string('login').'</a>)';
|
||||
}
|
||||
return '<div class="logininfo">'.$loggedinas.'</div>';
|
||||
}
|
||||
@ -2754,6 +2772,12 @@ 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, » replaced with a 'silent' character.
|
||||
$nav_text = get_string('youarehere','access');
|
||||
@ -2762,7 +2786,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="'. $CFG->framename .'" 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'. $target .' 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";
|
||||
}
|
||||
@ -3812,7 +3836,14 @@ function update_course_icon($courseid) {
|
||||
$string = get_string('turneditingon');
|
||||
$edit = '1';
|
||||
}
|
||||
return "<form target=\"$CFG->framename\" method=\"get\" action=\"$CFG->wwwroot/course/view.php\">".
|
||||
|
||||
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\">".
|
||||
"<input type=\"hidden\" name=\"id\" value=\"$courseid\" />".
|
||||
"<input type=\"hidden\" name=\"edit\" value=\"$edit\" />".
|
||||
"<input type=\"hidden\" name=\"sesskey\" value=\"".sesskey()."\" />".
|
||||
@ -3879,7 +3910,14 @@ function update_mymoodle_icon() {
|
||||
$string = get_string('updatemymoodleon');
|
||||
$edit = '1';
|
||||
}
|
||||
return "<form target=\"$CFG->framename\" method=\"get\" action=\"$CFG->wwwroot/my/index.php\">".
|
||||
|
||||
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\">".
|
||||
"<input type=\"hidden\" name=\"edit\" value=\"$edit\" />".
|
||||
"<input type=\"submit\" value=\"$string\" /></form>";
|
||||
}
|
||||
@ -3896,7 +3934,14 @@ function update_module_button($moduleid, $courseid, $string) {
|
||||
|
||||
if (has_capability('moodle/course:manageactivities', get_context_instance(CONTEXT_MODULE, $moduleid))) {
|
||||
$string = get_string('updatethis', '', $string);
|
||||
return "<form target=\"$CFG->framename\" method=\"get\" action=\"$CFG->wwwroot/course/mod.php\">".
|
||||
|
||||
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\">".
|
||||
"<input type=\"hidden\" name=\"update\" value=\"$moduleid\" />".
|
||||
"<input type=\"hidden\" name=\"return\" value=\"true\" />".
|
||||
"<input type=\"hidden\" name=\"sesskey\" value=\"".sesskey()."\" />".
|
||||
@ -3926,7 +3971,14 @@ function update_category_button($categoryid) {
|
||||
$string = get_string('turneditingon');
|
||||
$edit = 'on';
|
||||
}
|
||||
return "<form target=\"$CFG->framename\" method=\"get\" action=\"$CFG->wwwroot/course/category.php\">".
|
||||
|
||||
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\">".
|
||||
"<input type=\"hidden\" name=\"id\" value=\"$categoryid\" />".
|
||||
"<input type=\"hidden\" name=\"categoryedit\" value=\"$edit\" />".
|
||||
"<input type=\"hidden\" name=\"sesskey\" value=\"$USER->sesskey\" />".
|
||||
@ -3952,7 +4004,14 @@ function update_categories_button() {
|
||||
$string = get_string('turneditingon');
|
||||
$categoryedit = 'on';
|
||||
}
|
||||
return "<form target=\"$CFG->framename\" method=\"get\" action=\"$CFG->wwwroot/course/index.php\">".
|
||||
|
||||
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\">".
|
||||
'<input type="hidden" name="categoryedit" value="'. $categoryedit .'" />'.
|
||||
'<input type="hidden" name="sesskey" value="'.$USER->sesskey.'" />'.
|
||||
'<input type="submit" value="'. $string .'" /></form>';
|
||||
@ -3977,7 +4036,14 @@ function update_categories_search_button($search,$page,$perpage) {
|
||||
$string = get_string("turneditingon");
|
||||
$edit = "on";
|
||||
}
|
||||
return "<form target=\"$CFG->framename\" method=\"get\" action=\"$CFG->wwwroot/course/search.php\">".
|
||||
|
||||
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\">".
|
||||
"<input type=\"hidden\" name=\"edit\" value=\"$edit\" />".
|
||||
"<input type=\"hidden\" name=\"sesskey\" value=\"$USER->sesskey\" />".
|
||||
"<input type=\"hidden\" name=\"search\" value=\"".s($search, true)."\" />".
|
||||
@ -4001,7 +4067,14 @@ function update_group_button($courseid, $groupid) {
|
||||
|
||||
if (has_capability('moodle/course:managegroups', get_context_instance(CONTEXT_GROUP, $groupid))) {
|
||||
$string = get_string('editgroupprofile');
|
||||
return "<form target=\"$CFG->framename\" method=\"get\" action=\"$CFG->wwwroot/course/group.php\">".
|
||||
|
||||
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\">".
|
||||
'<input type="hidden" name="id" value="'. $courseid .'" />'.
|
||||
'<input type="hidden" name="group" value="'. $groupid .'" />'.
|
||||
'<input type="hidden" name="edit" value="on" />'.
|
||||
@ -4029,7 +4102,14 @@ function update_groups_button($courseid) {
|
||||
$string = get_string('turneditingon');
|
||||
$edit = 'on';
|
||||
}
|
||||
return "<form target=\"$CFG->framename\" method=\"get\" action=\"$CFG->wwwroot/course/groups.php\">".
|
||||
|
||||
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\">".
|
||||
"<input type=\"hidden\" name=\"id\" value=\"$courseid\" />".
|
||||
"<input type=\"hidden\" name=\"edit\" value=\"$edit\" />".
|
||||
"<input type=\"submit\" value=\"$string\" /></form>";
|
||||
@ -4194,10 +4274,16 @@ function navmenu($course, $cm=NULL, $targetwindow='self') {
|
||||
}
|
||||
//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="'.$CFG->framename.'" href="'.
|
||||
$logslink = '<a title="'.$logstext.'"'.$target.' 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>';
|
||||
@ -4205,14 +4291,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="'.$CFG->framename.'">'.
|
||||
$backmod = '<form action="'.$CFG->wwwroot.'/mod/'.$backmod->mod.'/view.php"'.$target.'>'.
|
||||
'<input type="hidden" name="id" value="'.$backmod->cm.'" />'.
|
||||
'<button type="submit" title="'.$backtext.'">'.$THEME->larrow.
|
||||
'<span class="accesshide">'.$backtext.'</span></button></form>';
|
||||
}
|
||||
if ($nextmod) {
|
||||
$nexttext= get_string('activitynext', 'access');
|
||||
$nextmod = '<form action="'.$CFG->wwwroot.'/mod/'.$nextmod->mod.'/view.php" target="'.$CFG->framename.'">'.
|
||||
$nextmod = '<form action="'.$CFG->wwwroot.'/mod/'.$nextmod->mod.'/view.php" '.$target.'>'.
|
||||
'<input type="hidden" name="id" value="'.$nextmod->cm.'" />'.
|
||||
'<button type="submit" title="'.$nexttext.'">'.$THEME->rarrow.
|
||||
'<span class="accesshide">'.$nexttext.'</span></button></form>';
|
||||
|
@ -77,11 +77,17 @@ class assignment_base {
|
||||
$this->strsubmissions = get_string('submissions', 'assignment');
|
||||
$this->strlastmodified = get_string('lastmodified');
|
||||
|
||||
if ($this->course->id != SITEID) {
|
||||
$this->navigation = "<a target=\"{$CFG->framename}\" href=\"$CFG->wwwroot/course/view.php?id={$this->course->id}\">{$this->course->shortname}</a> -> ".
|
||||
"<a target=\"{$CFG->framename}\" href=\"index.php?id={$this->course->id}\">$this->strassignments</a> ->";
|
||||
if (empty($CFG->framename) or $CFG->framename=='_top') {
|
||||
$target = '';
|
||||
} else {
|
||||
$this->navigation = "<a target=\"{$CFG->framename}\" href=\"index.php?id={$this->course->id}\">$this->strassignments</a> ->";
|
||||
$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> ->";
|
||||
} else {
|
||||
$this->navigation = "<a$target 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));
|
||||
@ -144,7 +150,13 @@ class assignment_base {
|
||||
global $CFG;
|
||||
|
||||
if ($subpage) {
|
||||
$extranav = '<a target="'.$CFG->framename.'" href="view.php?id='.$this->cm->id.'">'.
|
||||
if (empty($CFG->framename) or $CFG->framename=='_top') {
|
||||
$target = '';
|
||||
} else {
|
||||
$target = ' target="'.$CFG->framename.'"';
|
||||
}
|
||||
|
||||
$extranav = '<a'.$target.' href="view.php?id='.$this->cm->id.'">'.
|
||||
format_string($this->assignment->name,true).'</a> -> '.$subpage;
|
||||
} else {
|
||||
$extranav = ' '.format_string($this->assignment->name,true);
|
||||
@ -2189,11 +2201,10 @@ function assignment_count_real_submissions($assignment, $groupid=0) {
|
||||
if ($groupid) { /// How many in a particular group?
|
||||
return count_records_sql("SELECT COUNT(DISTINCT g.userid, g.groupid)
|
||||
FROM {$CFG->prefix}assignment_submissions a,
|
||||
{$CFG->prefix}groups_members g
|
||||
".groups_members_from_sql()."
|
||||
WHERE a.assignment = $assignment->id
|
||||
AND a.timemodified > 0
|
||||
AND g.groupid = '$groupid'
|
||||
AND a.userid = g.userid ");
|
||||
AND ".groups_members_where_sql($groupid, 'a.userid'));
|
||||
} else {
|
||||
$cm = get_coursemodule_from_instance('assignment', $assignment->id);
|
||||
$context = get_context_instance(CONTEXT_MODULE, $cm->id);
|
||||
|
@ -65,7 +65,12 @@ 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)) {
|
||||
$buttons .= '<td><form target="'.$CFG->framename.'" method="get" action="view.php">'.
|
||||
if (empty($CFG->framename) or $CFG->framename=='_top') {
|
||||
$target = '';
|
||||
} else {
|
||||
$target = ' target="'.$CFG->framename.'"';
|
||||
}
|
||||
$buttons .= '<td><form'.$target.' 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>';
|
||||
|
@ -47,6 +47,11 @@
|
||||
|
||||
$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);
|
||||
@ -57,8 +62,7 @@
|
||||
'<a class="data autolink" title="'.
|
||||
$strippedcontent.'" href="'.
|
||||
$CFG->wwwroot.'/mod/data/view.php?d='. $datacontent->dataid .
|
||||
'&rid='. $datacontent->recordid .'" target="'.
|
||||
$CFG->framename.'">',
|
||||
'&rid='. $datacontent->recordid .'"'.$target.'>',
|
||||
'</a>', false, true);
|
||||
}
|
||||
} // End foreach
|
||||
|
@ -68,7 +68,13 @@ 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)) {
|
||||
$buttons .= '<td><form target="'.$CFG->framename.'" method="get" action="view.php">'.
|
||||
if (empty($CFG->framename) or $CFG->framename=='_top') {
|
||||
$target = '';
|
||||
} else {
|
||||
$target = ' target="'.$CFG->framename.'"';
|
||||
}
|
||||
|
||||
$buttons .= '<td><form'.$target.' 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>';
|
||||
|
@ -324,7 +324,7 @@ function forum_cron() {
|
||||
$groupmode = false;
|
||||
if (!empty($cm->id)) {
|
||||
if ($groupmode = groupmode($course, $cm) and $discussion->groupid > 0) { // Groups are being used
|
||||
if (!$group = get_record('groups', 'id', $discussion->groupid)) { // Can't find group
|
||||
if (! groups_group_exists($discussion->groupid)) { // Can't find group //TODO:
|
||||
continue; // Be safe and don't send it to anyone
|
||||
}
|
||||
}
|
||||
@ -1650,8 +1650,8 @@ function forum_subscribed_users($course, $forum, $groupid=0, $cache=false) {
|
||||
}
|
||||
|
||||
if ($groupid) {
|
||||
$grouptables = ", {$CFG->prefix}groups_members g";
|
||||
$groupselect = " AND g.groupid = '$groupid' AND u.id = g.userid";
|
||||
$grouptables = ', '. groups_members_from_sql();
|
||||
$groupselect = 'AND'.groups_members_where_sql($groupid, 'u.id');
|
||||
} else {
|
||||
$grouptables = '';
|
||||
$groupselect = '';
|
||||
@ -3290,7 +3290,7 @@ function forum_print_latest_discussions($course, $forum, $maxdiscussions=5, $dis
|
||||
if (isset($groups[$discussion->groupid])) {
|
||||
$group = $groups[$discussion->groupid];
|
||||
} else {
|
||||
$group = $groups[$discussion->groupid] = get_record('groups', 'id', $discussion->groupid);
|
||||
$group = $groups[$discussion->groupid] = groups_get_group($discussion->groupid); //TODO:
|
||||
}
|
||||
} else {
|
||||
$group = -1;
|
||||
@ -3673,7 +3673,14 @@ function forum_update_subscriptions_button($courseid, $forumid) {
|
||||
$string = get_string('turneditingon');
|
||||
$edit = "on";
|
||||
}
|
||||
return "<form target=\"$CFG->framename\" method=\"get\" action=\"$CFG->wwwroot/mod/forum/subscribers.php\">".
|
||||
|
||||
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\">".
|
||||
"<input type=\"hidden\" name=\"id\" value=\"$forumid\" />".
|
||||
"<input type=\"hidden\" name=\"edit\" value=\"$edit\" />".
|
||||
"<input type=\"submit\" value=\"$string\" /></form>";
|
||||
|
@ -242,9 +242,15 @@ 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="'. $CFG->framename .'" method="get" action="'. $CFG->wwwroot .'/mod/lesson/lesson.php">'.
|
||||
'<form'.$target.' 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" />'.
|
||||
|
@ -67,7 +67,13 @@ 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)) {
|
||||
$buttons .= '<td><form target="'.$CFG->framename.'" method="get" action="view.php">'.
|
||||
if (empty($CFG->framename) or $CFG->framename=='_top') {
|
||||
$target = '';
|
||||
} else {
|
||||
$target = ' target="'.$CFG->framename.'"';
|
||||
}
|
||||
|
||||
$buttons .= '<td><form'.$target.' 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>';
|
||||
|
@ -32,6 +32,12 @@
|
||||
|
||||
$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);
|
||||
@ -39,7 +45,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->framename.'">',
|
||||
$CFG->wwwroot.'/mod/resource/view.php?r='.$resource->id.'"'.$target.'>',
|
||||
'</a>', false, true);
|
||||
}
|
||||
}
|
||||
|
@ -113,11 +113,17 @@ function resource_base($cmid=0) {
|
||||
$this->strresource = get_string("modulename", "resource");
|
||||
$this->strresources = get_string("modulenameplural", "resource");
|
||||
|
||||
if ($this->course->id != SITEID) {
|
||||
$this->navigation = "<a target=\"{$CFG->framename}\" href=\"$CFG->wwwroot/course/view.php?id={$this->course->id}\">{$this->course->shortname}</a> -> ".
|
||||
"<a target=\"{$CFG->framename}\" href=\"index.php?id={$this->course->id}\">$this->strresources</a> ->";
|
||||
if (empty($CFG->framename) or $CFG->framename=='_top') {
|
||||
$target = '';
|
||||
} else {
|
||||
$this->navigation = "<a target=\"{$CFG->framename}\" href=\"index.php?id={$this->course->id}\">$this->strresources</a> ->";
|
||||
$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> ->";
|
||||
} else {
|
||||
$this->navigation = "<a$target 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))) {
|
||||
|
@ -399,7 +399,12 @@ function display() {
|
||||
if ($inpopup) {
|
||||
print_header($pagetitle);
|
||||
} else {
|
||||
print_header($pagetitle, $course->fullname, "$this->navigation <a title=\"$strdirectlink\" target=\"$CFG->framename\" href=\"$fullurl\"> ".format_string($resource->name,true)."</a>", "", "", true, update_module_button($cm->id, $course->id, $this->strresource), navmenu($course, $cm, "self"));
|
||||
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"));
|
||||
|
||||
}
|
||||
|
||||
|
@ -54,11 +54,16 @@
|
||||
|
||||
/// Instantiate a resource_ims object and modify its navigation
|
||||
$resource_obj = new resource_ims ($cmid);
|
||||
if ($resource_obj->course->id != SITEID) {
|
||||
$resource_obj->navigation = "<a target=\"{$CFG->framename}\" href=\"$CFG->wwwroot/course/view.php?id={$course->id}\">{$course->shortname}</a> -> ".
|
||||
"<a target=\"{$CFG->framename}\" href=\"$CFG->wwwroot/mod/resource/index.php?id={$course->id}\">$resource_obj->strresources</a> -> ";
|
||||
if (empty($CFG->framename) or $CFG->framename=='_top') {
|
||||
$target = '';
|
||||
} else {
|
||||
$resource_obj->navigation = "<a target=\"{$CFG->framename}\" href=\"$CFG->wwwroot/mod/resource/index.php?id={$course->id}\">$resource_obj->strresources</a> -> ";
|
||||
$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> -> ";
|
||||
} else {
|
||||
$resource_obj->navigation = "<a$target href=\"$CFG->wwwroot/mod/resource/index.php?id={$course->id}\">$resource_obj->strresources</a> -> ";
|
||||
}
|
||||
|
||||
/// Print the header of the page
|
||||
|
@ -382,7 +382,12 @@ function display() {
|
||||
if ($inpopup) {
|
||||
print_header($pagetitle);
|
||||
} else {
|
||||
print_header($pagetitle, $course->fullname, "$this->navigation <a title=\"$strdirectlink\" target=\"$CFG->framename\" href=\"$fullurl\"> ".format_string($resource->name,true)."</a>", "", "", true, update_module_button($cm->id, $course->id, $this->strresource), navmenu($course, $cm, "self"));
|
||||
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"));
|
||||
|
||||
}
|
||||
|
||||
@ -423,7 +428,7 @@ function display() {
|
||||
echo "<center><p>";
|
||||
echo '<object classid="CLSID:22D6f312-B0F6-11D0-94AB-0080C74C7E95"';
|
||||
echo ' codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701" ';
|
||||
echo ' standby="Loading Microsoft® Windows® Media Player components..." ';
|
||||
echo ' standby="Loading Microsoft<EFBFBD> Windows<77> Media Player components..." ';
|
||||
echo ' id="msplayer" align="" type="application/x-oleobject">';
|
||||
echo "<param name=\"Filename\" value=\"$fullurl\">";
|
||||
echo '<param name="ShowControls" value="true" />';
|
||||
|
@ -11,8 +11,14 @@
|
||||
}
|
||||
?>
|
||||
<?php echo $loggedinas ?>
|
||||
<?php echo $homelink ?>
|
||||
<!-- <p><div class="homelink"><a target="<?php echo $CFG->framename ?>" href="<?php $CFG->wwwroot ?>/course/view.php?id=<?php $course->id ?>"> <?php $course->shortname ?> </a></div></p> -->
|
||||
<?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>
|
||||
<!-- <<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>
|
||||
|
Loading…
x
Reference in New Issue
Block a user