]> git.mjollnir.org Git - moodle.git/commitdiff
Small change to save scheduled days always in
authorstronk7 <stronk7>
Thu, 27 Nov 2003 23:50:46 +0000 (23:50 +0000)
committerstronk7 <stronk7>
Thu, 27 Nov 2003 23:50:46 +0000 (23:50 +0000)
0=Sunday....6=Saturday format, independent from the
visual display of the week. :-)
It uses the "firstdayofweek" string in every languaje pack
(defaults to 0-Sunday)

backup/config.html

index 91dc89e4fbbfd28bacb99dffa8bcd29ed92ce7fb..683ccde8940c62678071811d9a7a37c046532c65 100644 (file)
                 } else {
                     $strchecked = "";
                 }
-                $check_names[] = "<input type=\"checkbox\" name=\"dayofweek_$i\" value=\"1\"$strchecked>";
+                //Calculate standard day of week (0=Sunday......6=Saturday)
+                //to store info in that exact order in DB
+                $stddayofweek = ($i+$firstdayofweek) % 7;
+                $check_names[] = "<input type=\"checkbox\" name=\"dayofweek_$stddayofweek\" value=\"1\"$strchecked>";
                 $i++;
             }
             $table->align = array("center","center","center","center","center","center","center");