Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.10.x will end 8 November 2021 (12 months).
  • Bug fixes for security issues in 3.10.x will end 9 May 2022 (18 months).
  • PHP version: minimum PHP 7.2.0 Note: minimum PHP version has increased since Moodle 3.8. PHP 7.3.x and 7.4.x are 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