Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.3.x will end 7 October 2024 (12 months).
  • Bug fixes for security issues in 4.3.x will end 21 April 2025 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.2.x is supported too.

Differences Between: [Versions 310 and 403] [Versions 311 and 403] [Versions 39 and 403]

Library functions used by question/preview.php.

Copyright: 2010 The Open University
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 105 lines (5 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 4 functions


Functions that are not part of a class:

question_preview_question_pluginfile($course, $context, $component,$filearea, $qubaid, $slot, $args, $forcedownload, $fileoptions)   X-Ref
Called via pluginfile.php -> question_pluginfile to serve files belonging to
a question in a question_attempt when that attempt is a preview.

param: stdClass $course course settings object
param: stdClass $context context object
param: string $component the name of the component we are serving files for.
param: string $filearea the name of the file area.
param: int $qubaid the question_usage this image belongs to.
param: int $slot the relevant slot within the usage.
param: array $args the remaining bits of the file path.
param: bool $forcedownload whether the user must be forced to download the file.
param: array $fileoptions
return: void false if file not found, does not return if found - justsend the file

question_preview_action_url($questionid, $qubaid,question_preview_options $options, $context)   X-Ref
The the URL to use for actions relating to this preview.

param: int $questionid the question being previewed.
param: int $qubaid the id of the question usage for this preview.
param: question_preview_options $options the options in use.
param: context $context

question_preview_form_url($questionid, $context, $previewid = null)   X-Ref
The the URL to use for actions relating to this preview.

param: int $questionid the question being previewed.
param: context $context the current moodle context.
param: int $previewid optional previewid to sign post saved previewed answers.

restart_preview($previewid, $questionid, $displayoptions, $context)   X-Ref
Delete the current preview, if any, and redirect to start a new preview.

param: int $previewid
param: int $questionid
param: object $displayoptions
param: object $context