From c4aa4e8ff6ca40e731da5d1a4d31af2c68a10b54 Mon Sep 17 00:00:00 2001 From: thepurpleblob Date: Wed, 13 Apr 2005 10:32:45 +0000 Subject: [PATCH] Added direct link to download exported file rather than having to search for it. --- mod/quiz/export.php | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/mod/quiz/export.php b/mod/quiz/export.php index 3f835d0db0d..f00681423c1 100644 --- a/mod/quiz/export.php +++ b/mod/quiz/export.php @@ -58,8 +58,21 @@ error("Error occurred during post-processing!", "$CFG->wwwroot/mod/quiz/export.php?category=$category->id"); } - echo "
"; + + // link to download the finished file + $file_ext = $format->export_file_extension(); + $download_str = get_string( 'download', 'quiz' ); + $downloadextra_str = get_string( 'downloadextra','quiz' ); + if ($CFG->slasharguments) { + $efile = "{$CFG->wwwroot}/file.php/$course->id/quiz/$exportfilename".$file_ext; + } + else { + $efile = "{$CFG->wwwroot}/file.php?file=/$course->id/quiz/$exportfilename".$file_ext; + } + echo "

$download_str

"; + echo "

$downloadextra_str

"; + print_continue("edit.php"); print_footer($course); exit;