function mod_data_export_form($url, $datafields, $cm, $data) { $this->_datafields = $datafields; $this->_cm = $cm; $this->_data = $data; parent::moodleform($url); }
function __construct($actionurl, $block, $page) { global $CFG; $this->block = $block; $this->page = $page; parent::moodleform($actionurl); }
/** * 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); }
function moodleform_mod($instance, $section, $cm) { $this->_instance = $instance; $this->_section = $section; $this->_cm = $cm; parent::moodleform('modedit.php'); }
public function __construct($actionurl, $companyid, $department, $title) { $this->selectedcompany = $companyid; $this->department = $department; $this->title = $title; parent::moodleform($actionurl); }
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'); }
/** * 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); }
function __construct($view, $action, $type, $url) { $this->view = $view; $this->action = $action; $this->type = $type; parent::moodleform($url); }
function __construct($actionurl, $basket, $paymentprovider) { global $CFG; $this->basket = $basket; $this->paymentprovider = $paymentprovider; parent::moodleform($actionurl); }
function __construct($actionurl, $isadding, $name, $description) { $this->isadding = $isadding; $this->name = $name; $this->description = $description; parent::moodleform($actionurl); }
/** * 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); }
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); }
public function __construct($actionurl, $companyid, $courseid) { $this->selectedcompany = $companyid; $this->course = $courseid; /* $this->departmentid = $department; $this->titleid = $title; */ parent::moodleform($actionurl); }
/** * 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); } }
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); }
public function quiz_override_form($submiturl, $cm, $quiz, $context, $groupmode, $override) { $this->cm = $cm; $this->quiz = $quiz; $this->context = $context; $this->groupmode = $groupmode; $this->groupid = empty($override->groupid) ? 0 : $override->groupid; $this->userid = empty($override->userid) ? 0 : $override->userid; parent::moodleform($submiturl, null, 'post'); }
function praxe_actionform($action = false, $mode = null) { global $cm; $link = 'view.php?id=' . $cm->id; if ($action) { $link .= "&action={$action}"; } if ($mode) { $link .= "&mode={$mode}"; } parent::moodleform($link); }
/** * 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]; // Validate the question category. if (!($category = get_record('question_categories', 'id', $question->category))) { print_error('categorydoesnotexist', 'question', $returnurl); } $this->category = $category; $this->categorycontext = get_context_instance_by_id($category->contextid); parent::moodleform($submiturl); }
function moodleform_mod($instance, $section, $cm) { $this->_instance = $instance; $this->_section = $section; $this->_cm = $cm; // 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'); }
function question_edit_form($submiturl, $question, $category, $contexts, $formeditable = true) { global $DB; $this->question = $question; $this->contexts = $contexts; $record = $DB->get_record('question_categories', array('id' => $question->category), 'contextid'); $this->context = get_context_instance_by_id($record->contextid); $this->editoroptions = array('subdirs' => 1, 'maxfiles' => EDITOR_UNLIMITED_FILES, 'context' => $this->context); $this->fileoptions = array('subdirs' => 1, 'maxfiles' => -1, 'maxbytes' => -1); $this->category = $category; $this->categorycontext = get_context_instance_by_id($category->contextid); if (!empty($question->id)) { $question->id = (int) $question->id; } parent::moodleform($submiturl, null, 'post', '', null, $formeditable); }
function moodleform_mod($current, $section, $cm, $course) { $this->current = $current; $this->_instance = $current->instance; $this->_section = $section; $this->_cm = $cm; if ($this->_cm) { $this->context = get_context_instance(CONTEXT_MODULE, $this->_cm->id); } else { $this->context = get_context_instance(CONTEXT_COURSE, $course->id); } // 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'); }
function questionnaire_questions_form($action, $moveq = false) { $this->moveq = $moveq; return parent::moodleform($action); }
public function __construct($submiturl, $filter, $context) { $this->filter = $filter; $this->context = $context; parent::moodleform($submiturl); }
function __construct($courses, $types) { $this->types = $types; $this->courses = $courses; parent::moodleform(); }
function mod_data_export_form($url, $datafields) { $this->_datafields = $datafields; parent::moodleform($url); }
function plagiarismdetectorform($plugins) { $this->plugins = $plugins; parent::moodleform(); }
function __construct($actionurl, $isadding, $caneditshared) { $this->isadding = $isadding; $this->caneditshared = $caneditshared; parent::moodleform($actionurl); }
function mod_taoresource_taoresource_entry_form($mode) { $this->taoresource_entry_mode = $mode; parent::moodleform(); }
function mod_groupselect_limits_form($groups) { $this->groups = $groups; parent::moodleform(); }
public function __construct($actionurl, $companyid, $departmentid = 0, $action = 0) { global $CFG; $this->selectedcompany = $companyid; $this->context = context_coursecat::instance($CFG->defaultrequestcategory); $this->deptid = $departmentid; $this->action = $action; parent::moodleform($actionurl); }