Moodle PHP Documentation 4.5
Moodle 4.5dev (Build: 20240606) (d3ae1391abe)
core_question\question_reference_manager Class Reference

Static Public Member Functions

static convert_legacy_set_reference_filter_condition (array $filtercondition)
 This will transform set reference filter conditions to use the new filter structure.
 
static questions_with_references (array $questionids)
 Return a list of those questions from the list passed in, which are referenced.
 

Member Function Documentation

◆ convert_legacy_set_reference_filter_condition()

static core_question\question_reference_manager::convert_legacy_set_reference_filter_condition ( array $filtercondition)
static

This will transform set reference filter conditions to use the new filter structure.

Previously filterconditions had questioncategoryid, includesubcategories and tags options. These have been replaced by the new category and tags filters. This function convers the old pre-4.3 filter condition structure to the new one.

Parameters
array$filterconditionPre-4.3 filter condition.
Return values
arrayPost-4.3 filter condition.

◆ questions_with_references()

static core_question\question_reference_manager::questions_with_references ( array $questionids)
static

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.
Parameters
array$questionidsa list of question ids to check.
Return values
arraya list of the question ids from the input array which are referenced.

The documentation for this class was generated from the following file: