| 
    Moodle PHP Documentation 4.1
    
   Moodle 4.1dev (Build: 20220512) (5e5e12e0) 
   | 
 
Static Public Member Functions | |
| static | get_preview_extra_elements (question_definition $question, int $courseid) | 
| Get the extra elements for preview from qbank plugins.  More... | |
| static | is_latest (string $version, string $questionbankentryid) | 
| Checks if question is the latest version.  More... | |
| static | load_versions (string $questionbankentryid) | 
| Loads question version ids for current question.  More... | |
| static | question_preview_action_url ($questionid, $qubaid, question_preview_options $options, $context, $returnurl=null) | 
| The the URL to use for actions relating to this preview.  More... | |
| static | question_preview_form_url ($questionid, $context, $previewid=null, $returnurl=null) | 
| The the URL to use for actions relating to this preview.  More... | |
| static | question_preview_popup_params () | 
| Popup params for the question preview.  More... | |
| static | question_preview_question_pluginfile ($course, $context, $component, $filearea, $qubaid, $slot, $args, $forcedownload, $fileoptions) | 
| Called via pluginfile.php -> question_pluginfile to serve files belonging to a question in a question_attempt when that attempt is a preview.  More... | |
| static | question_preview_url ($questionid, $preferredbehaviour=null, $maxmark=null, $displayoptions=null, $variant=null, $context=null, $returnurl=null, $version=null) | 
| Generate the URL for starting a new preview of a given question with the given options.  More... | |
| static | restart_preview ($previewid, $questionid, $displayoptions, $context, $returnurl=null, $version=null) | 
| Delete the current preview, if any, and redirect to start a new preview.  More... | |
      
  | 
  static | 
Get the extra elements for preview from qbank plugins.
| question_definition | $question | question definition object | 
| int | $courseid | id of the course | 
| array | 
      
  | 
  static | 
Checks if question is the latest version.
| string | $version | Question version to check | 
| string | $questionbankentryid | Entry to check against | 
| bool | 
      
  | 
  static | 
Loads question version ids for current question.
| string | $questionbankentryid | Question bank entry id | 
| array::$questionids | Array containing question id as key and version as value. | 
      
  | 
  static | 
The the URL to use for actions relating to this preview.
| int | $questionid | the question being previewed | 
| int | $qubaid | the id of the question usage for this preview | 
| question_preview_options | $options | the options in use | 
| context | $context | context for the question preview | 
| moodle_url | $returnurl | url of the page to return to | 
| moodle_url | 
      
  | 
  static | 
The the URL to use for actions relating to this preview.
| int | $questionid | the question being previewed | 
| context | $context | the current moodle context | 
| int | $previewid | optional previewid to sign post saved previewed answers | 
| moodle_url | $returnurl | url of the page to return to | 
| moodle_url | 
      
  | 
  static | 
Popup params for the question preview.
| array | that can be passed as $params to the { | 
      
  | 
  static | 
Called via pluginfile.php -> question_pluginfile to serve files belonging to a question in a question_attempt when that attempt is a preview.
| stdClass | $course | course settings object | 
| stdClass | $context | context object | 
| string | $component | the name of the component we are serving files for. | 
| string | $filearea | the name of the file area. | 
| int | $qubaid | the question_usage this image belongs to. | 
| int | $slot | the relevant slot within the usage. | 
| array | $args | the remaining bits of the file path. | 
| bool | $forcedownload | whether the user must be forced to download the file. | 
| array | $fileoptions | options for the stored files | 
| void | false if file not found, does not return if found - justsend the file | 
      
  | 
  static | 
Generate the URL for starting a new preview of a given question with the given options.
| integer | $questionid | the question to preview | 
| string | $preferredbehaviour | the behaviour to use for the preview | 
| float | $maxmark | the maximum to mark the question out of | 
| question_display_options | $displayoptions | the display options to use | 
| int | $variant | the variant of the question to preview. If null, one will be picked randomly | 
| object | $context | context to run the preview in (affects things like filter settings, theme, lang, etc.) Defaults to $PAGE->context | 
| moodle_url | $returnurl | url of the page to return to | 
| int | $version | version of the question | 
| moodle_url | the URL | 
      
  | 
  static | 
Delete the current preview, if any, and redirect to start a new preview.
| int | $previewid | id of the preview while restarting it | 
| int | $questionid | id of the question in preview | 
| object | $displayoptions | display options for the question in preview | 
| object | $context | context of the question for preview | 
| moodle_url | $returnurl | url of the page to return to | 
| int | null | $version | version of the question in preview |