~ubuntu-branches/ubuntu/hoary/moodle/hoary

« back to all changes in this revision

Viewing changes to backup/log.php

  • Committer: Bazaar Package Importer
  • Author(s): Isaac Clerencia
  • Date: 2004-12-29 00:49:52 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20041229004952-gliyqzpj2w3e7clx
Tags: 1.4.3-1
* Urgency high as upstream release fixes several security bugs
* New upstream release
* Write database creation errors and warn the user about it, 
closes: #285842, #285842

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<?PHP  // $Id: log.php,v 1.4 2004/05/12 19:12:54 stronk7 Exp $
 
1
<?PHP  // $Id: log.php,v 1.4.8.3 2004/10/10 18:46:25 stronk7 Exp $
2
2
       // backup.php - allows admin to edit all configuration variables for scheduled backups
3
3
 
4
4
    require_once("../config.php");
28
28
    $strftimetime = get_string("strftimetime").":%S";
29
29
    $strerror = get_string("error");
30
30
    $strok = get_string("ok");
 
31
    $strunfinished = get_string("unfinished");
31
32
    $strcourse = get_string("course");
32
33
    $strtimetaken = get_string("timetaken","quiz");
33
34
    $strstatus = get_string("status");
39
40
        print_header("$site->shortname: $strconfiguration: $strbackup", $site->fullname,
40
41
                      "<a href=\"../$CFG->admin/index.php\">$stradmin</a> -> ".
41
42
                      "<a href=\"../$CFG->admin/configure.php\">$strconfiguration</a> -> ".
42
 
                      "<a href=\"../$CFG->admin/backup.php\">$strbackup</a> -> ".
 
43
                      "<a href=\"../$CFG->admin/backup.php?sesskey=$USER->sesskey\">$strbackup</a> -> ".
43
44
                      $strlogs);
44
45
 
45
46
        print_heading($backuploglaststatus);
66
67
                    echo "<td nowrap><font size=2>".userdate($course->laststarttime,$strftimedatetime)."</td>";
67
68
                    echo "<td nowrap><font size=2> - </td>";
68
69
                    echo "<td nowrap><font size=2>".userdate($course->lastendtime,$strftimedatetime)."</td>";
69
 
                    if (!$course->laststatus) {
 
70
                    if ($course->laststatus == 1) {
 
71
                        echo "<td nowrap align=center><font size=2 color=green>".$strok."</td>";
 
72
                    } else if ($course->laststatus == 2) {
 
73
                        echo "<td nowrap align=center><font size=2 color=red>".$strunfinished."</td>";
 
74
                    } else {
70
75
                        echo "<td nowrap align=center><font size=2 color=red>".$strerror."</td>";
71
 
                    } else {
72
 
                        echo "<td nowrap align=center><font size=2 color=green>".$strok."</td>";
73
76
                    }
74
77
                    echo "<td nowrap><font size=2>".userdate($course->nextstarttime,$strftimedatetime)."</td>";
75
78
                    echo "</tr>";
83
86
        print_header("$site->shortname: $strconfiguration: $strbackup", $site->fullname,
84
87
                      "<a href=\"../$CFG->admin/index.php\">$stradmin</a> -> ".
85
88
                      "<a href=\"../$CFG->admin/configure.php\">$strconfiguration</a> -> ".
86
 
                      "<a href=\"../$CFG->admin/backup.php\">$strbackup</a> -> ".
 
89
                      "<a href=\"../$CFG->admin/backup.php?sesskey=$USER->sesskey\">$strbackup</a> -> ".
87
90
                      "<a href=\"log.php\">$strlogs</a> -> ".
88
91
                      $strbackupdetails);
89
92
 
115
118
                                         FROM {$CFG->prefix}backup_log
116
119
                                         WHERE courseid = '$courseid'  AND
117
120
                                               laststarttime = '$execution->laststarttime'
118
 
                                         ORDER BY time");
 
121
                                         ORDER BY id");
119
122
                if ($logs) {
120
123
                    foreach ($logs as $log) {
121
124
                        echo "<tr nowrap>";