Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/Moodle/mod/print/mod_form.php
diff options
context:
space:
mode:
Diffstat (limited to 'Moodle/mod/print/mod_form.php')
-rwxr-xr-xMoodle/mod/print/mod_form.php52
1 files changed, 52 insertions, 0 deletions
diff --git a/Moodle/mod/print/mod_form.php b/Moodle/mod/print/mod_form.php
new file mode 100755
index 0000000..ce519d8
--- /dev/null
+++ b/Moodle/mod/print/mod_form.php
@@ -0,0 +1,52 @@
+<?php
+require_once ($CFG->dirroot.'/course/moodleform_mod.php');
+
+class mod_print_mod_form extends moodleform_mod {
+
+ function definition() {
+ global $CFG;
+ $mform =& $this->_form;
+
+
+ require_once($CFG->dirroot.'/mod/print/lib.php');
+ $assignmentclass = 'print_base';
+ $assignmentinstance = new $assignmentclass();
+
+//-------------------------------------------------------------------------------
+ $mform->addElement('header', 'general', get_string('general', 'form'));
+
+ $mform->addElement('text', 'name', get_string('assignmentname', 'assignment'), array('size'=>'64'));
+ if (!empty($CFG->formatstringstriptags)) {
+ $mform->setType('name', PARAM_TEXT);
+ } else {
+ $mform->setType('name', PARAM_CLEAN);
+ }
+ $mform->addRule('name', null, 'required', null, 'client');
+
+ $mform->addElement('htmleditor', 'description', get_string('description', 'assignment'));
+ $mform->setType('description', PARAM_RAW);
+ $mform->setHelpButton('description', array('writing', 'questions', 'richtext'), false, 'editorhelpbutton');
+ $mform->addRule('description', get_string('required'), 'required', null, 'client');
+
+
+ $mform->addElement('date_time_selector', 'timeavailable', get_string('availabledate', 'assignment'), array('optional'=>true));
+ $mform->setDefault('timeavailable', time());
+
+ $ynoptions = array( 0 => get_string('no'), 1 => get_string('yes'));
+
+ $mform->addElement('header', 'typedesc', get_string('typeupload','assignment'));
+ $assignmentinstance->setup_elements($mform);
+
+ $features = new stdClass;
+ $features->groups = true;
+ $features->groupings = true;
+ $features->groupmembersonly = true;
+ $this->standard_coursemodule_elements($features);
+
+ $this->add_action_buttons();
+ }
+
+
+
+}
+?> \ No newline at end of file