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');
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);