本文整理汇总了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);
}
示例2:
function __construct($actionurl, $block, $page)
{
global $CFG;
$this->block = $block;
$this->page = $page;
parent::moodleform($actionurl);
}
示例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);
}
示例4:
function moodleform_mod($instance, $section, $cm)
{
$this->_instance = $instance;
$this->_section = $section;
$this->_cm = $cm;
parent::moodleform('modedit.php');
}
示例5: __construct
public function __construct($actionurl, $companyid, $department, $title)
{
$this->selectedcompany = $companyid;
$this->department = $department;
$this->title = $title;
parent::moodleform($actionurl);
}
示例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');
}
示例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);
}
示例8:
function __construct($view, $action, $type, $url)
{
$this->view = $view;
$this->action = $action;
$this->type = $type;
parent::moodleform($url);
}
示例9:
function __construct($actionurl, $basket, $paymentprovider)
{
global $CFG;
$this->basket = $basket;
$this->paymentprovider = $paymentprovider;
parent::moodleform($actionurl);
}
示例10:
function __construct($actionurl, $isadding, $name, $description)
{
$this->isadding = $isadding;
$this->name = $name;
$this->description = $description;
parent::moodleform($actionurl);
}
示例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);
}
示例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);
}
示例13: __construct
public function __construct($actionurl, $companyid, $courseid)
{
$this->selectedcompany = $companyid;
$this->course = $courseid;
/* $this->departmentid = $department;
$this->titleid = $title; */
parent::moodleform($actionurl);
}
示例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);
}
}
示例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);
}