]> git.mjollnir.org Git - moodle.git/commitdiff
fix for some of the MDL-8425 issues
authortoyomoyo <toyomoyo>
Wed, 7 Feb 2007 07:34:53 +0000 (07:34 +0000)
committertoyomoyo <toyomoyo>
Wed, 7 Feb 2007 07:34:53 +0000 (07:34 +0000)
admin/auth.php
admin/enrol.php
admin/modules.php
admin/uploaduser.php
admin/user.php
files/index.php
lib/adminlib.php
theme/index.php

index e092f8713e9dfccb087d947b45b25d23f92af1b1..0b4029784041ad9753ffc5fccf3e3819921cc6d6 100644 (file)
@@ -227,11 +227,11 @@ $guestoptions[1] = get_string("show");
 
 echo '<hr />';
 print_heading(get_string('auth_common_settings', 'auth'));
-echo '<table cellspacing="0" cellpadding="5" border="0" align="center">';
+echo '<table cellspacing="0" cellpadding="5" border="0" style="margin-left:auto;margin-right:auto">';
 
 // User self registration
 echo "<tr valign=\"top\">\n";
-echo "<td align=\"right\" nowrap=\"nowrap\">\n";
+echo "<td align=\"right\" style=\"white-space:nowrap\">\n";
 print_string("selfregistration", "auth");
 echo ":</td>\n";
 echo "<td>\n";
@@ -243,7 +243,7 @@ echo "</td></tr>\n";
 
 // Login as guest button enabled
 echo "<tr valign=\"top\">\n";
-echo "<td align=\"right\" nowrap=\"nowrap\">\n";
+echo "<td style=\"white-space:nowrap;text-align:right\">\n";
 print_string("guestloginbutton", "auth");
 echo ":</td>\n";
 echo "<td>\n";
@@ -256,7 +256,7 @@ echo "</td></tr>\n";
 /// An alternate url for the login form. It means we can use login forms that are integrated
 /// into non-moodle pages
 echo "<tr valign=\"top\">\n";
-echo "<td algin=\"right\" nowrap=\"nowrap\">\n";
+echo "<td algin=\"right\" style=\"white-space:nowrap\">\n";
 print_string('alternateloginurl', 'auth');
 echo "</td>\n";
 echo "<td>\n";
@@ -272,7 +272,7 @@ echo "</table>\n";
 ////////////////////////////////////////////////////////////////////////////////
 
 
-echo '<center><input type="submit" value="'.get_string('savechanges').'" /></center>';
+echo '<div style="text-align:center"><input type="submit" value="'.get_string('savechanges').'" /></div>';
 echo '</form>';
 admin_externalpage_print_footer($adminroot);
 
index b90ea29a01a6ce4d5c3b3321d2013a300a72d93b..7a3b4e9ab46b76cb15725aeaf9cd06a4afa26f30 100644 (file)
@@ -53,6 +53,7 @@
     print_simple_box(get_string('configenrolmentplugins', 'admin'), 'center', '700');
 
     echo "<form $CFG->frametarget id=\"enrolmenu\" method=\"post\" action=\"enrol.php\">";
+    echo "<div>";
     echo "<input type=\"hidden\" name=\"sesskey\" value=\"".$USER->sesskey."\" />";
 
     $table = new stdClass();
@@ -97,7 +98,8 @@
 
     print_table($table);
 
-    echo "<center><input type=\"submit\" value=\"".get_string("savechanges")."\" /></center>\n";
+    echo "<div style=\"text-align:center\"><input type=\"submit\" value=\"".get_string("savechanges")."\" /></div>\n";
+    echo "</div>";
     echo "</form>";
 
     admin_externalpage_print_footer($adminroot);
index 43d606cc97599d8c4f5ec3236c2117908b71c47e..a86eedc50d6693047412c7365b7a63f67045fd58 100644 (file)
 
     foreach ($modulebyname as $modulename => $module) {
 
-        $icon = "<img src=\"$CFG->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 = "<img src=\"$CFG->modpixpath/$module->name/icon.gif\" class=\"icon\" alt=\"\" />";
 
         $delete = "<a href=\"modules.php?delete=$module->name&amp;sesskey=$USER->sesskey\">$strdelete</a>";
 
index d0113c9de1f0e4fde8acddda2d023a1ce87552cb..c8a4b3d9b422b89e9be7544f8752b9be9fdca672 100755 (executable)
@@ -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 '<center>';
-echo '<form method="post" enctype="multipart/form-data" action="uploaduser.php">'.
+echo '<div style="text-align:center">';
+echo '<form method="post" enctype="multipart/form-data" action="uploaduser.php"><div>'.
 $strfile.'&nbsp;<input type="hidden" name="MAX_FILE_SIZE" value="'.$maxuploadsize.'" />'.
 '<input type="hidden" name="sesskey" value="'.$USER->sesskey.'" />'.
 '<input type="file" name="userfile" size="30" />';
 print_heading(get_string('settings'));
-echo '<table>';
+echo '<table style="margin-left:auto;margin-right:auto">';
 echo '<tr><td>' . get_string('passwordhandling', 'auth') . '</td><td>';
 $passwordopts = array( 0 => get_string('infilefield', 'auth'),
         1 => get_string('createpasswordifneeded', 'auth'),
@@ -397,8 +397,8 @@ choose_from_menu($noyesoptions, 'allowrenames', $allowrenames);
 echo '</td></tr>';
 echo '</table><br />';
 echo '<input type="submit" value="'.$struploadusers.'" />';
-echo '</form><br />';
-echo '</center>';
+echo '</div></form><br />';
+echo '</div>';
 
 admin_externalpage_print_footer($adminroot);
 
index bd0305ced419fa2ec01e8ce7443d9cf5c560190d..f543ad4d937c8737cc84a4ddc6b824b718841cfc 100644 (file)
 
     /// Bar of first initials
 
-    echo "<center><p align=\"center\">";
+    echo "<p style=\"text-align:center\">";
     echo get_string("firstname")." : ";
     if ($firstinitial) {
         echo " <a href=\"user.php?sort=firstname&amp;dir=ASC&amp;".
         }
     }
     echo "</p>";
-    echo "</center>";
 
     print_paging_bar($usercount, $page, $perpage,
             "user.php?sort=$sort&amp;dir=$dir&amp;perpage=$perpage&amp;firstinitial=$firstinitial&amp;lastinitial=$lastinitial&amp;search=".urlencode(stripslashes($search))."&amp;");
         echo "</p>";
     }
 
-    echo "<table class=\"searchbox\" align=\"center\" cellpadding=\"10\"><tr><td>";
-    echo "<form action=\"user.php\" method=\"get\">";
+    echo "<table class=\"searchbox\" style=\"margin-left:auto;margin-right:auto\" cellpadding=\"10\"><tr><td>";
+    echo "<form action=\"user.php\" method=\"get\"><fieldset class=\"invisiblefieldset\">";
     echo "<input type=\"text\" name=\"search\" value=\"".s($search, true)."\" size=\"20\" />";
     echo "<input type=\"submit\" value=\"$strsearch\" />";
     if ($search) {
         echo "<input type=\"button\" onclick=\"document.location='user.php';\" value=\"$strshowallusers\" />";
     }
-    echo "</form>";
+    echo "</fieldset></form>";
     echo "</td></tr></table>";
 
     if (has_capability('moodle/user:create', $sitecontext)) {
index 1c6e43d1f13ef1a7ab957da303c49bbf157513e3..a9c057456155204096d830653e869121a6ee303b 100644 (file)
         }
 
 
-        echo "<table border=\"0\" align=\"center\" cellspacing=\"3\" cellpadding=\"3\" width=\"640\">";
+        echo "<table border=\"0\" style=\"margin-left:auto;margin-right:auto\" cellspacing=\"3\" cellpadding=\"3\" width=\"640\">";
         echo "<tr>";
         echo "<td colspan=\"2\">";
 
                 $strcancel = get_string("cancel");
 
                 echo "<p>$struploadafile ($strmaxsize) --> <b>$wdir</b></p>";
-                echo "<form enctype=\"multipart/form-data\" method=\"post\" action=\"index.php\">";                
+                echo "<form enctype=\"multipart/form-data\" method=\"post\" action=\"index.php\">";
+                echo "<div>";             
                 echo "<table><tr><td colspan=\"2\">";
                 echo ' <input type="hidden" name="choose" value="'.$choose.'" />';
                 echo " <input type=\"hidden\" name=\"id\" value=\"$id\" />";
                 echo " <input type=\"hidden\" name=\"wdir\" value=\"$wdir\" />";
                 echo " <input type=\"hidden\" name=\"action\" value=\"cancel\" />";
                 echo " <input type=\"submit\" value=\"$strcancel\" />";
+                echo "</div>";
                 echo "</form>";
             }
             html_footer();
                 echo "<p>$strrenamefileto:</p>";
                 echo "<table><tr><td>";
                 echo "<form action=\"index.php\" method=\"post\">";
+                echo "<fieldset class=\"invisiblefieldset\">";
                 echo ' <input type="hidden" name="choose" value="'.$choose.'" />';
                 echo " <input type=\"hidden\" name=\"id\" value=\"$id\" />";
                 echo " <input type=\"hidden\" name=\"wdir\" value=\"$wdir\" />";
                 echo " <input type=\"hidden\" name=\"sesskey\" value=\"$USER->sesskey\" />";
                 echo " <input type=\"text\" name=\"name\" size=\"35\" value=\"$file\" />";
                 echo " <input type=\"submit\" value=\"$strrename\" />";
+                echo "</fieldset>";
                 echo "</form>";
                 echo "</td><td>";
                 echo "<form action=\"index.php\" method=\"get\">";
+                echo "<fieldset class=\"invisiblefieldset\">";
                 echo ' <input type="hidden" name="choose" value="'.$choose.'" />';
                 echo " <input type=\"hidden\" name=\"id\" value=\"$id\" />";
                 echo " <input type=\"hidden\" name=\"wdir\" value=\"$wdir\" />";
                 echo " <input type=\"hidden\" name=\"action\" value=\"cancel\" />";
                 echo " <input type=\"submit\" value=\"$strcancel\" />";
+                echo "</fieldset>";
                 echo "</form>";
                 echo "</td></tr></table>";
             }
                 echo "<p>$strcreatefolder:</p>";
                 echo "<table><tr><td>";
                 echo "<form action=\"index.php\" method=\"post\">";
+                echo "<fieldset class=\"invisiblefieldset\">";
                 echo ' <input type="hidden" name="choose" value="'.$choose.'" />';
                 echo " <input type=\"hidden\" name=\"id\" value=\"$id\" />";
                 echo " <input type=\"hidden\" name=\"wdir\" value=\"$wdir\" />";
                 echo " <input type=\"text\" name=\"name\" size=\"35\" />";
                 echo " <input type=\"hidden\" name=\"sesskey\" value=\"$USER->sesskey\" />";
                 echo " <input type=\"submit\" value=\"$strcreate\" />";
+                echo "</fieldset>";
                 echo "</form>";
                 echo "</td><td>";
                 echo "<form action=\"index.php\" method=\"get\">";
+                echo "<fieldset class=\"invisiblefieldset\">";
                 echo ' <input type="hidden" name="choose" value="'.$choose.'" />';
                 echo " <input type=\"hidden\" name=\"id\" value=\"$id\" />";
                 echo " <input type=\"hidden\" name=\"wdir\" value=\"$wdir\" />";
                 echo " <input type=\"hidden\" name=\"action\" value=\"cancel\" />";
                 echo " <input type=\"submit\" value=\"$strcancel\" />";
+                echo "</fieldset>";
                 echo "</form>";
                 echo "</td></tr></table>";
             }
 
                 echo "<table><tr><td colspan=\"2\">";
                 echo "<form action=\"index.php\" method=\"post\">";
+                echo "<div>";
                 echo ' <input type="hidden" name="choose" value="'.$choose.'" />';
                 echo " <input type=\"hidden\" name=\"id\" value=\"$id\" />";
                 echo " <input type=\"hidden\" name=\"wdir\" value=\"$wdir\" />";
                 print_textarea($usehtmleditor, 25, 80, 680, 400, "text", $contents);
                 echo "</td></tr><tr><td>";
                 echo " <input type=\"submit\" value=\"".get_string("savechanges")."\" />";
+                echo "</div>";
                 echo "</form>";
                 echo "</td><td>";
                 echo "<form action=\"index.php\" method=\"get\">";
+                echo "<fieldset class=\"invisiblefieldset\">";
                 echo ' <input type="hidden" name="choose" value="'.$choose.'" />';
                 echo " <input type=\"hidden\" name=\"id\" value=\"$id\" />";
                 echo " <input type=\"hidden\" name=\"wdir\" value=\"$wdir\" />";
                 echo " <input type=\"hidden\" name=\"action\" value=\"cancel\" />";
                 echo " <input type=\"submit\" value=\"".get_string("cancel")."\" />";
+                echo "</fieldset>";
                 echo "</form>";
                 echo "</td></tr></table>";
 
                     echo "<p align=\"center\">".get_string("whattocallzip")."</p>";
                     echo "<table><tr><td>";
                     echo "<form action=\"index.php\" method=\"post\">";
+                    echo "<fieldset class=\"invisiblefieldset\">";
                     echo ' <input type="hidden" name="choose" value="'.$choose.'" />';
                     echo " <input type=\"hidden\" name=\"id\" value=\"$id\" />";
                     echo " <input type=\"hidden\" name=\"wdir\" value=\"$wdir\" />";
                     echo " <input type=\"text\" name=\"name\" size=\"35\" value=\"new.zip\" />";
                     echo " <input type=\"hidden\" name=\"sesskey\" value=\"$USER->sesskey\" />";
                     echo " <input type=\"submit\" value=\"".get_string("createziparchive")."\" />";
+                    echo "<fieldset>";
                     echo "</form>";
                     echo "</td><td>";
                     echo "<form action=\"index.php\" method=\"get\">";
+                    echo "<fieldset class=\"invisiblefieldset\">";
                     echo ' <input type="hidden" name="choose" value="'.$choose.'" />';
                     echo " <input type=\"hidden\" name=\"id\" value=\"$id\" />";
                     echo " <input type=\"hidden\" name=\"wdir\" value=\"$wdir\" />";
                     echo " <input type=\"hidden\" name=\"action\" value=\"cancel\" />";
                     echo " <input type=\"submit\" value=\"".get_string("cancel")."\" />";
+                    echo "</fieldset>";
                     echo "</form>";
                     echo "</td></tr></table>";
                 } else {
                     error(get_string("unzipfileserror","error"));
                 }
 
-                echo "<center><form action=\"index.php\" method=\"get\">";
+                echo "<div style=\"text-align:center\"><form action=\"index.php\" method=\"get\">";
+                echo "<fieldset class=\"invisiblefieldset\">";
                 echo ' <input type="hidden" name="choose" value="'.$choose.'" />';
                 echo " <input type=\"hidden\" name=\"id\" value=\"$id\" />";
                 echo " <input type=\"hidden\" name=\"wdir\" value=\"$wdir\" />";
                 echo " <input type=\"hidden\" name=\"action\" value=\"cancel\" />";
                 echo " <input type=\"submit\" value=\"$strok\" />";
+                echo "</fieldset>";
                 echo "</form>";
-                echo "</center>";
+                echo "</div>";
             } else {
                 displaydir($wdir);
             }
                     echo "</table>";
                 }
                 echo "<br /><center><form action=\"index.php\" method=\"get\">";
+                echo "<fieldset class=\"invisiblefieldset\">";
                 echo ' <input type="hidden" name="choose" value="'.$choose.'" />';
                 echo " <input type=\"hidden\" name=\"id\" value=\"$id\" />";
                 echo " <input type=\"hidden\" name=\"wdir\" value=\"$wdir\" />";
                 echo " <input type=\"hidden\" name=\"action\" value=\"cancel\" />";
                 echo " <input type=\"submit\" value=\"$strok\" />";
+                echo "</fieldset>";
                 echo "</form>";
                 echo "</center>";
             } else {
@@ -652,7 +674,7 @@ function print_cell($alignment='center', $text='&nbsp;', $class='') {
     if ($class) {
         $class = ' class="'.$class.'"';
     }
-    echo '<td align="'.$alignment.'" nowrap="nowrap"'.$class.'>'.$text.'</td>';
+    echo '<td align="'.$alignment.'" style="white-space:nowrap "'.$class.'>'.$text.'</td>';
 }
 
 function displaydir ($wdir) {
@@ -704,15 +726,17 @@ function displaydir ($wdir) {
 
 
     echo "<form action=\"index.php\" method=\"post\" id=\"dirform\">";
+    echo "<div>";
     echo '<input type="hidden" name="choose" value="'.$choose.'" />';
-    echo "<hr width=\"640\" align=\"center\" noshade=\"noshade\" size=\"1\" />";
+    // echo "<hr align=\"center\" noshade=\"noshade\" size=\"1\" />";
+    echo "<hr/>";
     echo "<table border=\"0\" cellspacing=\"2\" cellpadding=\"2\" width=\"640\" class=\"files\">";
     echo "<tr>";
-    echo "<th width=\"5\" scope=\"col\"></th>";
-    echo "<th align=\"left\" class=\"header name\" scope=\"col\">$strname</th>";
-    echo "<th align=\"right\" class=\"header size\" scope=\"col\">$strsize</th>";
-    echo "<th align=\"right\" class=\"header date\" scope=\"col\">$strmodified</th>";
-    echo "<th align=\"right\" class=\"header commands\" scope=\"col\">$straction</th>";
+    echo "<th scope=\"col\"></th>";
+    echo "<th class=\"header name\" scope=\"col\">$strname</th>";
+    echo "<th class=\"header size\" scope=\"col\">$strsize</th>";
+    echo "<th class=\"header date\" scope=\"col\">$strmodified</th>";
+    echo "<th class=\"header commands\" scope=\"col\">$straction</th>";
     echo "</tr>\n";
 
     if ($wdir != "/") {
@@ -772,7 +796,7 @@ function displaydir ($wdir) {
             echo "<tr class=\"file\">";
 
             print_cell("center", "<input type=\"checkbox\" name=\"file$count\" value=\"$fileurl\" />", 'checkbox');
-            echo "<td align=\"left\" nowrap=\"nowrap\" class=\"name\">";
+            echo "<td align=\"left\" style=\"white-space:nowrap\" class=\"name\">";
             if ($CFG->slasharguments) {
                 $ffurl = str_replace('//', '/', "/file.php/$id/$fileurl");
             } else {
@@ -810,7 +834,8 @@ function displaydir ($wdir) {
         }
     }
     echo "</table>";
-    echo "<hr width=\"640\" align=\"center\" noshade=\"noshade\" size=\"1\" />";
+    echo "<hr />";
+    //echo "<hr width=\"640\" align=\"center\" noshade=\"noshade\" size=\"1\" />";
 
     echo "<table border=\"0\" cellspacing=\"2\" cellpadding=\"2\" width=\"640\">";
     echo "<tr><td>";
@@ -827,46 +852,56 @@ function displaydir ($wdir) {
         choose_from_menu ($options, "action", "", "$strwithchosenfiles...", "javascript:getElementById('dirform').submit()");
     }
     echo "</td></tr></table>";
+    echo "</div>";
     echo "</form>";
     echo "<table border=\"0\" cellspacing=\"2\" cellpadding=\"2\" width=\"640\"><tr>";
     echo "<td align=\"center\">";
     if (!empty($USER->fileop) and ($USER->fileop == "move") and ($USER->filesource <> $wdir)) {
         echo "<form action=\"index.php\" method=\"get\">";
+        echo "<fieldset class=\"invisiblefieldset\">";
         echo ' <input type="hidden" name="choose" value="'.$choose.'" />';
         echo " <input type=\"hidden\" name=\"id\" value=\"$id\" />";
         echo " <input type=\"hidden\" name=\"wdir\" value=\"$wdir\" />";
         echo " <input type=\"hidden\" name=\"action\" value=\"paste\" />";
         echo " <input type=\"hidden\" name=\"sesskey\" value=\"$USER->sesskey\" />";
         echo " <input type=\"submit\" value=\"$strmovefilestohere\" />";
+        echo "</fieldset>";
         echo "</form>";
     }
     echo "</td>";
     echo "<td align=\"right\">";
         echo "<form action=\"index.php\" method=\"get\">";
+        echo "<fieldset class=\"invisiblefieldset\">";
         echo ' <input type="hidden" name="choose" value="'.$choose.'" />';
         echo " <input type=\"hidden\" name=\"id\" value=\"$id\" />";
         echo " <input type=\"hidden\" name=\"wdir\" value=\"$wdir\" />";
         echo " <input type=\"hidden\" name=\"action\" value=\"makedir\" />";
         echo " <input type=\"submit\" value=\"$strmakeafolder\" />";
+        echo "</fieldset>";
         echo "</form>";
     echo "</td>";
     echo "<td align=\"right\">";
         echo "<form action=\"index.php\" method=\"get\">"; //dummy form - alignment only
+        echo "<fieldset class=\"invisiblefieldset\">";
         echo " <input type=\"button\" value=\"$strselectall\" onclick=\"checkall();\" />";
         echo " <input type=\"button\" value=\"$strselectnone\" onclick=\"uncheckall();\" />";
+        echo "</fieldset>";
         echo "</form>";
     echo "</td>";
     echo "<td align=\"right\">";
         echo "<form action=\"index.php\" method=\"get\">";
+        echo "<fieldset class=\"invisiblefieldset\">";
         echo ' <input type="hidden" name="choose" value="'.$choose.'" />';
         echo " <input type=\"hidden\" name=\"id\" value=\"$id\" />";
         echo " <input type=\"hidden\" name=\"wdir\" value=\"$wdir\" />";
         echo " <input type=\"hidden\" name=\"action\" value=\"upload\" />";
         echo " <input type=\"submit\" value=\"$struploadafile\" />";
+        echo "</fieldset>";
         echo "</form>";
     echo "</td></tr>";
     echo "</table>";
-    echo "<hr width=\"640\" align=\"center\" noshade=\"noshade\" size=\"1\" />";
+    echo "<hr/>";
+    //echo "<hr width=\"640\" align=\"center\" noshade=\"noshade\" size=\"1\" />";
 
 }
 
index 92a91ae817c90561b2d86f241e002bfafab04e3f..3d1c7a4b16a9da3927f38435b3a80c5c5f640ea8 100644 (file)
@@ -1934,7 +1934,7 @@ class admin_setting_special_editorfontlist extends admin_setting {
         $return .= '<input type="text" class="form-text" name="s_editorfontlist[v' . ($i + 1) . ']" value="" />';
         $return .= '</div>';
 
-        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 .= '</table>';
         $return .= '</div>';
 
-        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 = '<table><tr><td><div align="center">&nbsp;&nbsp;' . get_string('sunday', 'calendar') . '&nbsp;&nbsp;</div></td><td><div align="center">&nbsp;&nbsp;' .
-        get_string('monday', 'calendar') . '&nbsp;&nbsp;</div></td><td><div align="center">&nbsp;&nbsp;' . get_string('tuesday', 'calendar') . '&nbsp;&nbsp;</div></td><td><div align="center">&nbsp;&nbsp;' .
-        get_string('wednesday', 'calendar') . '&nbsp;&nbsp;</div></td><td><div align="center">&nbsp;&nbsp;' . get_string('thursday', 'calendar') . '&nbsp;&nbsp;</div></td><td><div align="center">&nbsp;&nbsp;' .
-        get_string('friday', 'calendar') . '&nbsp;&nbsp;</div></td><td><div align="center">&nbsp;&nbsp;' . get_string('saturday', 'calendar') . '&nbsp;&nbsp;</div></td></tr><tr>' .
-        '<td><div align="center"><input type="checkbox" class="form-checkbox" id="id_s_'.$this->name.'u" name="s_'. $this->name .'[u]" value="1" ' . (substr($currentsetting,0,1) == '1' ? 'checked="checked"' : '') . ' /></div></td>' .
-        '<td><div align="center"><input type="checkbox" class="form-checkbox" id="id_s_'.$this->name.'m" name="s_'. $this->name .'[m]" value="1" ' . (substr($currentsetting,1,1) == '1' ? 'checked="checked"' : '') . ' /></div></td>' .
-        '<td><div align="center"><input type="checkbox" class="form-checkbox" id="id_s_'.$this->name.'t" name="s_'. $this->name .'[t]" value="1" ' . (substr($currentsetting,2,1) == '1' ? 'checked="checked"' : '') . ' /></div></td>' .
-        '<td><div align="center"><input type="checkbox" class="form-checkbox" id="id_s_'.$this->name.'w" name="s_'. $this->name .'[w]" value="1" ' . (substr($currentsetting,3,1) == '1' ? 'checked="checked"' : '') . ' /></div></td>' .
-        '<td><div align="center"><input type="checkbox" class="form-checkbox" id="id_s_'.$this->name.'r" name="s_'. $this->name .'[r]" value="1" ' . (substr($currentsetting,4,1) == '1' ? 'checked="checked"' : '') . ' /></div></td>' .
-        '<td><div align="center"><input type="checkbox" class="form-checkbox" id="id_s_'.$this->name.'f" name="s_'. $this->name .'[f]" value="1" ' . (substr($currentsetting,5,1) == '1' ? 'checked="checked"' : '') . ' /></div></td>' .
-        '<td><div align="center"><input type="checkbox" class="form-checkbox" id="id_s_'.$this->name.'s" name="s_'. $this->name .'[s]" value="1" ' . (substr($currentsetting,6,1) == '1' ? 'checked="checked"' : '') . ' /></div></td>' .
+        $return = '<table><tr><td><div style="text-align:center">&nbsp;&nbsp;' . get_string('sunday', 'calendar') . '&nbsp;&nbsp;</div></td><td><div style="text-align:center">&nbsp;&nbsp;' .
+        get_string('monday', 'calendar') . '&nbsp;&nbsp;</div></td><td><div style="text-align:center">&nbsp;&nbsp;' . get_string('tuesday', 'calendar') . '&nbsp;&nbsp;</div></td><td><div style="text-align:center">&nbsp;&nbsp;' .
+        get_string('wednesday', 'calendar') . '&nbsp;&nbsp;</div></td><td><div style="text-align:center">&nbsp;&nbsp;' . get_string('thursday', 'calendar') . '&nbsp;&nbsp;</div></td><td><div style="text-align:center">&nbsp;&nbsp;' .
+        get_string('friday', 'calendar') . '&nbsp;&nbsp;</div></td><td><div style="text-align:center">&nbsp;&nbsp;' . get_string('saturday', 'calendar') . '&nbsp;&nbsp;</div></td></tr><tr>' .
+        '<td><div style="text-align:center"><input type="checkbox" class="form-checkbox" id="id_s_'.$this->name.'u" name="s_'. $this->name .'[u]" value="1" ' . (substr($currentsetting,0,1) == '1' ? 'checked="checked"' : '') . ' /></div></td>' .
+        '<td><div style="text-align:center"><input type="checkbox" class="form-checkbox" id="id_s_'.$this->name.'m" name="s_'. $this->name .'[m]" value="1" ' . (substr($currentsetting,1,1) == '1' ? 'checked="checked"' : '') . ' /></div></td>' .
+        '<td><div style="text-align:center"><input type="checkbox" class="form-checkbox" id="id_s_'.$this->name.'t" name="s_'. $this->name .'[t]" value="1" ' . (substr($currentsetting,2,1) == '1' ? 'checked="checked"' : '') . ' /></div></td>' .
+        '<td><div style="text-align:center"><input type="checkbox" class="form-checkbox" id="id_s_'.$this->name.'w" name="s_'. $this->name .'[w]" value="1" ' . (substr($currentsetting,3,1) == '1' ? 'checked="checked"' : '') . ' /></div></td>' .
+        '<td><div style="text-align:center"><input type="checkbox" class="form-checkbox" id="id_s_'.$this->name.'r" name="s_'. $this->name .'[r]" value="1" ' . (substr($currentsetting,4,1) == '1' ? 'checked="checked"' : '') . ' /></div></td>' .
+        '<td><div style="text-align:center"><input type="checkbox" class="form-checkbox" id="id_s_'.$this->name.'f" name="s_'. $this->name .'[f]" value="1" ' . (substr($currentsetting,5,1) == '1' ? 'checked="checked"' : '') . ' /></div></td>' .
+        '<td><div style="text-align:center"><input type="checkbox" class="form-checkbox" id="id_s_'.$this->name.'s" name="s_'. $this->name .'[s]" value="1" ' . (substr($currentsetting,6,1) == '1' ? 'checked="checked"' : '') . ' /></div></td>' .
         '</tr></table>';
 
-        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 .= '</div>';
         }
 
-        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 .= '</div>';
         }
-        return format_admin_setting($this->name, $this->visiblename, $return, $this->description);
+        return format_admin_setting($this->name, $this->visiblename, $return, $this->description, false);
     }
 }
 
index ff0cb698f6804981020a30386c0f9c58a21e2b4c..cfebb4b53ce223332b33d80f1bb72ea4e83b3803 100644 (file)
@@ -50,7 +50,7 @@
         }
     }
 
-              admin_externalpage_print_header('themeselector');
+    admin_externalpage_print_header('themeselector');
 
 
     print_heading($strthemes);
     $themes = get_list_of_plugins("theme");
     $sesskey = !empty($USER->id) ? $USER->sesskey : '';
 
-    echo "<table align=\"center\" cellpadding=\"7\" cellspacing=\"5\">";
-    echo "<tr class=\"generaltableheader\"><th scope=\"col\">$strtheme</th><th scope=\"col\">$strinfo</th></tr>";
+    echo "<table style=\"margin-left:auto;margin-right:auto;\" cellpadding=\"7\" cellspacing=\"5\">";
+    
+    if (!$USER->screenreader) {
+        echo "<tr class=\"generaltableheader\"><th scope=\"col\">$strtheme</th>";
+        echo "<th scope=\"col\">$strinfo</th></tr>";
+    }
     foreach ($themes as $theme) {
 
         unset($THEME);
         }
 
         echo "<tr>";
-        echo "<td align=\"center\">";
-
-        if ($screenshotpath) {
-            $screenshot = "<li><a target=\"$theme\" href=\"$theme/screenshot.jpg\">$strscreenshot</a></li>";
-            echo "<iframe name=\"$theme\" src=\"$screenshotpath\" height=\"200\" width=\"400\"></iframe></td>";
-        } else {
-            echo "<iframe name=\"$theme\" src=\"preview.php?preview=$theme\" height=\"200\" width=\"400\"></iframe></td>";
+             
+        // no point showing this if user is using screen reader
+        if (!$USER->screenreader) {
+            echo "<td align=\"center\">";
+            if ($screenshotpath) {
+                $screenshot = "<li><a target=\"$theme\" href=\"$theme/screenshot.jpg\">$strscreenshot</a></li>";
+                echo "<iframe name=\"$theme\" src=\"$screenshotpath\" height=\"200\" width=\"400\"></iframe></td>";
+            } else {
+                echo "<iframe name=\"$theme\" src=\"preview.php?preview=$theme\" height=\"200\" width=\"400\"></iframe></td>";
+            }
         }
 
-
         if ($CFG->theme == $theme) {
             echo '<td valign="top" style="border-style:solid; border-width:1px; border-color=#555555">';
         } else {
         } else {
             echo '<p style="font-size:1.5em;font-style:bold;color:red;">'.$theme.' (Moodle 1.4)</p>';
         }
-
-        echo '<ul>';
-
+          
         if ($screenshot or $readme) {
-            echo "<li><a target=\"$theme\" href=\"preview.php?preview=$theme\">$strpreview</a></li>";
+            echo '<ul>';      
+            if (!$USER->screenreader) {
+                echo "<li><a target=\"$theme\" href=\"preview.php?preview=$theme\">$strpreview</a></li>";
+            }
+            echo $screenshot.$readme;
+            echo '</ul>';
         }
-        echo $screenshot.$readme;
-        echo '</ul>';
 
         $options = null;
         $options['choose'] = $theme;