diff --git a/admin/backup.php b/admin/backup.php index fd6b99f5919..3623bb6572d 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 00000000000..854af5082a8 --- /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 e1ff28a5e4b..f08bd8102f5 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';