Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.11.x will end 14 Nov 2022 (12 months plus 6 months extension).
  • Bug fixes for security issues in 3.11.x will end 13 Nov 2023 (18 months plus 12 months extension).
  • PHP version: minimum PHP 7.3.0 Note: minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is supported too.

action to delete (or hide) a question, or restore a previously hidden question.

Copyright: 2009 Tim Hunt
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 81 lines (3 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

delete_action_column:: (4 methods):
  init()
  get_name()
  get_url_icon_and_label()
  get_required_fields()


Class: delete_action_column  - X-Ref

action to delete (or hide) a question, or restore a previously hidden question.

init()   X-Ref
No description

get_name()   X-Ref
No description

get_url_icon_and_label(\stdClass $question)   X-Ref
Work out the info required to display this action, if appropriate.

If the action is not appropriate to this question, return [null, null, null].

Otherwise return an array with three elements:
moodel_url $url the URL to perform the action.
string $icon the icon name. E.g. 't/delete'.
string $label the label to display.

param: object $question the row from the $question table, augmented with extra information.
return: array [$url, $label, $icon] as above.

get_required_fields()   X-Ref
No description