当前位置: 首页>>代码示例>>PHP>>正文


PHP moodleform::__construct方法代码示例

本文整理汇总了PHP中moodleform::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP moodleform::__construct方法的具体用法?PHP moodleform::__construct怎么用?PHP moodleform::__construct使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在moodleform的用法示例。


在下文中一共展示了moodleform::__construct方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 public function __construct(scheduler_appointment $appointment, $action, $editgrade, $distribute)
 {
     $this->appointment = $appointment;
     $this->distribute = $distribute;
     $this->editgrade = $editgrade;
     parent::__construct($action, null);
 }
开发者ID:ninelanterns,项目名称:moodle-mod_scheduler,代码行数:7,代码来源:appointmentforms.php

示例2: __construct

 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);
 }
开发者ID:sumitnegi933,项目名称:Moodle_lms_New,代码行数:33,代码来源:company_managers_form.php

示例3: __construct

 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);
 }
开发者ID:sumitnegi933,项目名称:Moodle_lms_New,代码行数:27,代码来源:company_courses_form.php

示例4: __construct

 /**
  * 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());
 }
开发者ID:gabrielrosset,项目名称:moodle-local_vmoodle,代码行数:33,代码来源:Command_Form.php

示例5: __construct

 public function __construct($actionurl, $isadding, $companyid, $classroomid)
 {
     $this->isadding = $isadding;
     $this->classroomid = $classroomid;
     $this->companyid = $companyid;
     parent::__construct($actionurl);
 }
开发者ID:sumitnegi933,项目名称:Moodle_lms_New,代码行数:7,代码来源:classroom_edit_form.php

示例6: __construct

    /**
     * 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');
    }
开发者ID:educacionbe,项目名称:campus,代码行数:16,代码来源:upload_form.php

示例7: __construct

 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');
 }
开发者ID:elie89,项目名称:moodle,代码行数:25,代码来源:moodleform_mod.php

示例8: __construct

 public function __construct($url, $datafields, $cm, $data)
 {
     $this->_datafields = $datafields;
     $this->_cm = $cm;
     $this->_data = $data;
     parent::__construct($url);
 }
开发者ID:anawu2006,项目名称:PeerLearning,代码行数:7,代码来源:export_form.php

示例9: __construct

 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);
 }
开发者ID:sumitnegi933,项目名称:Moodle_lms_New,代码行数:25,代码来源:company_users_licenses_form.php

示例10: __construct

 public function __construct($actionurl, $invoiceid)
 {
     global $CFG;
     $this->invoiceid = $invoiceid;
     $this->context = context_coursecat::instance($CFG->defaultrequestcategory);
     parent::__construct($actionurl);
 }
开发者ID:sumitnegi933,项目名称:Moodle_lms_New,代码行数:7,代码来源:edit_order_form.php

示例11: __construct

 public function __construct($page, $number, $varid = -1)
 {
     //-1 if new variation
     $this->number = $number;
     $this->varid = $varid;
     parent::__construct($page);
 }
开发者ID:go38,项目名称:moodle-mod_vpl,代码行数:7,代码来源:variations.php

示例12:

 function timetracker_hourlog_form($context, $userid, $courseid)
 {
     $this->context = $context;
     $this->userid = $userid;
     $this->courseid = $courseid;
     parent::__construct();
 }
开发者ID:hughesbradc,项目名称:TimeTracker,代码行数:7,代码来源:timetracker_hourlog_form.php

示例13:

 function timetracker_updateworkerinfo_form($context, $courseid, $mdluserid)
 {
     $this->context = $context;
     $this->courseid = $courseid;
     $this->mdluserid = $mdluserid;
     parent::__construct();
 }
开发者ID:hughesbradc,项目名称:TimeTracker,代码行数:7,代码来源:timetracker_updateworkerinfo_form.php

示例14:

 function __construct($actionurl, $block, $page)
 {
     global $CFG;
     $this->block = $block;
     $this->page = $page;
     parent::__construct($actionurl);
 }
开发者ID:evltuma,项目名称:moodle,代码行数:7,代码来源:edit_form.php

示例15: __construct

 /**
  * 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');
 }
开发者ID:pinky28,项目名称:demo_congrea,代码行数:14,代码来源:upload_form.php


注:本文中的moodleform::__construct方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。