MDL-9742 - changed tabs to spaces in a few places where there are one

or two
This commit is contained in:
poltawski 2007-05-08 15:07:25 +00:00
parent 3ef1be377b
commit a044c05ddb
24 changed files with 85 additions and 85 deletions

View file

@ -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. $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 // 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()) { if ($this->section != 'search' and $this->user_allowed_editing()) {
$buttons = '<div><form '.$CFG->frametarget.' method="get" action="' . $this->url_get_path() . '">'. $buttons = '<div><form '.$CFG->frametarget.' method="get" action="' . $this->url_get_path() . '">'.
'<div><input type="hidden" name="adminedit" value="'.($this->user_is_editing()?'off':'on').'" />'. '<div><input type="hidden" name="adminedit" value="'.($this->user_is_editing()?'off':'on').'" />'.
'<input type="hidden" name="section" value="'.$this->section.'" />'. '<input type="hidden" name="section" value="'.$this->section.'" />'.
'<input type="submit" value="'.get_string($this->user_is_editing()?'blockseditoff':'blocksediton').'" /></div></form></div>'; '<input type="submit" value="'.get_string($this->user_is_editing()?'blockseditoff':'blocksediton').'" /></div></form></div>';
} else { } else {
$buttons = '&nbsp;'; $buttons = '&nbsp;';
} }
print_header("$SITE->shortname: " . implode(": ",$this->visiblepathtosection), $SITE->fullname, print_header("$SITE->shortname: " . implode(": ",$this->visiblepathtosection), $SITE->fullname,
implode(" -> ",$this->visiblepathtosection),'', '', true, $buttons, ''); implode(" -> ",$this->visiblepathtosection),'', '', true, $buttons, '');
} }
function get_type() { function get_type() {

View file

@ -149,8 +149,8 @@ class auth_plugin_shibboleth extends auth_plugin_base {
function loginpage_hook() { function loginpage_hook() {
global $SESSION, $CFG; global $SESSION, $CFG;
// Prevent username from being shown on login page after logout // Prevent username from being shown on login page after logout
$CFG->nolastloggedin = true; $CFG->nolastloggedin = true;
return; return;
} }

View file

@ -262,13 +262,13 @@ class block_base {
//Accessibility: added static 'alt' text for the +- icon. //Accessibility: added static 'alt' text for the +- icon.
//TODO (nfreear): language string 'hide OR show block' //TODO (nfreear): language string 'hide OR show block'
$title .= '<div class="hide-show">'. $title .= '<div class="hide-show">'.
'<a title="'.get_string('showhideblock','access'). '<a title="'.get_string('showhideblock','access').
'" href="#" onclick="elementToggleHide(this, true, function(el) {'. '" href="#" onclick="elementToggleHide(this, true, function(el) {'.
'return findParentNode(el, \'DIV\', \'sideblock\'); '. 'return findParentNode(el, \'DIV\', \'sideblock\'); '.
'}, \''.$CFG->pixpath.'\' ); return false;">'. '}, \''.$CFG->pixpath.'\' ); return false;">'.
'<img src="'.$CFG->pixpath.'/spacer.gif" '. '<img src="'.$CFG->pixpath.'/spacer.gif" '.
'id = "togglehide_inst'.$this->instance->id.'" '. 'id = "togglehide_inst'.$this->instance->id.'" '.
'alt="'.get_string('showhideblock','access').'" class="hide-show-image" /></a></div>'; 'alt="'.get_string('showhideblock','access').'" class="hide-show-image" /></a></div>';
} }
//Accesssibility: added H2 (was in, weblib.php: print_side_block) //Accesssibility: added H2 (was in, weblib.php: print_side_block)

View file

@ -134,14 +134,14 @@ if (!$course = get_record('course', 'id', $courseid)) {
case 'group': case 'group':
if ($thisgroup = groups_get_group($filterselect, false)) { //TODO: if ($thisgroup = groups_get_group($filterselect, false)) { //TODO:
if ($tagid || !empty($tag)) { if ($tagid || !empty($tag)) {
print_header("$course->shortname: $blogstring", $course->fullname, print_header("$course->shortname: $blogstring", $course->fullname,
'<a href="'.$CFG->wwwroot.'/user/index.php?id='.$course->id.'&amp;group='.$filterselect.'">'.$thisgroup->name.'</a> -> '<a href="'.$CFG->wwwroot.'/user/index.php?id='.$course->id.'&amp;group='.$filterselect.'">'.$thisgroup->name.'</a> ->
<a href="index.php?filtertype=group&amp;filterselect='.$filterselect.'">'. "$blogstring</a> -> $tagstring: $taginstance->text",'','',true,$PAGE->get_extra_header_string()); <a href="index.php?filtertype=group&amp;filterselect='.$filterselect.'">'. "$blogstring</a> -> $tagstring: $taginstance->text",'','',true,$PAGE->get_extra_header_string());
} else { } else {
print_header("$course->shortname: $blogstring", $course->fullname, print_header("$course->shortname: $blogstring", $course->fullname,
'<a href="'.$CFG->wwwroot.'/user/index.php?id='.$course->id.'&amp;group='.$filterselect.'">'.$thisgroup->name."</a> -> '<a href="'.$CFG->wwwroot.'/user/index.php?id='.$course->id.'&amp;group='.$filterselect.'">'.$thisgroup->name."</a> ->
$blogstring",'','',true,$PAGE->get_extra_header_string()); $blogstring",'','',true,$PAGE->get_extra_header_string());
} }
} else { } else {
print_error('Unable to find group'); print_error('Unable to find group');

View file

@ -2542,7 +2542,7 @@ function get_section_name($format) {
if($sectionname == "[[name$format]]") { if($sectionname == "[[name$format]]") {
$sectionname = get_string("name$format"); $sectionname = get_string("name$format");
} }
return $sectionname; return $sectionname;
} }
/** /**

View file

@ -256,10 +256,10 @@
} }
// checks whether user can do role assignment // checks whether user can do role assignment
if (has_capability('moodle/role:assign', $coursecontext)) { if (has_capability('moodle/role:assign', $coursecontext)) {
echo'<a title="'.get_string('assignroles', 'role').'" href="'.$CFG->wwwroot.'/'.$CFG->admin.'/roles/assign.php?contextid='.$coursecontext->id.'">'; echo'<a title="'.get_string('assignroles', 'role').'" href="'.$CFG->wwwroot.'/'.$CFG->admin.'/roles/assign.php?contextid='.$coursecontext->id.'">';
echo '<img src="'.$CFG->pixpath.'/i/roles.gif" class="iconsmall" alt="'.get_string('assignroles', 'role').'" /></a> ' . "\n"; echo '<img src="'.$CFG->pixpath.'/i/roles.gif" class="iconsmall" alt="'.get_string('assignroles', 'role').'" /></a> ' . "\n";
} }
// checks whether user can delete course // checks whether user can delete course
if (has_capability('moodle/course:delete', $coursecontext)) { if (has_capability('moodle/course:delete', $coursecontext)) {

View file

@ -35,23 +35,23 @@ function xmldb_enrol_authorize_upgrade($oldversion=0) {
if ($result && $oldversion < 2006112900) { if ($result && $oldversion < 2006112900) {
if (isset($CFG->an_login)) { if (isset($CFG->an_login)) {
if (empty($CFG->an_login)) { if (empty($CFG->an_login)) {
unset_config('an_login'); unset_config('an_login');
} }
else { 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 (isset($CFG->an_tran_key)) {
if (empty($CFG->an_tran_key)) { if (empty($CFG->an_tran_key)) {
unset_config('an_tran_key'); unset_config('an_tran_key');
} }
else { 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 (isset($CFG->an_password)) {
if (empty($CFG->an_password)) { if (empty($CFG->an_password)) {
unset_config('an_password'); unset_config('an_password');
} }
else { else {
$result = $result && set_config('an_password', rc4encrypt($CFG->an_password), 'enrol/authorize') && unset_config('an_password'); $result = $result && set_config('an_password', rc4encrypt($CFG->an_password), 'enrol/authorize') && unset_config('an_password');

View file

@ -717,14 +717,14 @@ $moodle_capabilities = array(
'moodle/user:editprofile' => array( 'moodle/user:editprofile' => array(
'riskbitmask' => RISK_SPAM, 'riskbitmask' => RISK_SPAM,
'captype' => 'write', 'captype' => 'write',
'contextlevel' => CONTEXT_USER, 'contextlevel' => CONTEXT_USER,
'legacy' => array( 'legacy' => array(
'admin' => CAP_ALLOW 'admin' => CAP_ALLOW
) )
), ),
'moodle/user:editownprofile' => array( 'moodle/user:editownprofile' => array(

View file

@ -134,8 +134,8 @@ class MoodleQuickForm_date_time_selector extends MoodleQuickForm_group{
if (!is_array($value)) { if (!is_array($value)) {
$currentdate = usergetdate($value); $currentdate = usergetdate($value);
$value = array( $value = array(
'minute' => $currentdate['minutes'], 'minute' => $currentdate['minutes'],
'hour' => $currentdate['hours'], 'hour' => $currentdate['hours'],
'day' => $currentdate['mday'], 'day' => $currentdate['mday'],
'month' => $currentdate['mon'], 'month' => $currentdate['mon'],
'year' => $currentdate['year']); 'year' => $currentdate['year']);

View file

@ -545,11 +545,11 @@ class moodleform {
$buttonarray[] = &$mform->createElement('submit', 'submitbutton', $submitlabel); $buttonarray[] = &$mform->createElement('submit', 'submitbutton', $submitlabel);
$buttonarray[] = &$mform->createElement('cancel'); $buttonarray[] = &$mform->createElement('cancel');
$mform->addGroup($buttonarray, 'buttonar', '', array(' '), false); $mform->addGroup($buttonarray, 'buttonar', '', array(' '), false);
$mform->closeHeaderBefore('buttonar'); $mform->closeHeaderBefore('buttonar');
} else { } else {
//no group needed //no group needed
$mform->addElement('submit', 'submitbutton', $submitlabel); $mform->addElement('submit', 'submitbutton', $submitlabel);
$mform->closeHeaderBefore('submitbutton'); $mform->closeHeaderBefore('submitbutton');
} }
} }
} }

View file

@ -2715,7 +2715,7 @@ function validate_internal_user_password(&$user, $password) {
$validated = false; $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(); $textlib = textlib_get_instance();
$convpassword = $textlib->convert($password, 'utf-8', get_string('oldcharset')); $convpassword = $textlib->convert($password, 'utf-8', get_string('oldcharset'));

View file

@ -554,22 +554,22 @@ function question_delete_course($course, $feedback=true) {
return true; return true;
} }
function questionbank_navigation_tabs(&$row, $context, $courseid) { function questionbank_navigation_tabs(&$row, $context, $querystring) {
global $CFG; global $CFG;
if (has_capability('moodle/question:manage', $context)) { 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)) { 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)) { 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)) { 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 * @return mixed category object or null if fails
*/ */
function create_category_path( $catpath, $delimiter='/', $courseid=0 ) { function create_category_path( $catpath, $delimiter='/', $courseid=0 ) {
$catpath = clean_param( $catpath,PARAM_PATH ); $catpath = clean_param( $catpath,PARAM_PATH );
$catnames = explode( $delimiter, $catpath ); $catnames = explode( $delimiter, $catpath );
$parent = 0; $parent = 0;
$category = null; $category = null;

View file

@ -4089,11 +4089,11 @@ function print_textarea($usehtmleditor, $rows, $cols, $width, $height, $name, $v
} }
$str .= '</textarea>'."\n"; $str .= '</textarea>'."\n";
if ($usehtmleditor) { if ($usehtmleditor) {
// Show shortcuts button if HTML editor is in use, but only if JavaScript is enabled (MDL-9556) // Show shortcuts button if HTML editor is in use, but only if JavaScript is enabled (MDL-9556)
$str .= '<script type="text/javascript">document.write(\''. $str .= '<script type="text/javascript">document.write(\''.
str_replace('\'','\\\'',editorshortcutshelpbutton()).'\'); </script>'; str_replace('\'','\\\'',editorshortcutshelpbutton()).'\'); </script>';
} }
if ($return) { if ($return) {
return $str; return $str;
@ -5132,7 +5132,7 @@ function helpbutton ($page, $title='', $module='moodle', $image=true, $linktext=
$linkobject .= $imagetext; $linkobject .= $imagetext;
} else { } else {
$linkobject .= '<img class="iconhelp" alt="'.s(strip_tags($tooltip)).'" src="'. $linkobject .= '<img class="iconhelp" alt="'.s(strip_tags($tooltip)).'" src="'.
$CFG->pixpath .'/help.gif" />'; $CFG->pixpath .'/help.gif" />';
} }
} else { } else {
$linkobject .= $tooltip; $linkobject .= $tooltip;
@ -5193,7 +5193,7 @@ function editorshortcutshelpbutton() {
global $CFG; global $CFG;
$imagetext = '<img src="' . $CFG->httpswwwroot . '/lib/editor/htmlarea/images/kbhelp.gif" alt="'. $imagetext = '<img src="' . $CFG->httpswwwroot . '/lib/editor/htmlarea/images/kbhelp.gif" alt="'.
get_string('editorshortcutkeys').'" class="iconkbhelp" />'; get_string('editorshortcutkeys').'" class="iconkbhelp" />';
return helpbutton('editorshortcuts', get_string('editorshortcutkeys'), 'moodle', true, false, '', true, $imagetext); return helpbutton('editorshortcuts', get_string('editorshortcutkeys'), 'moodle', true, false, '', true, $imagetext);
} }

View file

@ -1877,10 +1877,10 @@ function forum_subscribed_users($course, $forum, $groupid=0, $cache=false) {
AND u.deleted <> 1 $groupselect AND u.deleted <> 1 $groupselect
ORDER BY u.email ASC"); ORDER BY u.email ASC");
} }
// Guest user should never be subscribed to a forum. // Guest user should never be subscribed to a forum.
if ($guest = guest_user()) { if ($guest = guest_user()) {
unset($results[$guest->id]); unset($results[$guest->id]);
} }
if ($cache) { if ($cache) {
$resultscache[$forum->id][$groupid] = $results; $resultscache[$forum->id][$groupid] = $results;

View file

@ -135,7 +135,7 @@
} }
$coursecontext = get_context_instance(CONTEXT_COURSE, $course->id); $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 (! forum_user_can_post($forum)) {
if (has_capability('moodle/legacy:guest', $coursecontext, NULL, false)) { // User is a guest here! 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 if (groupmode($course, $cm)) { // Make sure user can post here
$mygroupid = mygroupid($course->id); $mygroupid = mygroupid($course->id);
if (!((empty($mygroupid) and $discussion->groupid == -1) if (!((empty($mygroupid) and $discussion->groupid == -1)
|| (ismember($discussion->groupid)/*$mygroupid == $discussion->groupid*/) || (ismember($discussion->groupid)/*$mygroupid == $discussion->groupid*/)
|| has_capability('moodle/site:accessallgroups', $modcontext, NULL, false) )) { || has_capability('moodle/site:accessallgroups', $modcontext, NULL, false) )) {
print_error('nopostdiscussion', 'forum'); print_error('nopostdiscussion', 'forum');
} }
} }

View file

@ -49,7 +49,7 @@
$CFG->framename = "newwindow"; $CFG->framename = "newwindow";
if ($course->id != SITEID) { 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'); $crumbs[] = array('name' => $strsearch, 'link' => '', 'type' => 'title');
$navigation = build_navigation($crumbs); $navigation = build_navigation($crumbs);

View file

@ -473,7 +473,7 @@ class resource_ims extends resource_base {
//print_header($pagetitle, $course->fullname.' : '.$resource->name); //print_header($pagetitle, $course->fullname.' : '.$resource->name);
print_header(); print_header();
} else { } 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); $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")); print_header($pagetitle, $course->fullname, $this->navigation, "", "", true, update_module_button($cm->id, $course->id, $this->strresource), navmenu($course, $cm, "parent"));
} }

View file

@ -29,7 +29,7 @@
if(count($actions)==2) { if(count($actions)==2) {
$pagename=$actions[1]; $pagename=$actions[1];
} else { } else {
$pagename=$actions[0]; $pagename=$actions[0];
} }
} else { } else {
$actions=array(''); $actions=array('');
@ -450,7 +450,7 @@
"; ";
} }
} else { } 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'); $strlockcancelled=get_string('lockcancelled','wiki');
$strnojslockwarning=get_string('nojslockwarning','wiki'); $strnojslockwarning=get_string('nojslockwarning','wiki');
$intervalms=WIKI_LOCK_RECONFIRM*1000; $intervalms=WIKI_LOCK_RECONFIRM*1000;

View file

@ -488,7 +488,7 @@ class qformat_hotpot extends qformat_default {
return $this->hotpot_prepare_str($str); return $this->hotpot_prepare_str($str);
} }
function 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); $str = preg_replace('/&#[x0-9A-F]+;/ie', "html_entity_decode('\\0',ENT_NOQUOTES,'UTF-8')", $str);
return addslashes($str); return addslashes($str);
} }

View file

@ -517,11 +517,11 @@ class qformat_webct extends qformat_default {
qformat_webct_convert_formula($webct_options[1]); qformat_webct_convert_formula($webct_options[1]);
// Default settings: // Default settings:
$question->fraction[$currentchoice] = 1.0; $question->fraction[$currentchoice] = 1.0;
$question->tolerance[$currentchoice] = 0.0; $question->tolerance[$currentchoice] = 0.0;
$question->tolerancetype[$currentchoice] = 2; // nominal (units in webct) $question->tolerancetype[$currentchoice] = 2; // nominal (units in webct)
$question->feedback[$currentchoice] = ''; $question->feedback[$currentchoice] = '';
$question->correctanswerlength[$currentchoice] = 4; $question->correctanswerlength[$currentchoice] = 4;
$datasetnames = $QTYPES[CALCULATED]->find_dataset_names($webct_options[1]); $datasetnames = $QTYPES[CALCULATED]->find_dataset_names($webct_options[1]);
foreach ($datasetnames as $datasetname) { foreach ($datasetnames as $datasetname) {