/** * Create instance. * * @param string $name control name * @param array $options should have two elements with keys groupid and courseid. */ public function __construct($name = null, $options = array()) { if (is_null($name)) { $name = 'removeselect'; } $options['multiselect'] = false; parent::__construct($name, $options); }
public function __construct($name, $options) { $this->companyid = $options['companyid']; if (isset($options['courseid'])) { $this->courseid = $options['courseid']; } parent::__construct($name, $options); }
/** * @param string $name control name * @param array $options should have two elements with keys groupid and courseid. */ public function __construct($name, $options) { global $CFG; $options['accesscontext'] = context_system::instance(); parent::__construct($name, $options); $this->classid = $options['classid']; $this->context = $options['accesscontext']; require_once($CFG->dirroot . '/group/lib.php'); }
/** * Create instance. * * @param string $name control name * @param array $options should have two elements with keys groupid and courseid. */ public function __construct($name = null, $options = array()) { global $CFG; if (is_null($name)) { $name = 'addselect'; } $options['multiselect'] = false; $options['exclude'] = explode(',', $CFG->siteadmins); parent::__construct($name, $options); }
public function __construct($name, $options) { parent::__construct($name, $options); if (!empty($options['serviceid'])) { $this->serviceid = $options['serviceid']; } else { throw new moodle_exception('serviceidnotfound'); } $this->displayallowedusers = !empty($options['displayallowedusers']); }
/** * @param string $name control name * @param array $options should have two elements with keys groupid and courseid. */ public function __construct($name, $options) { global $CFG; $options['accesscontext'] = context_system::instance(); parent::__construct($name, $options); $this->teammanagerid = $options['teammanagerid']; if(isset($options['costcenterid'])) $this->costcenterid = $options['costcenterid']; $this->context = $options['accesscontext']; require_once($CFG->dirroot . '/group/lib.php'); }
/** * @param string $name control name * @param array $options should have two elements with keys groupid and courseid. */ public function __construct($name, $options) { global $CFG; if (isset($options['context'])) { $this->context = $options['context']; } else { $this->context = context::instance_by_id($options['contextid']); } $options['accesscontext'] = $this->context; parent::__construct($name, $options); $this->roleid = $options['roleid']; require_once $CFG->dirroot . '/group/lib.php'; }
/** * Constructor. * * @param string $name the control name/id for use in the HTML. * @param array $options other options needed to construct this selector. * You must be able to clone a userselector by doing new get_class($us)($us->get_name(), $us->get_options()); */ public function __construct($name, $options) { if (!isset($options['multiselect'])) { $options['multiselect'] = false; } parent::__construct($name, $options); $coursecontext = $this->accesscontext->get_course_context(false); if ($coursecontext and $coursecontext->id != SITEID and !has_capability('moodle/role:manage', $coursecontext)) { // Prevent normal teachers from looking up all users. $this->onlyenrolled = true; } else { $this->onlyenrolled = false; } }
/** * Constructor method * @param string $name * @param array $options */ public function __construct($name, $options) { $options['accesscontext'] = $options['context']; parent::__construct($name, $options); if (isset($options['context'])) { $this->context = $options['context']; } if (isset($options['currentgroup'])) { $this->currentgroup = $options['currentgroup']; } if (isset($options['forumid'])) { $this->forumid = $options['forumid']; } }
/** * Constructor method * @param string $name * @param array $options */ public function __construct($name, array $options) { $options['accesscontext'] = $options['context']; parent::__construct($name, $options); if (isset($options['context'])) { if ($options['context'] instanceof context_system) { // If it is a site badge, we need to get context of frontpage. $this->context = context_course::instance(SITEID); } else { $this->context = $options['context']; } } if (isset($options['badgeid'])) { $this->badgeid = $options['badgeid']; } if (isset($options['issuerid'])) { $this->issuerid = $options['issuerid']; } if (isset($options['issuerrole'])) { $this->issuerrole = $options['issuerrole']; } }
/** * @param string $name control name * @param array $options should have two elements with keys groupid and courseid. */ public function __construct() { global $CFG, $USER; parent::__construct('removeselect', array('multiselect' => false)); }
public function __construct($name, $options) { $this->sessionid = $options['sessionid']; parent::__construct($name, $options); }
public function __construct($name, $options) { $this->cohortid = $options['cohortid']; parent::__construct($name, $options); }
public function __construct($name, $options) { $this->enrolid = $options['enrolid']; parent::__construct($name, $options); }
public function __construct($name, $options,$skillset,$position) { $this->skillset = $skillset; $this->position = $position; $this->enrolid = $options['enrolid']; parent::__construct($name, $options); }
/** * @param string $name control name * @param array $options should have two elements with keys groupid and courseid. */ public function __construct($name, $options) { global $CFG; $options['accesscontext'] = get_context_instance(CONTEXT_COURSE, $options['courseid']); parent::__construct($name, $options); $this->groupid = $options['groupid']; $this->courseid = $options['courseid']; require_once $CFG->dirroot . '/group/lib.php'; }
public function __construct($name, $options) { global $currentuserrolename; $this->currentuserrolename = $currentuserrolename; $this->enrolid = $options['enrolid']; parent::__construct($name, $options); }
/** * @param string $name control name * @param array $options should have two elements with keys groupid and courseid. */ public function __construct($name, $options) { global $CFG; parent::__construct($name, $options); $this->groupid = $options['groupid']; $this->courseid = $options['courseid']; require_once($CFG->dirroot . '/group/lib.php'); }
/** * Constructor method * @param string $name * @param array $options */ public function __construct($name, $options) { $this->maxusersperpage = 50; parent::__construct($name, $options); if (isset($options['bookingid'])) { $this->bookingid = $options['bookingid']; } if (isset($options['potentialusers'])) { $this->potentialusers = $options['potentialusers']; } if (isset($options['optionid'])) { $this->optionid = $options['optionid']; } }
public function __construct($name, $options) { $this->companyid = $options['companyid']; $this->licenseid = $options['licenseid']; $this->departmentid = $options['departmentid']; $this->subdepartments = $options['subdepartments']; $this->parentdepartmentid = $options['parentdepartmentid']; parent::__construct($name, $options); }
public function __construct($name, $options) { $this->hostid = $options['hostid']; $this->remotecourseid = $options['remotecourseid']; parent::__construct($name, $options); }
/** * Instatiates the filters and creates the selector using the parent contstructor * * @param string $name * @param array $options * @param array $filters */ public function __construct($name, $options = array(), $filters = array()) { $this->filters = array('sessionid' => array(), 'courseid' => array(), 'studentid' => array(), 'teacherid' => array()); array_filter($filters, function ($filter) use(&$filters) { if (in_array(key($filters), array_keys($this->filters))) { $return = true; } else { $return = false; } next($filters); return $return; }); $this->filters = $filters; return parent::__construct($name, $options); }