Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.0.x will end 8 May 2023 (12 months).
  • Bug fixes for security issues in 4.0.x will end 13 November 2023 (18 months).
  • PHP version: minimum PHP 7.3.0 Note: the minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is also supported.

Differences Between: [Versions 400 and 403]

(no description)

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

Defines 1 class

question_reference_manager:: (1 method):
  questions_with_references()


Class: question_reference_manager  - X-Ref

This class should provide an API for managing question_references.

Unfortunately, question_references were introduced in the DB structure
without an nice API. This class is being added later, and is currently
terribly incomplete, but hopefully it can be improved in time.

questions_with_references(array $questionids)   X-Ref
Return a list of those questions from the list passed in, which are referenced.

A question is referenced if either:
- There is a question_reference pointing at exactly that version of that question; or
- There is an 'always latest' reference, and the question id is the latest non-draft version
of that question_bank_entry.

return: array a list of the question ids from the input array which are referenced.
param: array $questionids a list of question ids to check.