public function __construct(scheduler_appointment $appointment, $action, $editgrade, $distribute) { $this->appointment = $appointment; $this->distribute = $distribute; $this->editgrade = $editgrade; parent::__construct($action, null); }
public function __construct($actionurl, $context, $companyid, $deptid, $roleid, $showothermanagers) { global $USER; $this->selectedcompany = $companyid; $this->context = $context; $this->departmentid = $deptid; $this->roletype = $roleid; /* GWL : */ if (!iomad::has_capability('block/iomad_company_admin:company_add', context_system::instance())) { $this->showothermanagers = false; } else { $this->showothermanagers = $showothermanagers; } $company = new company($this->selectedcompany); $parentlevel = company::get_company_parentnode($company->id); $this->companydepartment = $parentlevel->id; if (iomad::has_capability('block/iomad_company_admin:edit_all_departments', context_system::instance())) { $userhierarchylevel = $parentlevel->id; } else { $userlevel = company::get_userlevel($USER); $userhierarchylevel = $userlevel->id; } $this->subhierarchieslist = company::get_all_subdepartments($userhierarchylevel); if ($this->departmentid == 0) { $departmentid = $userhierarchylevel; } else { $departmentid = $this->departmentid; } $options = array('context' => $this->context, 'companyid' => $this->selectedcompany, 'departmentid' => $departmentid, 'roletype' => $this->roletype, 'subdepartments' => $this->subhierarchieslist, 'parentdepartmentid' => $parentlevel, 'showothermanagers' => $this->showothermanagers); $this->potentialusers = new potential_department_user_selector('potentialmanagers', $options); $this->currentusers = new current_department_user_selector('currentmanagers', $options); parent::__construct($actionurl); }
public function __construct($actionurl, $context, $companyid, $departmentid) { global $USER; $this->selectedcompany = $companyid; $this->context = $context; $this->departmentid = $departmentid; $company = new company($this->selectedcompany); $parentlevel = company::get_company_parentnode($company->id); $this->companydepartment = $parentlevel->id; $syscontext = context_system::instance(); if (iomad::has_capability('block/iomad_company_admin:edit_all_departments', $syscontext)) { $userhierarchylevel = $parentlevel->id; } else { $userlevel = company::get_userlevel($USER); $userhierarchylevel = $userlevel->id; } $this->subhierarchieslist = company::get_all_subdepartments($userhierarchylevel); if ($this->departmentid == 0) { $departmentid = $userhierarchylevel; } else { $departmentid = $this->departmentid; } $options = array('context' => $this->context, 'companyid' => $this->selectedcompany, 'departmentid' => $departmentid, 'subdepartments' => $this->subhierarchieslist, 'parentdepartmentid' => $parentlevel, 'shared' => false, 'partialshared' => true); $this->potentialcourses = new potential_company_course_selector('potentialcourses', $options); $this->currentcourses = new current_company_course_selector('currentcourses', $options); parent::__construct($actionurl); }
/** * Constructor. * @param Command $command The Command to link to the form. * @param int $mode The form mode. */ public function __construct(Command $command, $mode) { // Checking command. if (is_null($command)) { throw new Command_Exception('commandformnotlinked'); } // Linking the command and her category. $this->command = $command; // Setting configuration. $this->mode = $mode; // Setting form action. switch ($mode) { case self::MODE_COMMAND_CHOICE: $url = new moodle_url('/local/vmoodle/view.php', array('view' => 'sadmin', 'what' => 'validateassistedcommand')); break; case self::MODE_RETRIEVE_PLATFORM: $url = new moodle_url('/local/vmoodle/view.php', array('view' => 'sadmin', 'what' => 'gettargetbyvalue')); break; case self::MODE_DISPLAY_COMMAND: $url = new moodle_url('/local/vmoodle/view.php', array('view' => 'targetchoice')); break; default: throw new Command_Exception('badformmode'); break; } // Calling parent's constructor. parent::__construct($url->out()); }
public function __construct($actionurl, $isadding, $companyid, $classroomid) { $this->isadding = $isadding; $this->classroomid = $classroomid; $this->companyid = $companyid; parent::__construct($actionurl); }
/** * Constructor. * @param moodle_url $submiturl the form action URL. * @param object course module object. * @param object the quiz settings object. * @param context the quiz context. * @param bool editing group override (true) or user override (false). * @param object $override the override being edited, if it already exists. */ public function __construct($submiturl, $cm, $virtualclass, $context) { $this->cm = $cm; $this->virtualclass = $virtualclass; $this->context = $context; parent::__construct($submiturl, null, 'post'); }
public function __construct($current, $section, $cm, $course) { global $CFG; $this->current = $current; $this->_instance = $current->instance; $this->_section = $section; $this->_cm = $cm; if ($this->_cm) { $this->context = context_module::instance($this->_cm->id); } else { $this->context = context_course::instance($course->id); } // Set the course format. require_once $CFG->dirroot . '/course/format/lib.php'; $this->courseformat = course_get_format($course); // Guess module name $matches = array(); if (!preg_match('/^mod_([^_]+)_mod_form$/', get_class($this), $matches)) { debugging('Use $modname parameter or rename form to mod_xx_mod_form, where xx is name of your module'); print_error('unknownmodulename'); } $this->_modname = $matches[1]; $this->init_features(); parent::__construct('modedit.php'); }
public function __construct($url, $datafields, $cm, $data) { $this->_datafields = $datafields; $this->_cm = $cm; $this->_data = $data; parent::__construct($url); }
public function __construct($actionurl, $context, $companyid, $departmentid, $userid, $licenseid) { global $USER, $DB; $this->selectedcompany = $companyid; $this->context = $context; $company = new company($this->selectedcompany); $this->parentlevel = company::get_company_parentnode($company->id); $this->companydepartment = $this->parentlevel->id; $this->licenseid = $licenseid; if (iomad::has_capability('block/iomad_company_admin:edit_all_departments', context_system::instance())) { $userhierarchylevel = $this->parentlevel->id; } else { $userlevel = company::get_userlevel($USER); $userhierarchylevel = $userlevel->id; } $this->subhierarchieslist = company::get_all_subdepartments($userhierarchylevel); if ($departmentid == 0) { $this->departmentid = $userhierarchylevel; } else { $this->departmentid = $departmentid; } $this->userid = $userid; $this->user = $DB->get_record('user', array('id' => $this->userid)); parent::__construct($actionurl); }
public function __construct($actionurl, $invoiceid) { global $CFG; $this->invoiceid = $invoiceid; $this->context = context_coursecat::instance($CFG->defaultrequestcategory); parent::__construct($actionurl); }
public function __construct($page, $number, $varid = -1) { //-1 if new variation $this->number = $number; $this->varid = $varid; parent::__construct($page); }
function timetracker_hourlog_form($context, $userid, $courseid) { $this->context = $context; $this->userid = $userid; $this->courseid = $courseid; parent::__construct(); }
function timetracker_updateworkerinfo_form($context, $courseid, $mdluserid) { $this->context = $context; $this->courseid = $courseid; $this->mdluserid = $mdluserid; parent::__construct(); }
function __construct($actionurl, $block, $page) { global $CFG; $this->block = $block; $this->page = $page; parent::__construct($actionurl); }
/** * Constructor. * @param moodle_url $submiturl the form action URL. * @param object course module object. * @param object the congrea object. * @param context the congrea context. */ public function __construct($submiturl, $cm, $congrea, $context) { $this->cm = $cm; $this->congrea = $congrea; $this->context = $context; parent::__construct($submiturl, null, 'post'); }
/** * This method constructs a the form based on the number of sections, headers, and * the courseid. * * @param int $numberofsections The total number of sections in the course. * @param array $sectionheaders Array of strings containing the headers for all of the sections. * @param int $courseid The ID of the course to create the form for. * */ public function __construct($numberofsections, $sectionheaders, $courseid) { $this->numberofsections = $numberofsections; $this->sectionheaders = $sectionheaders; $this->courseid = $courseid; parent::__construct(); }
public function __construct(UserReviewTable $urt, $renderer, $review_step) { //just before parent's construct $this->urt = $urt; $this->output = $renderer; $this->review_step = $review_step; parent::__construct(); }
/** * Constructor. * @param string $mode The action to call from controler. * @param array $platform_form Data to input in fields. */ public function __construct($mode, $platform_form = null) { // Settings mode and data. $this->mode = $mode; $this->platform_form = $platform_form; // Calling parent's constructor. parent::__construct(new moodle_url('/local/vmoodle/view.php', array('view' => 'management', 'what' => 'do' . $this->mode, 'page' => $this->mode))); }
function timetracker_workersig_form($courseid, $userid, $start, $end) { $this->courseid = $courseid; $this->userid = $userid; $this->start = $start; $this->end = $end; parent::__construct(); }
/** * constructor */ public function __construct($action = null, $customdata = null, $method = 'post', $target = '', $attributes = null, $editable = true) { if (method_exists('moodleform', '__construct')) { parent::__construct($action, $customdata, $method, $target, $attributes, $editable); } else { parent::moodleform($action, $customdata, $method, $target, $attributes, $editable); } }
/** * Constructor * * @param int $mode * @param mod_feedback_structure $structure * @param string $formid CSS id attribute of the form * @param array $customdata */ public function __construct($mode, mod_feedback_structure $structure, $formid, $customdata = null) { $this->mode = $mode; $this->structure = $structure; $this->gopage = isset($customdata['gopage']) ? $customdata['gopage'] : 0; $isanonymous = $this->structure->is_anonymous() ? ' ianonymous' : ''; parent::__construct(null, $customdata, 'POST', '', array('id' => $formid, 'class' => 'feedback_form' . $isanonymous), true); }
public function __construct($hidden, $shownames = true, $showidnumbers = true) { global $CFG; $this->hidden = $hidden; $this->shownames = $shownames; $this->showidnumbers = $showidnumbers; parent::__construct($CFG->wwwroot . '/mod/quiz/report.php', null, 'get'); }
public function __construct($action, scheduler_instance $scheduler, $cm, $usergroups, $customdata = null) { $this->scheduler = $scheduler; $this->cm = $cm; $this->context = context_module::instance($cm->id); $this->usergroups = $usergroups; parent::__construct($action, $customdata); }
public function __construct($action = null, $customdata = null, $method = 'post', $target = '', $attributes = null, $editable = true) { parent::__construct($action, $customdata, $method, $target, $attributes, $editable); if ($data = $this->get_data()) { $this->userselectBeginAttestation = isset($data->intro); $this->userselectAbortAttestation = isset($data->outro); } }
function timetracker_reportgenerator_form($reportstart = 0, $reportend = 0, $catid) { //$this->context = $context; $this->reportstart = $reportstart; $this->reportend = $reportend; $this->catid = $catid; parent::__construct(); }
public function __construct($actionurl, $companyid, $editoroptions) { global $CFG; $this->selectedcompany = $companyid; $this->context = context_coursecat::instance($CFG->defaultrequestcategory); $this->editoroptions = $editoroptions; parent::__construct($actionurl); }
public function __construct($actionurl, $context, $companyid) { $this->selectedcompany = $companyid; $this->context = $context; $options = array('context' => $this->context, 'companyid' => $this->selectedcompany); $this->potentialusers = new potential_company_users_user_selector('potentialusers', $options); $this->currentusers = new current_company_users_user_selector('currentusers', $options); parent::__construct($actionurl); }
public function __construct($hidden, $counts, $shownames, $showidnumbers) { global $CFG; $this->includeauto = !empty($hidden['includeauto']); $this->hidden = $hidden; $this->counts = $counts; $this->shownames = $shownames; $this->showidnumbers = $showidnumbers; parent::__construct($CFG->wwwroot . '/mod/quiz/report.php', null, 'get'); }
function timetracker_reports_form($context, $userid = 0, $courseid = 0, $reportstart = 0, $reportend = 0) { $this->context = $context; $this->userid = $userid; $this->courseid = $courseid; $this->reportstart = $reportstart; $this->reportend = $reportend; parent::__construct(); }
function timetracker_alert_form($context, $userid, $courseid, $unitid, $ispending = false) { $this->context = $context; $this->userid = $userid; $this->courseid = $courseid; $this->unitid = $unitid; $this->ispending = $ispending; parent::__construct(); }