. /** * Standard plugin entry points of the HTML question export format. * * @package qformat_xhtml * @copyright 2013 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ defined('MOODLE_INTERNAL') || die(); /** * Serve question files when they are displayed in this export format. * * @param context $previewcontext the quiz context * @param int $questionid the question id. * @param context $filecontext the file (question) context * @param string $filecomponent the component the file belongs to. * @param string $filearea the file area. * @param array $args remaining file args. * @param bool $forcedownload. * @param array $options additional options affecting the file serving. */ function qformat_xhtml_questiontext_preview_pluginfile($context, $questionid, $args, $forcedownload, array $options = array()) { global $CFG; list($context, $course, $cm) = get_context_info_array($context->id); require_login($course, false, $cm); question_require_capability_on($questionid, 'view'); question_send_questiontext_file($questionid, $args, $forcedownload, $options); }