]> git.mjollnir.org Git - moodle.git/commitdiff
Now weekdays, active and execution time are included, too.
authorstronk7 <stronk7>
Sun, 30 Nov 2003 21:37:46 +0000 (21:37 +0000)
committerstronk7 <stronk7>
Sun, 30 Nov 2003 21:37:46 +0000 (21:37 +0000)
backup/config.html

index 683ccde8940c62678071811d9a7a37c046532c65..cfbdb71dac8b0ae8037252cfe22bb73e3b1ca8d4 100644 (file)
     if (!isset($backup_config->backup_sche_coursefiles)) {
         $backup_config->backup_sche_coursefiles = 1;
     }
+    if (!isset($backup_config->backup_sche_active)) {
+        $backup_config->backup_sche_active = 0;
+    }
     if (!isset($backup_config->backup_sche_weekdays)) {
         $backup_config->backup_sche_weekdays = "0000000";
     }
+    if (!isset($backup_config->backup_sche_hour)) {
+        $backup_config->backup_sche_hour = 00;
+    }
+    if (!isset($backup_config->backup_sche_minute)) {
+        $backup_config->backup_sche_minute = 00;
+    }
 
     //print_object($backup_config);                       //Debug
 
 <tr valign=top>
     <td colspan = 3 align=center><strong><?php print_string("schedule") ?></strong></td>
 </tr>
+<tr valign=top>
+    <td colspan = 3 align=center>
+        <?php print_string("active") ?>: <?php choose_from_menu($yesno_array, "backup_sche_active", $backup_config->backup_sche_active, "") ?>
+    </td>
+</tr>
 <tr>
     <td colspan=3 align=center>
         <?php 
             $check_names = "";
             while ($i<7) {
                 $day_names[] = strftime("%A",$onesunday + (($firstdayofweek+$i)*86400));
-                if (substr($backup_config->backup_sche_weekdays,$i,1) == "1") {
+                //Calculate standard day of week (0=Sunday......6=Saturday)
+                //to store info in that exact order in DB
+                $stddayofweek = ($i+$firstdayofweek) % 7;
+                //Calculate the status of the checkbox
+                if (substr($backup_config->backup_sche_weekdays,$stddayofweek,1) == "1") {
                     $strchecked = " checked";
                 } else {
                     $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++;
             }
         ?>
     </td>
 </tr>
+<tr valign=top>
+    <td colspan = 3 align=center>
+        <?php print_string("executeat") ?>: <?php print_time_selector("backup_sche_hour","backup_sche_minute",make_timestamp(2000,1,1,$backup_config->backup_sche_hour,$backup_config->backup_sche_minute)) ?>
+    </td>
+</tr>
 <tr>
     <td colspan=3 align=center>
         <input type="submit" value="<?php print_string("savechanges") ?>"></td>