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.

Differences Between: [Versions 401 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.

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