From 377d7b82f643a12462b4e9537a12bbf9d067473e Mon Sep 17 00:00:00 2001 From: Rossiani Wijaya Date: Thu, 1 Jul 2010 05:35:27 +0000 Subject: [PATCH] MDL-20410 - remove set_focuscontrol (bulk commit) --- admin/settings.php | 1 - auth/shibboleth/login.php | 3 +-- calendar/export.php | 1 - course/edit.php | 1 - course/editcategory.php | 1 - course/modedit.php | 3 +-- lib/deprecatedlib.php | 6 ++---- login/forgot_password.php | 1 - login/signup.php | 1 - mod/quiz/accessrules.php | 5 ++--- mod/wiki/pagelib.php | 2 -- user/messageselect.php | 4 ---- 12 files changed, 6 insertions(+), 23 deletions(-) diff --git a/admin/settings.php b/admin/settings.php index 5352349f9648b..596d6182f502f 100644 --- a/admin/settings.php +++ b/admin/settings.php @@ -58,7 +58,6 @@ } /// print header stuff ------------------------------------------------------------ -$PAGE->set_focuscontrol($focus); if (empty($SITE->fullname)) { $PAGE->set_title($settingspage->visiblename); $PAGE->set_heading($settingspage->visiblename); diff --git a/auth/shibboleth/login.php b/auth/shibboleth/login.php index d3b56aad06d5a..d33cbea002a45 100644 --- a/auth/shibboleth/login.php +++ b/auth/shibboleth/login.php @@ -69,8 +69,7 @@ $PAGE->set_url('/auth/shibboleth/login.php'); $PAGE->navbar->add($loginsite); $PAGE->set_title("$site->fullname: $loginsite"); - $PAGE->set_heading($site->fullname); - $PAGE->set_focuscontrol('idp'); + $PAGE->set_heading($site->fullname); echo $OUTPUT->header(); include("index_form.html"); diff --git a/calendar/export.php b/calendar/export.php index 4b21d1b0c31e5..6d57e57da3d37 100644 --- a/calendar/export.php +++ b/calendar/export.php @@ -128,7 +128,6 @@ $PAGE->set_title($site->shortname.': '.$strcalendar.': '.$pagetitle); $PAGE->set_heading($COURSE->fullname); $PAGE->set_button($prefsbutton); -$PAGE->set_focuscontrol('pw_all'); $PAGE->set_pagelayout('standard'); $renderer = $PAGE->get_renderer('core_calendar'); diff --git a/course/edit.php b/course/edit.php index 17882a80072df..2b2d9e48942fe 100644 --- a/course/edit.php +++ b/course/edit.php @@ -148,7 +148,6 @@ $PAGE->set_title($title); $PAGE->set_heading($fullname); -$PAGE->set_focuscontrol($editform->focus()); echo $OUTPUT->header(); echo $OUTPUT->heading($streditcoursesettings); diff --git a/course/editcategory.php b/course/editcategory.php index 87dc5deda1c79..ae4037f9a0047 100644 --- a/course/editcategory.php +++ b/course/editcategory.php @@ -109,7 +109,6 @@ $PAGE->set_title($title); $PAGE->set_heading($fullname); -$PAGE->set_focuscontrol($mform->focus()); echo $OUTPUT->header(); echo $OUTPUT->heading($strtitle); diff --git a/course/modedit.php b/course/modedit.php index 659b519991cbf..38ecd4ae281f1 100644 --- a/course/modedit.php +++ b/course/modedit.php @@ -576,8 +576,7 @@ } $PAGE->set_heading($course->fullname); - $PAGE->set_title($streditinga); - $PAGE->set_focuscontrol($mform->focus()); + $PAGE->set_title($streditinga); $PAGE->set_cacheable(false); echo $OUTPUT->header(); diff --git a/lib/deprecatedlib.php b/lib/deprecatedlib.php index f6552ebc485fd..ee056bea3d2b3 100644 --- a/lib/deprecatedlib.php +++ b/lib/deprecatedlib.php @@ -2132,8 +2132,7 @@ function print_header($title='', $heading='', $navigation='', $focus='', $PAGE->set_title($title); $PAGE->set_heading($heading); - $PAGE->set_cacheable($cache); - $PAGE->set_focuscontrol($focus); + $PAGE->set_cacheable($cache); if ($button == '') { $button = ' '; } @@ -2198,8 +2197,7 @@ function print_header_simple($title='', $heading='', $navigation='', $focus='', } $PAGE->set_title($title); - $PAGE->set_heading($heading); - $PAGE->set_focuscontrol($focus); + $PAGE->set_heading($heading); $PAGE->set_cacheable(true); $PAGE->set_button($button); diff --git a/login/forgot_password.php b/login/forgot_password.php index a0d2e98b40643..cb0725651115b 100644 --- a/login/forgot_password.php +++ b/login/forgot_password.php @@ -154,7 +154,6 @@ /// DISPLAY FORM $PAGE->set_title($strforgotten); $PAGE->set_heading($COURSE->fullname); -$PAGE->set_focuscontrol('id_email'); echo $OUTPUT->header(); echo $OUTPUT->box(get_string('passwordforgotteninstructions2'), 'generalbox boxwidthnormal boxaligncenter'); diff --git a/login/signup.php b/login/signup.php index 686f8b9fd2441..efc9b086fc4ec 100644 --- a/login/signup.php +++ b/login/signup.php @@ -75,7 +75,6 @@ function signup_captcha_enabled() { $PAGE->set_title($newaccount); $PAGE->set_heading($SITE->fullname); -$PAGE->set_focuscontrol($mform_signup->focus()); echo $OUTPUT->header(); $mform_signup->display(); diff --git a/mod/quiz/accessrules.php b/mod/quiz/accessrules.php index 9c45012ebb8da..73f8f26f59e31 100644 --- a/mod/quiz/accessrules.php +++ b/mod/quiz/accessrules.php @@ -206,7 +206,7 @@ public function safebrowser_required($canpreview) { * @param boolean $unfinished whether the button is to continue an existing attempt, * or start a new one. This affects whether a javascript alert is shown. */ - public function print_start_attempt_button($canpreview, $buttontext, $unfinished) { + public function print_start_attempt_button($canpreview, $buttontext, $unfinished) { /// Do we need a confirm javascript alert? global $OUTPUT; if ($unfinished) { @@ -647,8 +647,7 @@ public function do_password_check($canpreview, $accessmanager, $return = false) $output = ''; /// Start the page and print the quiz intro, if any. - if (!$return) { - $PAGE->set_focuscontrol('quizpassword'); + if (!$return) { echo $OUTPUT->header(); } if (trim(strip_tags($this->_quiz->intro))) { diff --git a/mod/wiki/pagelib.php b/mod/wiki/pagelib.php index 891212c03001f..2043ef42905b7 100644 --- a/mod/wiki/pagelib.php +++ b/mod/wiki/pagelib.php @@ -94,8 +94,6 @@ function __construct($wiki, $subwiki, $cm) { // initialise wiki renderer $this->wikioutput = $PAGE->get_renderer('mod_wiki'); - - $PAGE->set_focuscontrol(''); $PAGE->set_cacheable(true); $PAGE->set_cm($cm); $PAGE->set_activity_record($wiki); diff --git a/user/messageselect.php b/user/messageselect.php index 4db7f60220e5c..4c37e0b0263fa 100644 --- a/user/messageselect.php +++ b/user/messageselect.php @@ -111,10 +111,6 @@ $PAGE->navbar->add($strtitle); $PAGE->set_title($strtitle); $PAGE->set_heading($strtitle); -if (empty($messagebody)) { - $PAGE->set_focuscontrol('theform.messagebody'); -} - echo $OUTPUT->header(); // if messaging is disabled on site, we can still allow users with capabilities to send emails instead if (empty($CFG->messaging)) {