Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 4.1.x will end 13 November 2023 (12 months).
  • Bug fixes for security issues in 4.1.x will end 10 November 2025 (36 months).
  • PHP version: minimum PHP 7.4.0 Note: minimum PHP version has increased since Moodle 4.0. PHP 8.0.x is supported too.

(no description)

File Size: 144 lines (5 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

question_preview_options:: (7 methods):
  __construct()
  get_user_pref_fields()
  get_field_types()
  load_user_defaults()
  save_user_preview_options()
  set_from_request()
  get_url_params()


Class: question_preview_options  - X-Ref

Displays question preview options as default and set the options.

Setting default, getting and setting user preferences in question preview options.

__construct($question)   X-Ref
Constructor.

param: \stdClass $question

get_user_pref_fields()   X-Ref
Names of the options we store in the user preferences table.

return: array

get_field_types()   X-Ref
Names and param types of the options we read from the request.

return: array

load_user_defaults()   X-Ref
Load the value of the options from the user_preferences table.


save_user_preview_options($newoptions)   X-Ref
Save a change to the user's preview options to the database.

param: object $newoptions

set_from_request()   X-Ref
Set the value of any fields included in the request.


get_url_params()   X-Ref
Parameters needed in the URL when continuing this preview.

return: array URL fragment.