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


PHP moodleform::moodleform方法代码示例

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


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

示例1:

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

示例2:

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

示例3:

 /**
  * Add question-type specific form fields.
  *
  * @param MoodleQuickForm $mform the form being built.
  */
 function question_dataset_dependent_definitions_form($submiturl, $question)
 {
     global $QTYPES;
     $this->question = $question;
     $this->qtypeobj =& $QTYPES[$this->question->qtype];
     parent::moodleform($submiturl);
 }
开发者ID:nicolasconnault,项目名称:moodle2.0,代码行数:12,代码来源:datasetdefinitions_form.php

示例4:

 function moodleform_mod($instance, $section, $cm)
 {
     $this->_instance = $instance;
     $this->_section = $section;
     $this->_cm = $cm;
     parent::moodleform('modedit.php');
 }
开发者ID:JackCanada,项目名称:moodle-hacks,代码行数:7,代码来源:moodleform_mod.php

示例5: __construct

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

示例6: array

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

示例7: array

 /**
  * Add question-type specific form fields.
  *
  * @param MoodleQuickForm $mform the form being built.
  */
 function question_dataset_dependent_items_form($submiturl, $question, $regenerate)
 {
     global $QTYPES, $SESSION, $CFG, $DB;
     $this->regenerate = $regenerate;
     $this->question = $question;
     $this->qtypeobj =& $QTYPES[$this->question->qtype];
     // Validate the question category.
     if (!($category = $DB->get_record('question_categories', array('id' => $question->category)))) {
         print_error('categorydoesnotexist', 'question', $returnurl);
     }
     $this->category = $category;
     $this->categorycontext = get_context_instance_by_id($category->contextid);
     //get the dataset defintions for this question
     if (empty($question->id)) {
         $this->datasetdefs = $this->qtypeobj->get_dataset_definitions($question->id, $SESSION->calculated->definitionform->dataset);
     } else {
         if (empty($question->options)) {
             $this->get_question_options($question);
         }
         $this->datasetdefs = $this->qtypeobj->get_dataset_definitions($question->id, array());
     }
     foreach ($this->datasetdefs as $datasetdef) {
         // Get maxnumber
         if ($this->maxnumber == -1 || $datasetdef->itemcount < $this->maxnumber) {
             $this->maxnumber = $datasetdef->itemcount;
         }
     }
     foreach ($this->datasetdefs as $defid => $datasetdef) {
         if (isset($datasetdef->id)) {
             $this->datasetdefs[$defid]->items = $this->qtypeobj->get_database_dataset_items($datasetdef->id);
         }
     }
     parent::moodleform($submiturl);
 }
开发者ID:ajv,项目名称:Offline-Caching,代码行数:39,代码来源:datasetitems_form.php

示例8:

 function __construct($view, $action, $type, $url)
 {
     $this->view = $view;
     $this->action = $action;
     $this->type = $type;
     parent::moodleform($url);
 }
开发者ID:SmartPlanetInternational,项目名称:moodle-mod_customlabel,代码行数:7,代码来源:EditValueForm.php

示例9:

 function __construct($actionurl, $basket, $paymentprovider)
 {
     global $CFG;
     $this->basket = $basket;
     $this->paymentprovider = $paymentprovider;
     parent::moodleform($actionurl);
 }
开发者ID:sumitnegi933,项目名称:Moodle_lms_New,代码行数:7,代码来源:review.php

示例10:

 function __construct($actionurl, $isadding, $name, $description)
 {
     $this->isadding = $isadding;
     $this->name = $name;
     $this->description = $description;
     parent::moodleform($actionurl);
 }
开发者ID:adrianrv,项目名称:moodle-block_course_files_license,代码行数:7,代码来源:editlicense.php

示例11: array

 /**
  * Add question-type specific form fields.
  *
  * @param MoodleQuickForm $mform the form being built.
  */
 function question_dataset_dependent_items_form($submiturl, $question, $regenerate)
 {
     global $QTYPES, $SESSION, $CFG;
     $this->regenerate = $regenerate;
     $this->question = $question;
     $this->qtypeobj =& $QTYPES[$this->question->qtype];
     //get the dataset defintions for this question
     if (empty($question->id)) {
         $this->datasetdefs = $this->qtypeobj->get_dataset_definitions($question->id, $SESSION->datasetdependent->definitionform->dataset);
     } else {
         if (empty($question->options)) {
             $this->get_question_options($question);
         }
         $this->datasetdefs = $this->qtypeobj->get_dataset_definitions($question->id, array());
     }
     foreach ($this->datasetdefs as $datasetdef) {
         // Get maxnumber
         if ($this->maxnumber == -1 || $datasetdef->itemcount < $this->maxnumber) {
             $this->maxnumber = $datasetdef->itemcount;
         }
     }
     foreach ($this->datasetdefs as $defid => $datasetdef) {
         if (isset($datasetdef->id)) {
             $this->datasetdefs[$defid]->items = get_records_sql(" SELECT itemnumber, definition, id, value\n                          FROM {$CFG->prefix}question_dataset_items\n                          WHERE definition = {$datasetdef->id} ");
         }
     }
     parent::moodleform($submiturl);
 }
开发者ID:veritech,项目名称:pare-project,代码行数:33,代码来源:datasetitems_form.php

示例12: __construct

 public function __construct($action = null, $customdata = null, $method = 'post', $target = '', $attributes = null, $editable = true)
 {
     if (is_array($customdata)) {
         $this->set_customdata($customdata);
         $customdata = '';
     }
     return parent::moodleform($action, $customdata, $method, $target, $attributes, $editable);
 }
开发者ID:POETGroup,项目名称:moodle-local_globalmessage,代码行数:8,代码来源:form.php

示例13: __construct

 public function __construct($actionurl, $companyid, $courseid)
 {
     $this->selectedcompany = $companyid;
     $this->course = $courseid;
     /* $this->departmentid = $department;
        $this->titleid = $title; */
     parent::moodleform($actionurl);
 }
开发者ID:sumitnegi933,项目名称:Moodle_lms_New,代码行数:8,代码来源:addcoursetodepttitle.php

示例14: __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);
     }
 }
开发者ID:gbateson,项目名称:moodle-block_taskchain_navigation,代码行数:11,代码来源:import_form.php

示例15:

 function question_edit_form($submiturl, $question, $category, $contexts, $formeditable = true)
 {
     $this->question = $question;
     $this->contexts = $contexts;
     $this->category = $category;
     $this->categorycontext = get_context_instance_by_id($category->contextid);
     //course id or site id depending on question cat context
     $this->coursefilesid = get_filesdir_from_context(get_context_instance_by_id($category->contextid));
     parent::moodleform($submiturl, null, 'post', '', null, $formeditable);
 }
开发者ID:nicolasconnault,项目名称:moodle2.0,代码行数:10,代码来源:edit_question_form.php


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