/** * @param mr_fixture_course $course The course to enroll the user into * @param mr_fixture_user $user The user to enroll * @param enrol_plugin $enroll The enrollment plugin to use, defaults to enrol_get_plugin('manual') * @param mr_fixture_role|null $role The role to use for the enrollment, optional * @param array|object $options Parameters to pass to the enrol_plugin->enrol_user() */ public function __construct(mr_fixture_course $course, mr_fixture_user $user, enrol_plugin $enroll = null, mr_fixture_role $role = null, $options = array()) { parent::__construct(); if (is_null($enroll)) { $enroll = enrol_get_plugin('manual'); } $this->set_course($course)->set_user($user)->set_enroll($enroll)->set_role($role)->set_options($options); }
/** * @param string $shortname Any of the standard shortnames, EG: coursecreator, * editingteacher, frontpage, guest, manager, * student, teacher, user */ public function __construct($shortname = 'student') { parent::__construct(); $this->set_shortname($shortname); }
/** * @param array|object $options Properties to use for the user */ public function __construct($options = array()) { parent::__construct(); $this->set_options($options); }
/** * @param mr_fixture_role $role The role to assign * @param mr_fixture_user $user The user to use for the role assignment * @param context|mr_fixture_user|mr_fixture_course $context The context to use for the role assignment * @param array|object $options The options */ public function __construct(mr_fixture_role $role, mr_fixture_user $user, $context, $options = array()) { parent::__construct(); $this->set_role($role)->set_user($user)->set_context($context)->set_options($options); }
/** * @param mr_fixture_user_profile_category $category The profile field's category * @param array|object $options Properties to use for the user profile field */ public function __construct(mr_fixture_user_profile_category $category, $options = array()) { parent::__construct(); $this->set_options($options)->set_category($category); }
/** * @param mr_fixture_course $course The course to create the group in * @param array|object $options Parameters to use to create the group */ public function __construct(mr_fixture_course $course, $options = array()) { parent::__construct(); $this->set_course($course)->set_options($options); }
/** * @param mr_fixture_group $group The group to use for the membership * @param mr_fixture_enrollment $enrollment The enrollment to use for the membership */ public function __construct(mr_fixture_group $group, mr_fixture_enrollment $enrollment) { parent::__construct(); $this->set_group($group)->set_enrollment($enrollment); }
/** * @param string $name The category name */ public function __construct($name = 'simpletest') { parent::__construct(); $this->set_name($name); }