Index: adminlib.php
===================================================================
RCS file: /cvsroot/moodle/moodle/lib/adminlib.php,v
retrieving revision 1.82.2.17
diff -u -r1.82.2.17 adminlib.php
--- adminlib.php	31 Jan 2007 22:38:45 -0000	1.82.2.17
+++ adminlib.php	2 Feb 2007 23:19:26 -0000
@@ -2255,13 +2255,14 @@
         if (isset($CFG->{$this->name})) {
             $currentsetting = decbin($CFG->{$this->name});
             $currentsetting = str_pad($currentsetting, 7, '0', STR_PAD_LEFT);
-            return array('u' => substr($currentsetting, 0, 1),
-                         'm' => substr($currentsetting, 1, 1),
-                         't' => substr($currentsetting, 2, 1),
+
+            return array('u' => substr($currentsetting, 6, 1),
+                         'm' => substr($currentsetting, 5, 1),
+                         't' => substr($currentsetting, 4, 1),
                          'w' => substr($currentsetting, 3, 1),
-                         'r' => substr($currentsetting, 4, 1),
-                         'f' => substr($currentsetting, 5, 1),
-                         's' => substr($currentsetting, 6, 1));
+                         'r' => substr($currentsetting, 2, 1),
+                         'f' => substr($currentsetting, 1, 1),
+                         's' => substr($currentsetting, 0, 1));
         } else {
             return NULL;
         }
@@ -2277,7 +2278,7 @@
                 }
             }
         }
-        return (set_config($this->name, bindec(implode('',$result))) ? '' : get_string('errorsetting', 'admin') . $this->visiblename . '<br />');
+        return (set_config($this->name, bindec(strrev(implode('',$result)))) ? '' : get_string('errorsetting', 'admin') . $this->visiblename . '<br />');
     }
 
     function output_html() {
