You are here

function qformat_default::setContexts in Quiz 6.6

Same name and namespace in other branches
  1. 6.5 includes/moodle/question/format.php \qformat_default::setContexts()

set an array of contexts.

Parameters

array $contexts Moodle course variable:

File

includes/moodle/question/format.php, line 79

Class

qformat_default
Base class for question import and export formats.

Code

function setContexts($contexts) {
  $this->contexts = $contexts;
  $this->translator = new context_to_string_translator($this->contexts);
}