Example #1
0
    public function definition() {

        $item = $this->_customdata['item'];
        $common = $this->_customdata['common'];
        $positionlist = $this->_customdata['positionlist'];
        $position = $this->_customdata['position'];

        $mform =& $this->_form;

        $mform->addElement('header', 'general', get_string($this->type, 'feedback'));
        $mform->addElement('checkbox', 'required', get_string('required', 'feedback'));

        $mform->addElement('text',
                            'name',
                            get_string('item_name', 'feedback'),
                            array('size'=>FEEDBACK_ITEM_NAME_TEXTBOX_SIZE, 'maxlength'=>255));
        $mform->addElement('text',
                            'label',
                            get_string('item_label', 'feedback'),
                            array('size'=>FEEDBACK_ITEM_LABEL_TEXTBOX_SIZE, 'maxlength'=>255));

        $mform->addElement('text',
                            'rangefrom',
                            get_string('numeric_range_from', 'feedback'),
                            array('size'=>10, 'maxlength'=>10));

        $mform->addElement('text',
                            'rangeto',
                            get_string('numeric_range_to', 'feedback'),
                            array('size'=>10, 'maxlength'=>10));

        parent::definition();
        $this->set_data($item);

    }
Example #2
0
    public function definition() {
        $item = $this->_customdata['item'];
        $common = $this->_customdata['common'];
        $positionlist = $this->_customdata['positionlist'];
        $position = $this->_customdata['position'];

        $mform =& $this->_form;

        $mform->addElement('header', 'general', get_string($this->type, 'feedback'));
        $mform->addElement('checkbox', 'required', get_string('required', 'feedback'));

        $mform->addElement('text',
                            'name',
                            get_string('item_name', 'feedback'),
                            array('size'=>FEEDBACK_ITEM_NAME_TEXTBOX_SIZE, 'maxlength'=>255));
        $mform->addElement('text',
                            'label',
                            get_string('item_label', 'feedback'),
                            array('size'=>FEEDBACK_ITEM_LABEL_TEXTBOX_SIZE, 'maxlength'=>255));

        $mform->addElement('select',
                            'itemsize',
                            get_string('textfield_size', 'feedback').' ',
                            array_slice(range(0, 255), 5, 255, true));

        $mform->addElement('select',
                            'itemmaxlength',
                            get_string('textfield_maxlength', 'feedback').' ',
                            array_slice(range(0, 255), 5, 255, true));

        parent::definition();
        $this->set_data($item);

    }
Example #3
0
    public function definition() {
        global $CFG;

        $item = $this->_customdata['item'];
        $common = $this->_customdata['common'];
        $presentationoptions = $this->_customdata['presentationoptions'];
        $positionlist = $this->_customdata['positionlist'];
        $position = $this->_customdata['position'];

        $context = get_context_instance(CONTEXT_MODULE, $common['cmid']);

        $mform =& $this->_form;

        $mform->addElement('hidden', 'required', 0);
        $mform->setType('required', PARAM_INT);
        $mform->addElement('hidden', 'name', 'label');
        $mform->setType('template', PARAM_ALPHA);
        $mform->addElement('hidden', 'label', '-');
        $mform->setType('label', PARAM_ALPHA);

        $mform->addElement('header', 'general', get_string($this->type, 'feedback'));
        $mform->addElement('editor', 'presentation_editor', '', null, $presentationoptions);
        $mform->setType('presentation_editor', PARAM_CLEANHTML);

        parent::definition();
        $this->set_data($item);

    }
Example #4
0
    public function definition() {
        $item = $this->_customdata['item'];
        $common = $this->_customdata['common'];
        $positionlist = $this->_customdata['positionlist'];
        $position = $this->_customdata['position'];

        $mform =& $this->_form;

        $mform->addElement('header', 'general', get_string($this->type, 'feedback'));

        $mform->addElement('checkbox', 'required', get_string('required', 'feedback'));

        $mform->addElement('text',
                            'name',
                            get_string('item_name', 'feedback'),
                            array('size'=>FEEDBACK_ITEM_NAME_TEXTBOX_SIZE,
                                  'maxlength'=>255));

        $mform->addElement('text',
                            'label',
                            get_string('item_label', 'feedback'),
                            array('size'=>FEEDBACK_ITEM_LABEL_TEXTBOX_SIZE,
                                  'maxlength'=>255));

        $mform->addElement('select',
                            'horizontal',
                            get_string('adjustment', 'feedback').' ',
                            array(0 => get_string('vertical', 'feedback'),
                                  1 => get_string('horizontal', 'feedback')));

        $mform->addElement('select',
                            'subtype',
                            get_string('multichoicetype', 'feedback').' ',
                            array('r'=>get_string('radio', 'feedback'),
                                  'd'=>get_string('dropdown', 'feedback')));

        $mform->addElement('selectyesno',
                           'ignoreempty',
                           get_string('do_not_analyse_empty_submits', 'feedback'));

        $mform->addElement('selectyesno',
                           'hidenoselect',
                           get_string('hide_no_select_option', 'feedback'));

        $mform->addElement('static',
                           'hint',
                           get_string('multichoice_values', 'feedback'),
                           get_string('use_one_line_for_each_value', 'feedback'));

        $this->values = $mform->addElement('textarea',
                            'values',
                            '',
                            'wrap="virtual" rows="10" cols="65"');

        parent::definition();
        $this->set_data($item);

    }
Example #5
0
 function definition()
 {
     $item = $this->_customdata['item'];
     $common = $this->_customdata['common'];
     $positionlist = $this->_customdata['positionlist'];
     $position = $this->_customdata['position'];
     $mform =& $this->_form;
     $mform->addElement('header', 'general', get_string($this->type, 'feedback'));
     $mform->addElement('checkbox', 'required', get_string('required', 'feedback'));
     $mform->addElement('text', 'name', get_string('item_name', 'feedback'), array('size="' . FEEDBACK_ITEM_NAME_TEXTBOX_SIZE . '"', 'maxlength="255"'));
     $mform->addElement('text', 'label', get_string('item_label', 'feedback'), array('size="' . FEEDBACK_ITEM_LABEL_TEXTBOX_SIZE . '"', 'maxlength="255"'));
     $mform->addElement('select', 'presentation', get_string('count_of_nums', 'feedback') . ' ', array_slice(range(0, 10), 3, 10, true));
     parent::definition();
     $this->set_data($item);
 }
Example #6
0
 public function definition()
 {
     $item = $this->_customdata['item'];
     $common = $this->_customdata['common'];
     $positionlist = $this->_customdata['positionlist'];
     $position = $this->_customdata['position'];
     $presentationoptions = $this->_customdata['presentationoptions'];
     $mform =& $this->_form;
     $mform->addElement('header', 'general', get_string($this->type, 'feedback'));
     $mform->addElement('hidden', 'required', 0);
     $mform->setType('required', PARAM_INT);
     $mform->addElement('text', 'name', get_string('item_name', 'feedback'), array('size' => FEEDBACK_ITEM_NAME_TEXTBOX_SIZE, 'maxlength' => 255));
     $mform->addElement('text', 'label', get_string('item_label', 'feedback'), array('size' => FEEDBACK_ITEM_LABEL_TEXTBOX_SIZE, 'maxlength' => 255));
     $this->infotype =& $mform->addElement('select', 'presentation', get_string('infotype', 'feedback'), $presentationoptions);
     parent::definition();
     $this->set_data($item);
 }
Example #7
0
 function definition()
 {
     $item = $this->_customdata['item'];
     $common = $this->_customdata['common'];
     $positionlist = $this->_customdata['positionlist'];
     $position = $this->_customdata['position'];
     $mform =& $this->_form;
     $mform->addElement('header', 'general', get_string($this->type, 'feedback'));
     $mform->addElement('hidden', 'required', 0);
     $mform->setType('required', PARAM_INT);
     $mform->addElement('text', 'name', get_string('item_name', 'feedback'), array('size="' . FEEDBACK_ITEM_NAME_TEXTBOX_SIZE . '"', 'maxlength="255"'));
     $mform->addElement('text', 'label', get_string('item_label', 'feedback'), array('size="' . FEEDBACK_ITEM_LABEL_TEXTBOX_SIZE . '"', 'maxlength="255"'));
     $options = array();
     $options[1] = get_string('responsetime', 'feedback');
     $options[2] = get_string('course');
     $options[3] = get_string('coursecategory');
     $this->infotype =& $mform->addElement('select', 'presentation', get_string('infotype', 'feedback'), $options);
     parent::definition();
     $this->set_data($item);
 }