. namespace mod_quiz\admin; /** * Admin settings class for the choices for how to display the user's image. * * Just so we can lazy-load the choices. * * @package mod_quiz * @category admin * @copyright 2011 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ class user_image_setting extends \admin_setting_configselect_with_advanced { public function load_choices() { global $CFG; if (is_array($this->choices)) { return true; } require_once($CFG->dirroot . '/mod/quiz/locallib.php'); $this->choices = quiz_get_user_image_options(); return true; } }