From a044c05ddb0a29b262360e6e98f7ef95ee3556e9 Mon Sep 17 00:00:00 2001 From: poltawski Date: Tue, 8 May 2007 15:07:25 +0000 Subject: [PATCH] MDL-9742 - changed tabs to spaces in a few places where there are one or two --- admin/pagelib.php | 12 ++++++------ auth/shibboleth/README.txt | 2 +- auth/shibboleth/auth.php | 6 +++--- auth/shibboleth/index.php | 2 +- blocks/moodleblock.class.php | 16 ++++++++-------- blog/header.php | 16 ++++++++-------- course/lib.php | 2 +- course/search.php | 10 +++++----- enrol/authorize/db/upgrade.php | 10 +++++----- lib/db/access.php | 22 +++++++++++----------- lib/form/datetimeselector.php | 4 ++-- lib/formslib.php | 4 ++-- lib/moodlelib.php | 2 +- lib/questionlib.php | 12 ++++++------ lib/weblib.php | 10 +++++----- mod/choice/report.php | 2 +- mod/forum/lib.php | 8 ++++---- mod/forum/post.php | 6 +++--- mod/glossary/showentry.php | 2 +- mod/resource/type/ims/deploy.php | 2 +- mod/resource/type/ims/resource.class.php | 4 ++-- mod/wiki/view.php | 4 ++-- question/format/hotpot/format.php | 2 +- question/format/webct/format.php | 10 +++++----- 24 files changed, 85 insertions(+), 85 deletions(-) diff --git a/admin/pagelib.php b/admin/pagelib.php index ac87f0d1dd..12095b6660 100644 --- a/admin/pagelib.php +++ b/admin/pagelib.php @@ -116,18 +116,18 @@ class page_admin extends page_base { $this->init_full($section); // we're trusting that init_full() has already been called by now; it should have. // if not, print_header() has to be called with a $section parameter - // The search page currently doesn't handle block editing + // The search page currently doesn't handle block editing if ($this->section != 'search' and $this->user_allowed_editing()) { $buttons = '
frametarget.' method="get" action="' . $this->url_get_path() . '">'. - '
'. - ''. - '
'; + '
'. + ''. + '
'; } else { $buttons = ' '; } - + print_header("$SITE->shortname: " . implode(": ",$this->visiblepathtosection), $SITE->fullname, - implode(" -> ",$this->visiblepathtosection),'', '', true, $buttons, ''); + implode(" -> ",$this->visiblepathtosection),'', '', true, $buttons, ''); } function get_type() { diff --git a/auth/shibboleth/README.txt b/auth/shibboleth/README.txt index f64afa84ac..a353c482ea 100644 --- a/auth/shibboleth/README.txt +++ b/auth/shibboleth/README.txt @@ -162,7 +162,7 @@ Example file: $result["country"] = $country; $result["department"] = $institution; $result["description"] = "I am a Shibboleth user"; - + } ?> diff --git a/auth/shibboleth/auth.php b/auth/shibboleth/auth.php index 4af09ac987..54c0265ca9 100644 --- a/auth/shibboleth/auth.php +++ b/auth/shibboleth/auth.php @@ -148,9 +148,9 @@ class auth_plugin_shibboleth extends auth_plugin_base { function loginpage_hook() { global $SESSION, $CFG; - - // Prevent username from being shown on login page after logout - $CFG->nolastloggedin = true; + + // Prevent username from being shown on login page after logout + $CFG->nolastloggedin = true; return; } diff --git a/auth/shibboleth/index.php b/auth/shibboleth/index.php index 1750e00d51..9bda6c35d8 100644 --- a/auth/shibboleth/index.php +++ b/auth/shibboleth/index.php @@ -44,7 +44,7 @@ // Don't show username on login page set_moodle_cookie('nobody'); - + set_login_session_preferences(); unset($SESSION->lang); diff --git a/blocks/moodleblock.class.php b/blocks/moodleblock.class.php index a5d1169715..a9a32b946a 100644 --- a/blocks/moodleblock.class.php +++ b/blocks/moodleblock.class.php @@ -257,18 +257,18 @@ class block_base { //Accessibility: validation, can't have
inside

, use . $title = '
'; - + if (!empty($CFG->allowuserblockhiding)) { //Accessibility: added static 'alt' text for the +- icon. //TODO (nfreear): language string 'hide OR show block' $title .= '
'. - ''. - '
'; + ''. + '
'; } //Accesssibility: added H2 (was in, weblib.php: print_side_block) diff --git a/blog/header.php b/blog/header.php index 7301c11f35..717618a4eb 100755 --- a/blog/header.php +++ b/blog/header.php @@ -134,14 +134,14 @@ if (!$course = get_record('course', 'id', $courseid)) { case 'group': if ($thisgroup = groups_get_group($filterselect, false)) { //TODO: - if ($tagid || !empty($tag)) { - print_header("$course->shortname: $blogstring", $course->fullname, - ''.$thisgroup->name.' -> - '. "$blogstring -> $tagstring: $taginstance->text",'','',true,$PAGE->get_extra_header_string()); - } else { - print_header("$course->shortname: $blogstring", $course->fullname, - ''.$thisgroup->name." -> - $blogstring",'','',true,$PAGE->get_extra_header_string()); + if ($tagid || !empty($tag)) { + print_header("$course->shortname: $blogstring", $course->fullname, + ''.$thisgroup->name.' -> + '. "$blogstring -> $tagstring: $taginstance->text",'','',true,$PAGE->get_extra_header_string()); + } else { + print_header("$course->shortname: $blogstring", $course->fullname, + ''.$thisgroup->name." -> + $blogstring",'','',true,$PAGE->get_extra_header_string()); } } else { print_error('Unable to find group'); diff --git a/course/lib.php b/course/lib.php index 433f6f4501..71d64dc9da 100644 --- a/course/lib.php +++ b/course/lib.php @@ -2542,7 +2542,7 @@ function get_section_name($format) { if($sectionname == "[[name$format]]") { $sectionname = get_string("name$format"); } - return $sectionname; + return $sectionname; } /** diff --git a/course/search.php b/course/search.php index b8a901599b..500721dd9a 100644 --- a/course/search.php +++ b/course/search.php @@ -211,8 +211,8 @@ echo "$strcategory\n"; echo "$strselect\n"; echo "$stredit\n"; - foreach ($courses as $course) { - + foreach ($courses as $course) { + $coursecontext = get_context_instance(CONTEXT_COURSE, $course->id); $course->fullname = highlight("$search", $course->fullname); @@ -256,10 +256,10 @@ } // checks whether user can do role assignment - if (has_capability('moodle/role:assign', $coursecontext)) { + if (has_capability('moodle/role:assign', $coursecontext)) { echo''; - echo ''.get_string('assignroles', 'role').' ' . "\n"; - } + echo ''.get_string('assignroles', 'role').' ' . "\n"; + } // checks whether user can delete course if (has_capability('moodle/course:delete', $coursecontext)) { diff --git a/enrol/authorize/db/upgrade.php b/enrol/authorize/db/upgrade.php index 5a4ec88831..c28da08f87 100644 --- a/enrol/authorize/db/upgrade.php +++ b/enrol/authorize/db/upgrade.php @@ -35,23 +35,23 @@ function xmldb_enrol_authorize_upgrade($oldversion=0) { if ($result && $oldversion < 2006112900) { if (isset($CFG->an_login)) { if (empty($CFG->an_login)) { - unset_config('an_login'); + unset_config('an_login'); } else { - $result = $result && set_config('an_login', rc4encrypt($CFG->an_login), 'enrol/authorize') && unset_config('an_login'); + $result = $result && set_config('an_login', rc4encrypt($CFG->an_login), 'enrol/authorize') && unset_config('an_login'); } } if (isset($CFG->an_tran_key)) { if (empty($CFG->an_tran_key)) { - unset_config('an_tran_key'); + unset_config('an_tran_key'); } else { - $result = $result && set_config('an_tran_key', rc4encrypt($CFG->an_tran_key), 'enrol/authorize') && unset_config('an_tran_key'); + $result = $result && set_config('an_tran_key', rc4encrypt($CFG->an_tran_key), 'enrol/authorize') && unset_config('an_tran_key'); } } if (isset($CFG->an_password)) { if (empty($CFG->an_password)) { - unset_config('an_password'); + unset_config('an_password'); } else { $result = $result && set_config('an_password', rc4encrypt($CFG->an_password), 'enrol/authorize') && unset_config('an_password'); diff --git a/lib/db/access.php b/lib/db/access.php index a2104d5cd5..77c29cc72a 100644 --- a/lib/db/access.php +++ b/lib/db/access.php @@ -714,17 +714,17 @@ $moodle_capabilities = array( 'admin' => CAP_ALLOW ) ), - - 'moodle/user:editprofile' => array( - - 'riskbitmask' => RISK_SPAM, - - 'captype' => 'write', - 'contextlevel' => CONTEXT_USER, - 'legacy' => array( - 'admin' => CAP_ALLOW - ) - ), + + 'moodle/user:editprofile' => array( + + 'riskbitmask' => RISK_SPAM, + + 'captype' => 'write', + 'contextlevel' => CONTEXT_USER, + 'legacy' => array( + 'admin' => CAP_ALLOW + ) + ), 'moodle/user:editownprofile' => array( diff --git a/lib/form/datetimeselector.php b/lib/form/datetimeselector.php index 49e5e06562..03220929d2 100644 --- a/lib/form/datetimeselector.php +++ b/lib/form/datetimeselector.php @@ -134,8 +134,8 @@ class MoodleQuickForm_date_time_selector extends MoodleQuickForm_group{ if (!is_array($value)) { $currentdate = usergetdate($value); $value = array( - 'minute' => $currentdate['minutes'], - 'hour' => $currentdate['hours'], + 'minute' => $currentdate['minutes'], + 'hour' => $currentdate['hours'], 'day' => $currentdate['mday'], 'month' => $currentdate['mon'], 'year' => $currentdate['year']); diff --git a/lib/formslib.php b/lib/formslib.php index fc7e7873fb..dd0cd6ae86 100644 --- a/lib/formslib.php +++ b/lib/formslib.php @@ -545,11 +545,11 @@ class moodleform { $buttonarray[] = &$mform->createElement('submit', 'submitbutton', $submitlabel); $buttonarray[] = &$mform->createElement('cancel'); $mform->addGroup($buttonarray, 'buttonar', '', array(' '), false); - $mform->closeHeaderBefore('buttonar'); + $mform->closeHeaderBefore('buttonar'); } else { //no group needed $mform->addElement('submit', 'submitbutton', $submitlabel); - $mform->closeHeaderBefore('submitbutton'); + $mform->closeHeaderBefore('submitbutton'); } } } diff --git a/lib/moodlelib.php b/lib/moodlelib.php index 42ee75403b..adac356401 100644 --- a/lib/moodlelib.php +++ b/lib/moodlelib.php @@ -2715,7 +2715,7 @@ function validate_internal_user_password(&$user, $password) { $validated = false; - // get password original encoding in case it was not updated to unicode yet + // get password original encoding in case it was not updated to unicode yet $textlib = textlib_get_instance(); $convpassword = $textlib->convert($password, 'utf-8', get_string('oldcharset')); diff --git a/lib/questionlib.php b/lib/questionlib.php index 2a4f19352f..a584b732b7 100644 --- a/lib/questionlib.php +++ b/lib/questionlib.php @@ -554,22 +554,22 @@ function question_delete_course($course, $feedback=true) { return true; } -function questionbank_navigation_tabs(&$row, $context, $courseid) { +function questionbank_navigation_tabs(&$row, $context, $querystring) { global $CFG; if (has_capability('moodle/question:manage', $context)) { - $row[] = new tabobject('questions', "$CFG->wwwroot/question/edit.php?courseid=$courseid", get_string('questions', 'quiz'), get_string('editquestions', "quiz")); + $row[] = new tabobject('questions', "$CFG->wwwroot/question/edit.php?$querystring", get_string('questions', 'quiz'), get_string('editquestions', "quiz")); } if (has_capability('moodle/question:managecategory', $context)) { - $row[] = new tabobject('categories', "$CFG->wwwroot/question/category.php?courseid=$courseid", get_string('categories', 'quiz'), get_string('editqcats', 'quiz')); + $row[] = new tabobject('categories', "$CFG->wwwroot/question/category.php?$querystring", get_string('categories', 'quiz'), get_string('editqcats', 'quiz')); } if (has_capability('moodle/question:import', $context)) { - $row[] = new tabobject('import', "$CFG->wwwroot/question/import.php?courseid=$courseid", get_string('import', 'quiz'), get_string('importquestions', 'quiz')); + $row[] = new tabobject('import', "$CFG->wwwroot/question/import.php?$querystring", get_string('import', 'quiz'), get_string('importquestions', 'quiz')); } if (has_capability('moodle/question:export', $context)) { - $row[] = new tabobject('export', "$CFG->wwwroot/question/export.php?courseid=$courseid", get_string('export', 'quiz'), get_string('exportquestions', 'quiz')); + $row[] = new tabobject('export', "$CFG->wwwroot/question/export.php?$querystring", get_string('export', 'quiz'), get_string('exportquestions', 'quiz')); } } @@ -1742,7 +1742,7 @@ function question_categorylist($categoryid) { * @return mixed category object or null if fails */ function create_category_path( $catpath, $delimiter='/', $courseid=0 ) { - $catpath = clean_param( $catpath,PARAM_PATH ); + $catpath = clean_param( $catpath,PARAM_PATH ); $catnames = explode( $delimiter, $catpath ); $parent = 0; $category = null; diff --git a/lib/weblib.php b/lib/weblib.php index bde9151aa8..d5c542e144 100644 --- a/lib/weblib.php +++ b/lib/weblib.php @@ -4089,11 +4089,11 @@ function print_textarea($usehtmleditor, $rows, $cols, $width, $height, $name, $v } $str .= ''."\n"; - if ($usehtmleditor) { + if ($usehtmleditor) { // Show shortcuts button if HTML editor is in use, but only if JavaScript is enabled (MDL-9556) - $str .= ''; - } + } if ($return) { return $str; @@ -5132,7 +5132,7 @@ function helpbutton ($page, $title='', $module='moodle', $image=true, $linktext= $linkobject .= $imagetext; } else { $linkobject .= ''.s(strip_tags($tooltip)).''; + $CFG->pixpath .'/help.gif" />'; } } else { $linkobject .= $tooltip; @@ -5193,7 +5193,7 @@ function editorshortcutshelpbutton() { global $CFG; $imagetext = ''.
-					get_string('editorshortcutkeys').''; + get_string('editorshortcutkeys').'" class="iconkbhelp" />'; return helpbutton('editorshortcuts', get_string('editorshortcutkeys'), 'moodle', true, false, '', true, $imagetext); } diff --git a/mod/choice/report.php b/mod/choice/report.php index 48e9e5dc4f..285bc3d92f 100644 --- a/mod/choice/report.php +++ b/mod/choice/report.php @@ -39,7 +39,7 @@ } if ($download <> "xls" and $download <> "txt" and $download <> "ods") { - + $crumbs[] = array('name' => $strchoices, 'link' => "index.php?id=$course->id", 'type' => 'activity'); $crumbs[] = array('name' => format_string($choice->name), 'link' => "view.php?id=$cm->id", 'type' => 'activityinstance'); $crumbs[] = array('name' => $strresponses, 'link' => '', 'type' => 'title'); diff --git a/mod/forum/lib.php b/mod/forum/lib.php index 35748cdd24..d0b05e3f16 100644 --- a/mod/forum/lib.php +++ b/mod/forum/lib.php @@ -1877,10 +1877,10 @@ function forum_subscribed_users($course, $forum, $groupid=0, $cache=false) { AND u.deleted <> 1 $groupselect ORDER BY u.email ASC"); } - // Guest user should never be subscribed to a forum. - if ($guest = guest_user()) { - unset($results[$guest->id]); - } + // Guest user should never be subscribed to a forum. + if ($guest = guest_user()) { + unset($results[$guest->id]); + } if ($cache) { $resultscache[$forum->id][$groupid] = $results; diff --git a/mod/forum/post.php b/mod/forum/post.php index 286c330f72..d36759dba9 100644 --- a/mod/forum/post.php +++ b/mod/forum/post.php @@ -135,7 +135,7 @@ } $coursecontext = get_context_instance(CONTEXT_COURSE, $course->id); - $modcontext = get_context_instance(CONTEXT_MODULE, $forum->id); + $modcontext = get_context_instance(CONTEXT_MODULE, $forum->id); if (! forum_user_can_post($forum)) { if (has_capability('moodle/legacy:guest', $coursecontext, NULL, false)) { // User is a guest here! @@ -151,8 +151,8 @@ if (groupmode($course, $cm)) { // Make sure user can post here $mygroupid = mygroupid($course->id); if (!((empty($mygroupid) and $discussion->groupid == -1) - || (ismember($discussion->groupid)/*$mygroupid == $discussion->groupid*/) - || has_capability('moodle/site:accessallgroups', $modcontext, NULL, false) )) { + || (ismember($discussion->groupid)/*$mygroupid == $discussion->groupid*/) + || has_capability('moodle/site:accessallgroups', $modcontext, NULL, false) )) { print_error('nopostdiscussion', 'forum'); } } diff --git a/mod/glossary/showentry.php b/mod/glossary/showentry.php index 6ab5512973..d3602beccb 100644 --- a/mod/glossary/showentry.php +++ b/mod/glossary/showentry.php @@ -49,7 +49,7 @@ $CFG->framename = "newwindow"; if ($course->id != SITEID) { - $crumbs[] = array('name' => $strglossaries, 'link' => '', 'type' => 'activity'); + $crumbs[] = array('name' => $strglossaries, 'link' => '', 'type' => 'activity'); $crumbs[] = array('name' => $strsearch, 'link' => '', 'type' => 'title'); $navigation = build_navigation($crumbs); diff --git a/mod/resource/type/ims/deploy.php b/mod/resource/type/ims/deploy.php index 96072862e9..c3895e3cdd 100644 --- a/mod/resource/type/ims/deploy.php +++ b/mod/resource/type/ims/deploy.php @@ -63,7 +63,7 @@ if ($inpopup) { print_header($pagetitle, $course->fullname); } else { - + $resource_obj->crumbs[] = array('name' => format_string($resource->name), 'link' => '', 'type' => 'activityinstance'); $resource_obj->crumbs[] = array('name' => $strdeploy, 'link' => '', 'type' => 'action'); $navigation = build_navigation($resource_obj->crumbs); diff --git a/mod/resource/type/ims/resource.class.php b/mod/resource/type/ims/resource.class.php index 930fb37505..d063cd740c 100644 --- a/mod/resource/type/ims/resource.class.php +++ b/mod/resource/type/ims/resource.class.php @@ -371,7 +371,7 @@ class resource_ims extends resource_base { if ($inpopup) { print_header($pagetitle, $course->fullname.' : '.$resource->name); } else { - + $this->crumbs[] = array('name' => format_string($resource->name), 'link' => '', 'type' => 'activityinstance'); $this->navigation = build_navigation($this->crumbs); @@ -473,7 +473,7 @@ class resource_ims extends resource_base { //print_header($pagetitle, $course->fullname.' : '.$resource->name); print_header(); } else { - $this->crumbs[] = array('name' => format_string($resource->name), 'link' => '', 'type' => 'activityinstance'); + $this->crumbs[] = array('name' => format_string($resource->name), 'link' => '', 'type' => 'activityinstance'); $this->navigation = build_navigation($this->crumbs); print_header($pagetitle, $course->fullname, $this->navigation, "", "", true, update_module_button($cm->id, $course->id, $this->strresource), navmenu($course, $cm, "parent")); } diff --git a/mod/wiki/view.php b/mod/wiki/view.php index ed09038a74..cbf94dd003 100644 --- a/mod/wiki/view.php +++ b/mod/wiki/view.php @@ -29,7 +29,7 @@ if(count($actions)==2) { $pagename=$actions[1]; } else { - $pagename=$actions[0]; + $pagename=$actions[0]; } } else { $actions=array(''); @@ -450,7 +450,7 @@ "; } } else { - // OK, the page is now locked to us. Put in the AJAX for keeping the lock + // OK, the page is now locked to us. Put in the AJAX for keeping the lock $strlockcancelled=get_string('lockcancelled','wiki'); $strnojslockwarning=get_string('nojslockwarning','wiki'); $intervalms=WIKI_LOCK_RECONFIRM*1000; diff --git a/question/format/hotpot/format.php b/question/format/hotpot/format.php index f13774a573..b08f0218a8 100644 --- a/question/format/hotpot/format.php +++ b/question/format/hotpot/format.php @@ -488,7 +488,7 @@ class qformat_hotpot extends qformat_default { return $this->hotpot_prepare_str($str); } function hotpot_prepare_str($str) { - // convert html entities to unicode and add slashes + // convert html entities to unicode and add slashes $str = preg_replace('/&#[x0-9A-F]+;/ie', "html_entity_decode('\\0',ENT_NOQUOTES,'UTF-8')", $str); return addslashes($str); } diff --git a/question/format/webct/format.php b/question/format/webct/format.php index 21e63f7c1f..af0f591ab0 100644 --- a/question/format/webct/format.php +++ b/question/format/webct/format.php @@ -517,11 +517,11 @@ class qformat_webct extends qformat_default { qformat_webct_convert_formula($webct_options[1]); // Default settings: - $question->fraction[$currentchoice] = 1.0; - $question->tolerance[$currentchoice] = 0.0; - $question->tolerancetype[$currentchoice] = 2; // nominal (units in webct) - $question->feedback[$currentchoice] = ''; - $question->correctanswerlength[$currentchoice] = 4; + $question->fraction[$currentchoice] = 1.0; + $question->tolerance[$currentchoice] = 0.0; + $question->tolerancetype[$currentchoice] = 2; // nominal (units in webct) + $question->feedback[$currentchoice] = ''; + $question->correctanswerlength[$currentchoice] = 4; $datasetnames = $QTYPES[CALCULATED]->find_dataset_names($webct_options[1]); foreach ($datasetnames as $datasetname) { -- 2.39.5