Automatic installer.php lang files by installer_builder (20090119)
[moodle.git] / question / exportfile.php
blobfa36f79e8f845448f2caea1a31622f0517364cec
1 <?php
2 require_once(dirname(__FILE__) . '/../config.php');
3 require_once($CFG->libdir . '/filelib.php');
5 // Note: file.php always calls require_login() with $setwantsurltome=false
6 // in order to avoid messing redirects. MDL-14495
7 require_login(0, true, null, false);
9 $relativepath = get_file_argument('question/exportfile.php');
10 if (!$relativepath) {
11 error('No valid arguments supplied or incorrect server configuration');
14 $pathname = $CFG->dataroot . '/temp/questionexport/' . $USER->id . '/' . $relativepath;
16 send_temp_file($pathname, $relativepath);