Skip to content

Commit

Permalink
Added direct link to download exported file rather than having
Browse files Browse the repository at this point in the history
to search for it.
  • Loading branch information
thepurpleblob committed Apr 13, 2005
1 parent 94dae5f commit c4aa4e8
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion mod/quiz/export.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,21 @@
error("Error occurred during post-processing!",
"$CFG->wwwroot/mod/quiz/export.php?category=$category->id");
}

echo "<hr />";

// 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 "</p><center><a href=\"$efile\">$download_str</a></center></p>";
echo "</p><center><font size=\"-1\">$downloadextra_str</font></center></p>";

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

0 comments on commit c4aa4e8

Please sign in to comment.