PageRenderTime 622ms queryFilters 0ms Sphinxql 132ms GetByIds 473ms meta 0ms repositoryFilters 0ms languageFilters 0ms sourceFilters 0ms

702 results for 'php settype repo:moodle/moodle' (622 ms)

Source

Language

Repository

assignment.class.php git://github.com/moodle/moodle.git | text | 0 lines
1<?php
2
23 */
24require_once($CFG->dirroot.'/mod/assignment/lib.php');
25require_once(dirname(__FILE__).'/upload_form.php');
43                    $mimetype = $file->get_mimetype();
44                    $path = file_encode_url($CFG->wwwroot.'/pluginfile.php', '/'.$this->context->id.'/mod_assignment/submission/'.$submission->id.'/'.$filename);
45                    $output .= '<a href="'.$path.'" ><img class="icon" src="'.$OUTPUT->pix_url(file_mimetype_icon($mimetype)).'" alt="'.$mimetype.'" />'.s($filename).'</a><br />';
67
68        add_to_log($this->course->id, "assignment", "view", "view.php?id={$this->cm->id}", $this->assignment->id, $this->cm->id);
69
153        }
154        echo $OUTPUT->single_button(new moodle_url('/mod/assignment/type/uploadsingle/upload.php', array('contextid'=>$this->context->id, 'userid'=>$USER->id)), $str, 'get');
155        echo $OUTPUT->box_end();
171        global $CFG, $USER, $DB, $OUTPUT;
172        $viewurl = new moodle_url('/mod/assignment/view.php', array('id'=>$this->cm->id));
173        if (!is_enrolled($this->context, $USER, 'mod/assignment:submit')) {
enrol_form.php git://github.com/moodle/moodle.git | PHP | 361 lines
1<?php
2
29
30require_once($CFG->libdir.'/formslib.php');
31
54        $mform->addElement('hidden', 'id');
55        $mform->setType('id', PARAM_INT);
56        $mform->setDefault('id', $this->instance->courseid);
58        $mform->addElement('hidden', 'instanceid');
59        $mform->setType('instanceid', PARAM_INT);
60        $mform->setDefault('instanceid', $this->instance->id);
62        $mform->addElement('hidden', 'paymentmethod', $paymentmethod);
63        $mform->setType('paymentmethod', PARAM_ALPHA);
64
69        $mform->addRule('lastname', get_string('missinglastname'), 'required', null, 'client');
70        $mform->setType('firstname', PARAM_ALPHANUM);
71        $mform->setType('lastname', PARAM_ALPHANUM);
peer_forms.php git://github.com/moodle/moodle.git | PHP | 191 lines
1<?php
2
18/**
19 * This file contains two forms for adding/editing mnet hosts, used by peers.php
20 *
28
29require_once($CFG->libdir . '/formslib.php');
30
41        $mform->addElement('text', 'wwwroot', get_string('hostname', 'mnet'), array('maxlength' => 255, 'size' => 50));
42        $mform->setType('wwwroot', PARAM_URL);
43        $mform->addRule('wwwroot', null, 'required', null, 'client');
63            return array('wwwroot' => get_string('hostexists', 'mnet',
64                new moodle_url('/admin/mnet/peers.php', array('hostid' => $host->id))));
65        }
81        $mform->addElement('hidden', 'last_connect_time');
82        $mform->setType('last_connect_time', PARAM_INT);
83        $mform->addElement('hidden', 'id');
edit_form.php git://github.com/moodle/moodle.git | PHP | 465 lines
1<?php
2
4
5require_once($CFG->libdir.'/formslib.php');
6require_once($CFG->libdir.'/completionlib.php');
50        $mform->addElement('hidden', 'returnto', null);
51        $mform->setType('returnto', PARAM_ALPHANUM);
52        $mform->setConstant('returnto', $returnto);
54        $mform->addElement('hidden', 'returnurl', null);
55        $mform->setType('returnurl', PARAM_LOCALURL);
56        $mform->setConstant('returnurl', $returnurl);
60        $mform->addRule('fullname', get_string('missingfullname'), 'required', null, 'client');
61        $mform->setType('fullname', PARAM_TEXT);
62        if (!empty($course->id) and !has_capability('moodle/course:changefullname', $coursecontext)) {
69        $mform->addRule('shortname', get_string('missingshortname'), 'required', null, 'client');
70        $mform->setType('shortname', PARAM_TEXT);
71        if (!empty($course->id) and !has_capability('moodle/course:changeshortname', $coursecontext)) {
lib.php git://github.com/moodle/moodle.git | PHP | 3,379 lines
1<?php
2// This file is part of Moodle - http://moodle.org/
25require_once($CFG->libdir . '/gradelib.php');
26require_once($CFG->dirroot . '/grade/export/lib.php');
27
457    $select = new single_select(
458        new moodle_url('/grade/report/'.$report.'/index.php', $gpr->get_options()),
459        'userid', $menu, $userid
536 * @param context $context The course context.
537 * @param string $thispage The relative path for the current page. E.g. /grade/report/user/index.php
538 * @param boolean $return return as string
804        if ($plugin_type == 'report') {
805            $url = $CFG->wwwroot.'/grade/report/index.php?id='.$COURSE->id;
806        }
1705
1706        // If module has grade.php, link to that, otherwise view.php
1707        if ($hasgradephp[$itemmodule]) {
grade_import_form.php git://github.com/moodle/moodle.git | PHP | 172 lines
1<?php
2
21
22require_once $CFG->libdir.'/formslib.php';
23require_once($CFG->libdir.'/gradelib.php');
38        $mform->addElement('hidden', 'id', optional_param('id', 0, PARAM_INT));
39        $mform->setType('id', PARAM_INT);
40        $mform->addElement('header', 'general', get_string('importfile', 'grades'));
75        $mform->addHelpButton('previewrows', 'rowpreviewnum', 'grades');
76        $mform->setType('previewrows', PARAM_INT);
77        $mform->addElement('checkbox', 'forceimport', get_string('forceimport', 'grades'));
79        $mform->setDefault('forceimport', false);
80        $mform->setType('forceimport', PARAM_BOOL);
81        $mform->addElement('hidden', 'groupid', groups_get_course_group($COURSE));
81        $mform->addElement('hidden', 'groupid', groups_get_course_group($COURSE));
82        $mform->setType('groupid', PARAM_INT);
83        $this->add_action_buttons(false, get_string('uploadgrades', 'grades'));
users_forms.php git://github.com/moodle/moodle.git | PHP | 198 lines
1<?php
2// This file is part of Moodle - http://moodle.org/
26
27require_once("$CFG->libdir/formslib.php");
28
50        $mform->addElement('hidden', 'id');
51        $mform->setType('id', PARAM_INT);
52
53        $mform->addElement('hidden', 'user');
54        $mform->setType('user', PARAM_INT);
55
56        $mform->addElement('hidden', 'action');
57        $mform->setType('action', PARAM_ALPHANUMEXT);
58
59        $mform->addElement('hidden', 'ifilter');
60        $mform->setType('ifilter', PARAM_ALPHA);
61
formslib.php git://github.com/moodle/moodle.git | PHP | 3,398 lines
1<?php
2// This file is part of Moodle - http://moodle.org/
19 *
20 * To use formslib then you will want to create a new file purpose_form.php eg. edit_form.php
21 * and you want to name your class something like {modulename}_{purpose}_form. Your class will
24 *
25 * See examples of use of this library in course/edit.php and course/edit_form.php
26 *
29 *              for both or you may lose some submitted data which won't be let through.
30 *      you should be using setType for every form element except select, radio or checkbox
31 *              elements, these elements clean themselves.
39
40/** setup.php includes our hacked pear libs first */
41require_once 'HTML/QuickForm.php';
1443    public static function mock_generate_submit_keys($data = []) {
1444        if (!defined('PHPUNIT_TEST') || !PHPUNIT_TEST) {
1445            throw new \moodle_exception("This function can only be used for unit testing.");
importgradesform.php https://bitbucket.org/moodle/moodle.git | PHP | 204 lines
1<?php
2// This file is part of Moodle - http://moodle.org/
26
27require_once($CFG->libdir.'/formslib.php');
28require_once($CFG->dirroot.'/mod/assign/feedback/offline/importgradeslib.php');
74        if (!$gradeimporter->init()) {
75            $thisurl = new moodle_url('/mod/assign/view.php', array('action'=>'viewpluginpage',
76                                                                     'pluginsubtype'=>'assignfeedback',
171        $mform->addElement('hidden', 'id', $assignment->get_course_module()->id);
172        $mform->setType('id', PARAM_INT);
173        $mform->addElement('hidden', 'action', 'viewpluginpage');
173        $mform->addElement('hidden', 'action', 'viewpluginpage');
174        $mform->setType('action', PARAM_ALPHA);
175        $mform->addElement('hidden', 'confirm', 'true');
175        $mform->addElement('hidden', 'confirm', 'true');
176        $mform->setType('confirm', PARAM_BOOL);
177        $mform->addElement('hidden', 'plugin', 'offline');
post_form.php https://bitbucket.org/moodle/moodle.git | PHP | 344 lines
1<?php
2
26defined('MOODLE_INTERNAL') || die();
27require_once($CFG->libdir . '/formslib.php');
28require_once($CFG->dirroot . '/repository/lib.php');
114        $mform->addElement('text', 'subject', get_string('subject', 'forum'), 'size="48"');
115        $mform->setType('subject', PARAM_TEXT);
116        $mform->addRule('subject', get_string('required'), 'required', null, 'client');
119        $mform->addElement('editor', 'message', get_string('message', 'forum'), null, self::editor_options($modcontext, (empty($post->id) ? null : $post->id)));
120        $mform->setType('message', PARAM_RAW);
121        $mform->addRule('message', get_string('required'), 'required', null, 'client');
231                    $mform->setDefault('groupinfo', $post->groupid);
232                    $mform->setType('groupinfo', PARAM_INT);
233                } else {
256                $mform->addElement('hidden', 'timestart');
257                $mform->setType('timestart', PARAM_INT);
258                $mform->addElement('hidden', 'timeend');
edit_form.php https://bitbucket.org/moodle/moodle.git | PHP | 252 lines
1<?php
2// This file is part of Moodle - http://moodle.org/
28
29require_once($CFG->libdir . '/formslib.php');
30require_once($CFG->libdir . '/badgeslib.php');
30require_once($CFG->libdir . '/badgeslib.php');
31require_once($CFG->libdir . '/filelib.php');
32
51        // Using PARAM_FILE to avoid problems later when downloading badge files.
52        $mform->setType('name', PARAM_FILE);
53        $mform->addRule('name', null, 'required');
56        $mform->addElement('textarea', 'description', get_string('description', 'badges'), 'wrap="virtual" rows="8" cols="70"');
57        $mform->setType('description', PARAM_NOTAGS);
58        $mform->addRule('description', null, 'required');
74        $mform->addElement('text', 'issuername', get_string('name'), array('size' => '70'));
75        $mform->setType('issuername', PARAM_NOTAGS);
76        $mform->addRule('issuername', null, 'required');
database_transfer_form.php git://github.com/moodle/moodle.git | PHP | 116 lines
1<?php
2// This file is part of Moodle - http://moodle.org/
26
27require_once($CFG->libdir.'/formslib.php');
28require_once(__DIR__.'/locallib.php');
54        $mform->addElement('select', 'driver', get_string('dbtype', 'install'), $drivers);
55        $mform->setType('driver', PARAM_RAW);
56
57        $mform->addElement('text', 'dbhost', get_string('databasehost', 'install'));
58        $mform->setType('dbhost', PARAM_HOST);
59
60        $mform->addElement('text', 'dbname', get_string('databasename', 'install'));
61        $mform->setType('dbname', PARAM_ALPHANUMEXT);
62
63        $mform->addElement('text', 'dbuser', get_string('databaseuser', 'install'));
64        $mform->setType('dbuser', PARAM_ALPHANUMEXT);
65
input.php git://github.com/moodle/moodle.git | PHP | 211 lines
1<?php
2/* vim: set expandtab tabstop=4 shiftwidth=4: */
3// +----------------------------------------------------------------------+
4// | PHP version 4.0                                                      |
5// +----------------------------------------------------------------------+
5// +----------------------------------------------------------------------+
6// | Copyright (c) 1997, 1998, 1999, 2000, 2001 The PHP Group             |
7// +----------------------------------------------------------------------+
7// +----------------------------------------------------------------------+
8// | This source file is subject to version 2.0 of the PHP license,       |
9// | that is bundled with this package in the file LICENSE, and is        |
10// | available at through the world-wide-web at                           |
11// | http://www.php.net/license/2_02.txt.                                 |
12// | If you did not receive a copy of the PHP license and are unable to   |
13// | obtain it through the world-wide-web, please send a note to          |
14// | license@php.net so we can mail you a copy immediately.               |
15// +----------------------------------------------------------------------+
assignment.class.php https://bitbucket.org/moodle/moodle.git | PHP | 473 lines
1<?php
2
23 */
24require_once($CFG->dirroot.'/mod/assignment/lib.php');
25require_once(dirname(__FILE__).'/upload_form.php');
43                    $mimetype = $file->get_mimetype();
44                    $path = file_encode_url($CFG->wwwroot.'/pluginfile.php', '/'.$this->context->id.'/mod_assignment/submission/'.$submission->id.'/'.$filename);
45                    $output .= '<a href="'.$path.'" >'.$OUTPUT->pix_icon(file_file_icon($file), get_mimetype_description($file), 'moodle', array('class' => 'icon')).s($filename).'</a><br />';
67
68        add_to_log($this->course->id, "assignment", "view", "view.php?id={$this->cm->id}", $this->assignment->id, $this->cm->id);
69
189        }
190        echo $OUTPUT->single_button(new moodle_url('/mod/assignment/type/uploadsingle/upload.php', array('contextid'=>$this->context->id, 'userid'=>$USER->id)), $str, 'get');
191        echo $OUTPUT->box_end();
206        global $CFG, $USER, $DB, $OUTPUT;
207        $viewurl = new moodle_url('/mod/assignment/view.php', array('id'=>$this->cm->id));
208        if (!is_enrolled($this->context, $USER, 'mod/assignment:submit')) {
post_form.php git://github.com/moodle/moodle.git | PHP | 184 lines
1<?php
2
27
28require_once($CFG->libdir.'/formslib.php');
29
51        $mform->addElement('text', 'subject', get_string('subject', 'forum'), 'size="48"');
52        $mform->setType('subject', PARAM_TEXT);
53        $mform->addRule('subject', get_string('required'), 'required', null, 'client');
56        $mform->addElement('editor', 'message', get_string('message', 'forum'), null, $editoroptions);
57        $mform->setType('message', PARAM_RAW);
58        $mform->addRule('message', get_string('required'), 'required', null, 'client');
63            $mform->addElement('hidden', 'subscribe');
64            $mform->setType('subscribe', PARAM_INT);
65            $mform->addHelpButton('subscribemessage', 'subscription', 'forum');
78                $mform->addElement('hidden', 'subscribe');
79                $mform->setType('subscribe', PARAM_INT);
80                $mform->addHelpButton('subscribemessage', 'subscription', 'forum');
post_form.php git://github.com/moodle/moodle.git | text | 0 lines
1<?php
2
27
28require_once($CFG->libdir.'/formslib.php');
29
51        $mform->addElement('text', 'subject', get_string('subject', 'forum'), 'size="48"');
52        $mform->setType('subject', PARAM_TEXT);
53        $mform->addRule('subject', get_string('required'), 'required', null, 'client');
56        $mform->addElement('editor', 'message', get_string('message', 'forum'), null, $editoroptions);
57        $mform->setType('message', PARAM_RAW);
58        $mform->addRule('message', get_string('required'), 'required', null, 'client');
63            $mform->addElement('hidden', 'subscribe');
64            $mform->setType('subscribe', PARAM_INT);
65            $mform->addHelpButton('subscribemessage', 'subscription', 'forum');
78                $mform->addElement('hidden', 'subscribe');
79                $mform->setType('subscribe', PARAM_INT);
80                $mform->addHelpButton('subscribemessage', 'subscription', 'forum');
importgradesform.php git://github.com/moodle/moodle.git | PHP | 204 lines
1<?php
2// This file is part of Moodle - http://moodle.org/
26
27require_once($CFG->libdir.'/formslib.php');
28require_once($CFG->dirroot.'/mod/assign/feedback/offline/importgradeslib.php');
74        if (!$gradeimporter->init()) {
75            $thisurl = new moodle_url('/mod/assign/view.php', array('action'=>'viewpluginpage',
76                                                                     'pluginsubtype'=>'assignfeedback',
171        $mform->addElement('hidden', 'id', $assignment->get_course_module()->id);
172        $mform->setType('id', PARAM_INT);
173        $mform->addElement('hidden', 'action', 'viewpluginpage');
173        $mform->addElement('hidden', 'action', 'viewpluginpage');
174        $mform->setType('action', PARAM_ALPHA);
175        $mform->addElement('hidden', 'confirm', 'true');
175        $mform->addElement('hidden', 'confirm', 'true');
176        $mform->setType('confirm', PARAM_BOOL);
177        $mform->addElement('hidden', 'plugin', 'offline');
item_form.php git://github.com/moodle/moodle.git | PHP | 483 lines
1<?php
2// This file is part of Moodle - http://moodle.org/
28
29require_once $CFG->libdir.'/formslib.php';
30
44        $mform->addElement('text', 'itemname', get_string('itemname', 'grades'));
45        $mform->setType('itemname', PARAM_TEXT);
46        $mform->addElement('text', 'iteminfo', get_string('iteminfo', 'grades'));
47        $mform->addHelpButton('iteminfo', 'iteminfo', 'grades');
48        $mform->setType('iteminfo', PARAM_TEXT);
49
51        $mform->addHelpButton('idnumber', 'idnumbermod');
52        $mform->setType('idnumber', PARAM_RAW);
53
115        $mform->disabledIf('grademax', 'gradetype', 'noteq', GRADE_TYPE_VALUE);
116        $mform->setType('grademax', PARAM_RAW);
117
category_form.php git://github.com/moodle/moodle.git | PHP | 575 lines
1<?php
2// This file is part of Moodle - http://moodle.org/
28
29require_once $CFG->libdir.'/formslib.php';
30
44        $mform->addElement('text', 'fullname', get_string('categoryname', 'grades'));
45        $mform->setType('fullname', PARAM_TEXT);
46        $mform->addRule('fullname', null, 'required', null, 'client');
63            $mform->addElement('hidden', 'aggregateoutcomes');
64            $mform->setType('aggregateoutcomes', PARAM_INT);
65        } else {
73        $mform->addElement('text', 'keephigh', get_string('keephigh', 'grades'), 'size="3"');
74        $mform->setType('keephigh', PARAM_INT);
75        $mform->addHelpButton('keephigh', 'keephigh', 'grades');
80        $mform->addElement('text', 'droplow', get_string('droplow', 'grades'), 'size="3"');
81        $mform->setType('droplow', PARAM_INT);
82        $mform->addHelpButton('droplow', 'droplow', 'grades');
autogroup_form.php git://github.com/moodle/moodle.git | PHP | 253 lines
1<?php
2// This file is part of Moodle - http://moodle.org/
28
29require_once($CFG->dirroot.'/lib/formslib.php');
30require_once($CFG->dirroot.'/cohort/lib.php');
54        $mform->addRule('namingscheme', get_string('required'), 'required', null, 'client');
55        $mform->setType('namingscheme', PARAM_TEXT);
56        // There must not be duplicate group names in course.
67        $mform->addElement('text', 'number', get_string('number', 'group'),'maxlength="4" size="4"');
68        $mform->setType('number', PARAM_INT);
69        $mform->addRule('number', null, 'numeric', null, 'client');
101            $mform->addElement('hidden','cohortid');
102            $mform->setType('cohortid', PARAM_INT);
103            $mform->setConstant('cohortid', '0');
116            $mform->addElement('hidden', 'groupingid');
117            $mform->setType('groupingid', PARAM_INT);
118            $mform->setConstant('groupingid', 0);
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21