/** * Compile the given $test into PHP source code for maximum performance. The file will be stored * into PRIVATE_DIRECTORY/compact-test.php. * * @param AssessmentTest $test */ protected function compileTest(AssessmentTest $test) { // Compiling a test may require extra processing time. helpers_TimeOutHelper::setTimeOutLimit(helpers_TimeOutHelper::MEDIUM); $phpCompiledDoc = new PhpDocument('2.1', $test); $data = $phpCompiledDoc->saveToString(); $this->getPrivateDirectory()->write(TAOQTITEST_COMPILED_FILENAME, $data); common_Logger::d("QTI-PHP Test Compilation file saved to stream."); }