From 60a9a6ea67a878ac17c0d6dd60726cc0a35328e6 Mon Sep 17 00:00:00 2001 From: toyomoyo Date: Wed, 7 Feb 2007 07:34:53 +0000 Subject: [PATCH] fix for some of the MDL-8425 issues --- admin/auth.php | 10 +++---- admin/enrol.php | 4 ++- admin/modules.php | 3 ++- admin/uploaduser.php | 10 +++---- admin/user.php | 9 +++---- files/index.php | 63 ++++++++++++++++++++++++++++++++++---------- lib/adminlib.php | 32 +++++++++++----------- theme/index.php | 41 ++++++++++++++++------------ 8 files changed, 108 insertions(+), 64 deletions(-) diff --git a/admin/auth.php b/admin/auth.php index e092f8713e9..0b402978404 100644 --- a/admin/auth.php +++ b/admin/auth.php @@ -227,11 +227,11 @@ $guestoptions[1] = get_string("show"); echo '
'; print_heading(get_string('auth_common_settings', 'auth')); -echo ''; +echo '
'; // User self registration echo "\n"; -echo "\n"; echo "\n"; // Login as guest button enabled echo "\n"; -echo "\n"; echo "\n"; /// An alternate url for the login form. It means we can use login forms that are integrated /// into non-moodle pages echo "\n"; -echo "\n"; echo "
\n"; +echo "\n"; print_string("selfregistration", "auth"); echo ":\n"; @@ -243,7 +243,7 @@ echo "
\n"; +echo "\n"; print_string("guestloginbutton", "auth"); echo ":\n"; @@ -256,7 +256,7 @@ echo "
\n"; +echo "\n"; print_string('alternateloginurl', 'auth'); echo "\n"; @@ -272,7 +272,7 @@ echo "
\n"; //////////////////////////////////////////////////////////////////////////////// -echo '
'; +echo '
'; echo ''; admin_externalpage_print_footer($adminroot); diff --git a/admin/enrol.php b/admin/enrol.php index b90ea29a01a..7a3b4e9ab46 100644 --- a/admin/enrol.php +++ b/admin/enrol.php @@ -53,6 +53,7 @@ print_simple_box(get_string('configenrolmentplugins', 'admin'), 'center', '700'); echo "
frametarget id=\"enrolmenu\" method=\"post\" action=\"enrol.php\">"; + echo "
"; echo "sesskey."\" />"; $table = new stdClass(); @@ -97,7 +98,8 @@ print_table($table); - echo "
\n"; + echo "
\n"; + echo "
"; echo "
"; admin_externalpage_print_footer($adminroot); diff --git a/admin/modules.php b/admin/modules.php index 43d606cc975..a86eedc50d6 100644 --- a/admin/modules.php +++ b/admin/modules.php @@ -158,7 +158,8 @@ foreach ($modulebyname as $modulename => $module) { - $icon = "modpixpath/$module->name/icon.gif\" hspace=\"10\" class=\"icon\" alt=\"\" />"; + // took out hspace="\10\", because it does not validate. don't know what to replace with. + $icon = "modpixpath/$module->name/icon.gif\" class=\"icon\" alt=\"\" />"; $delete = "name&sesskey=$USER->sesskey\">$strdelete"; diff --git a/admin/uploaduser.php b/admin/uploaduser.php index d0113c9de1f..c8a4b3d9b42 100755 --- a/admin/uploaduser.php +++ b/admin/uploaduser.php @@ -374,13 +374,13 @@ print_heading_with_help($struploadusers, 'uploadusers'); $noyesoptions = array( get_string('no'), get_string('yes') ); $maxuploadsize = get_max_upload_file_size(); -echo '
'; -echo '
'. +echo '
'; +echo '
'. $strfile.' '. ''. ''; print_heading(get_string('settings')); -echo ''; +echo '
'; echo ''; echo '
' . get_string('passwordhandling', 'auth') . ''; $passwordopts = array( 0 => get_string('infilefield', 'auth'), 1 => get_string('createpasswordifneeded', 'auth'), @@ -397,8 +397,8 @@ choose_from_menu($noyesoptions, 'allowrenames', $allowrenames); echo '

'; echo ''; -echo '
'; -echo '
'; +echo '
'; +echo ''; admin_externalpage_print_footer($adminroot); diff --git a/admin/user.php b/admin/user.php index bd0305ced41..f543ad4d937 100644 --- a/admin/user.php +++ b/admin/user.php @@ -213,7 +213,7 @@ /// Bar of first initials - echo "

"; + echo "

"; echo get_string("firstname")." : "; if ($firstinitial) { echo " "; - echo "

"; print_paging_bar($usercount, $page, $perpage, "user.php?sort=$sort&dir=$dir&perpage=$perpage&firstinitial=$firstinitial&lastinitial=$lastinitial&search=".urlencode(stripslashes($search))."&"); @@ -395,14 +394,14 @@ echo "

"; } - echo "
"; - echo "
"; + echo "
"; + echo "
"; echo ""; echo ""; if ($search) { echo ""; } - echo ""; + echo "
"; echo "
"; if (has_capability('moodle/user:create', $sitecontext)) { diff --git a/files/index.php b/files/index.php index 1c6e43d1f13..a9c05745615 100644 --- a/files/index.php +++ b/files/index.php @@ -137,7 +137,7 @@ } - echo ""; + echo "
"; echo ""; echo "'; + echo ''; } function displaydir ($wdir) { @@ -704,15 +726,17 @@ function displaydir ($wdir) { echo ""; + echo "
"; echo ''; - echo "
"; + // echo "
"; + echo "
"; echo "
"; @@ -197,7 +197,8 @@ $strcancel = get_string("cancel"); echo "

$struploadafile ($strmaxsize) --> $wdir

"; - echo "
"; + echo ""; + echo "
"; echo "
"; echo ' '; echo " "; @@ -214,6 +215,7 @@ echo " "; echo " "; echo " "; + echo ""; echo ""; } html_footer(); @@ -317,6 +319,7 @@ echo "

$strrenamefileto:

"; echo "
"; echo "
"; + echo "
"; echo ' '; echo " "; echo " "; @@ -325,14 +328,17 @@ echo " sesskey\" />"; echo " "; echo " "; + echo "
"; echo "
"; echo "
"; echo "
"; + echo "
"; echo ' '; echo " "; echo " "; echo " "; echo " "; + echo "
"; echo "
"; echo "
"; } @@ -358,6 +364,7 @@ echo "

$strcreatefolder:

"; echo "
"; echo "
"; + echo "
"; echo ' '; echo " "; echo " "; @@ -365,14 +372,17 @@ echo " "; echo " sesskey\" />"; echo " "; + echo "
"; echo "
"; echo "
"; echo "
"; + echo "
"; echo ' '; echo " "; echo " "; echo " "; echo " "; + echo "
"; echo "
"; echo "
"; } @@ -405,6 +415,7 @@ echo "
"; echo "
"; + echo "
"; echo ' '; echo " "; echo " "; @@ -414,14 +425,17 @@ print_textarea($usehtmleditor, 25, 80, 680, 400, "text", $contents); echo "
"; echo " "; + echo ""; echo ""; echo ""; echo "
"; + echo "
"; echo ' '; echo " "; echo " "; echo " "; echo " "; + echo "
"; echo "
"; echo "
"; @@ -463,6 +477,7 @@ echo "

".get_string("whattocallzip")."

"; echo "
"; echo "
"; + echo "
"; echo ' '; echo " "; echo " "; @@ -470,14 +485,17 @@ echo " "; echo " sesskey\" />"; echo " "; + echo "
"; echo ""; echo "
"; echo "
"; + echo "
"; echo ' '; echo " "; echo " "; echo " "; echo " "; + echo "
"; echo "
"; echo "
"; } else { @@ -502,14 +520,16 @@ error(get_string("unzipfileserror","error")); } - echo "
"; + echo "
"; + echo "
"; echo ' '; echo " "; echo " "; echo " "; echo " "; + echo "
"; echo ""; - echo "
"; + echo ""; } else { displaydir($wdir); } @@ -551,11 +571,13 @@ echo "
"; } echo "
"; + echo "
"; echo ' '; echo " "; echo " "; echo " "; echo " "; + echo "
"; echo "
"; echo "
"; } else { @@ -652,7 +674,7 @@ function print_cell($alignment='center', $text=' ', $class='') { if ($class) { $class = ' class="'.$class.'"'; } - echo '
'.$text.''.$text.'
"; echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; echo "\n"; if ($wdir != "/") { @@ -772,7 +796,7 @@ function displaydir ($wdir) { echo ""; print_cell("center", "", 'checkbox'); - echo "
$strname$strsize$strmodified$straction$strname$strsize$strmodified$straction
"; + echo ""; if ($CFG->slasharguments) { $ffurl = str_replace('//', '/', "/file.php/$id/$fileurl"); } else { @@ -810,7 +834,8 @@ function displaydir ($wdir) { } } echo "
"; - echo "
"; + echo "
"; + //echo "
"; echo ""; echo "
"; @@ -827,46 +852,56 @@ function displaydir ($wdir) { choose_from_menu ($options, "action", "", "$strwithchosenfiles...", "javascript:getElementById('dirform').submit()"); } echo "
"; + echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo "
"; if (!empty($USER->fileop) and ($USER->fileop == "move") and ($USER->filesource <> $wdir)) { echo "
"; + echo "
"; echo ' '; echo " "; echo " "; echo " "; echo " sesskey\" />"; echo " "; + echo "
"; echo "
"; } echo "
"; echo "
"; + echo "
"; echo ' '; echo " "; echo " "; echo " "; echo " "; + echo "
"; echo "
"; echo "
"; echo "
"; //dummy form - alignment only + echo "
"; echo " "; echo " "; + echo "
"; echo "
"; echo "
"; echo "
"; + echo "
"; echo ' '; echo " "; echo " "; echo " "; echo " "; + echo "
"; echo "
"; echo "
"; - echo "
"; + echo "
"; + //echo "
"; } diff --git a/lib/adminlib.php b/lib/adminlib.php index 92a91ae817c..3d1c7a4b16a 100644 --- a/lib/adminlib.php +++ b/lib/adminlib.php @@ -1934,7 +1934,7 @@ class admin_setting_special_editorfontlist extends admin_setting { $return .= ''; $return .= ''; - return format_admin_setting($this->name, $this->visiblename, $return, $this->description); + return format_admin_setting($this->name, $this->visiblename, $return, $this->description, false); } } @@ -2120,7 +2120,7 @@ class admin_setting_special_editorhidebuttons extends admin_setting { $return .= '
'; $return .= ''; - return format_admin_setting($this->name, $this->visiblename, $return, $this->description); + return format_admin_setting($this->name, $this->visiblename, $return, $this->description, false); } } @@ -2259,20 +2259,20 @@ class admin_setting_special_backupdays extends admin_setting { $currentsetting = $currentsetting['u'] . $currentsetting['m'] . $currentsetting['t'] . $currentsetting['w'] . $currentsetting['r'] . $currentsetting['f'] . $currentsetting['s']; - $return = '' . - '' . - '' . - '' . - '' . - '' . - '' . - '' . + $return = '
  ' . get_string('sunday', 'calendar') . '  
  ' . - get_string('monday', 'calendar') . '  
  ' . get_string('tuesday', 'calendar') . '  
  ' . - get_string('wednesday', 'calendar') . '  
  ' . get_string('thursday', 'calendar') . '  
  ' . - get_string('friday', 'calendar') . '  
  ' . get_string('saturday', 'calendar') . '  
' . + '' . + '' . + '' . + '' . + '' . + '' . + '' . '
  ' . get_string('sunday', 'calendar') . '  
  ' . + get_string('monday', 'calendar') . '  
  ' . get_string('tuesday', 'calendar') . '  
  ' . + get_string('wednesday', 'calendar') . '  
  ' . get_string('thursday', 'calendar') . '  
  ' . + get_string('friday', 'calendar') . '  
  ' . get_string('saturday', 'calendar') . '  
'; - return format_admin_setting($this->name, $this->visiblename, $return, $this->description); + return format_admin_setting($this->name, $this->visiblename, $return, $this->description, false); } @@ -2462,7 +2462,7 @@ class admin_setting_special_gradebookroles extends admin_setting { $return .= ''; } - return format_admin_setting($this->name, $this->visiblename, $return, $this->description); + return format_admin_setting($this->name, $this->visiblename, $return, $this->description, false); } @@ -2537,7 +2537,7 @@ class admin_setting_special_coursemanager extends admin_setting { } $return .= ''; } - return format_admin_setting($this->name, $this->visiblename, $return, $this->description); + return format_admin_setting($this->name, $this->visiblename, $return, $this->description, false); } } diff --git a/theme/index.php b/theme/index.php index ff0cb698f68..cfebb4b53ce 100644 --- a/theme/index.php +++ b/theme/index.php @@ -50,7 +50,7 @@ } } - admin_externalpage_print_header('themeselector'); + admin_externalpage_print_header('themeselector'); print_heading($strthemes); @@ -58,8 +58,12 @@ $themes = get_list_of_plugins("theme"); $sesskey = !empty($USER->id) ? $USER->sesskey : ''; - echo ""; - echo ""; + echo "
$strtheme$strinfo
"; + + if (!$USER->screenreader) { + echo ""; + echo ""; + } foreach ($themes as $theme) { unset($THEME); @@ -88,16 +92,18 @@ } echo ""; - echo ""; - } else { - echo ""; + + // no point showing this if user is using screen reader + if (!$USER->screenreader) { + echo ""; + } else { + echo ""; + } } - if ($CFG->theme == $theme) { echo '
$strtheme$strinfo
"; - - if ($screenshotpath) { - $screenshot = "
  • $strscreenshot
  • "; - echo "
    "; + if ($screenshotpath) { + $screenshot = "
  • $strscreenshot
  • "; + echo "
    '; } else { @@ -109,14 +115,15 @@ } else { echo '

    '.$theme.' (Moodle 1.4)

    '; } - - echo '
      '; - + if ($screenshot or $readme) { - echo "
    • $strpreview
    • "; + echo '
        '; + if (!$USER->screenreader) { + echo "
      • $strpreview
      • "; + } + echo $screenshot.$readme; + echo '
      '; } - echo $screenshot.$readme; - echo '
    '; $options = null; $options['choose'] = $theme;