From e39a04d57337358c7940384cc385ee1c3fe1918b Mon Sep 17 00:00:00 2001 From: stronk7 Date: Tue, 24 Feb 2004 13:18:22 +0000 Subject: [PATCH] First attempt to view scheduled backup logs. Currently it shows laststatus only. Detailed view comming this afternoon. ==== Note: As you have released 1.2beta and this is a new little functionality, please, let me know if I must "delete" it from CVS before 1.2 (although I think that we are on time to add this...) --- admin/backup.php | 4 ++- backup/log.php | 89 ++++++++++++++++++++++++++++++++++++++++++++++ lang/en/moodle.php | 1 + 3 files changed, 93 insertions(+), 1 deletion(-) create mode 100644 backup/log.php diff --git a/admin/backup.php b/admin/backup.php index fd6b99f591..3623bb6572 100644 --- a/admin/backup.php +++ b/admin/backup.php @@ -72,7 +72,9 @@ print_header("$site->shortname: $strconfiguration: $strbackup", $site->fullname, "$stradmin -> ". "$strconfiguration -> ". - "$strbackup"); + $strbackup); + + echo "

".get_string("logs")."

"; print_heading($strbackup); diff --git a/backup/log.php b/backup/log.php new file mode 100644 index 0000000000..854af5082a --- /dev/null +++ b/backup/log.php @@ -0,0 +1,89 @@ +shortname: $strconfiguration: $strbackup", $site->fullname, + "$stradmin -> ". + "$strconfiguration -> ". + "$strbackup -> ". + $strlogs); + + print_heading($strbackup); + + print_simple_box("
".get_string("backuploglaststatus")."
", "center", "50%"); + echo "
"; + + print_simple_box_start("center", "", "$THEME->cellheading"); + + //Now, get every record from backup_courses + $courses = get_records("backup_courses"); + + if (!$courses) { + notify("No logs found!"); + } else { + echo ""; + //Print table header + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + foreach ($courses as $course) { + //Get the course shortname + $coursename = get_field ("course","fullname","id",$course->courseid); + if ($coursename) { + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + if (!$course->laststatus) { + echo ""; + } else { + echo ""; + } + echo ""; + echo ""; + } + + + + + + } + echo "
$strcourse$strtimetaken$strstatus$strnext
courseid\">".$coursename."".userdate($course->laststarttime,$strftimedatetime)." - ".userdate($course->lastendtime,$strftimedatetime)."".$strerror."".$strok."".userdate($course->nextstarttime,$strftimedatetime)."
"; + } + + + + print_simple_box_end(); + + print_footer(); + +?> diff --git a/lang/en/moodle.php b/lang/en/moodle.php index e1ff28a5e4..f08bd8102f 100644 --- a/lang/en/moodle.php +++ b/lang/en/moodle.php @@ -88,6 +88,7 @@ $string['backupfilename'] = 'backup'; $string['backupfinished'] = 'Backup completed successfully'; $string['backupincludemoduleshelp'] = 'Choose whether you want to include course modules, with or without user data, in automated backups'; $string['backupkeephelp'] = 'How many recent backups for each course do you want to keep? (older ones will be deleted automatically)'; +$string['backuploglaststatus'] = 'Backup last status log'; $string['backuplogshelp'] = 'If enabled, then course logs will be included in automated backups'; $string['backupnameformat'] = '%%Y%%m%%d-%%H%%M'; $string['backuporiginalname'] = 'Backup Name'; -- 2.39.5