Moodle  2.2.1
http://www.collinsharper.com
C:/xampp/htdocs/moodle/mod/workshop/eval/best/settings_form.php
Go to the documentation of this file.
00001 <?php
00002 
00003 // This file is part of Moodle - http://moodle.org/
00004 //
00005 // Moodle is free software: you can redistribute it and/or modify
00006 // it under the terms of the GNU General Public License as published by
00007 // the Free Software Foundation, either version 3 of the License, or
00008 // (at your option) any later version.
00009 //
00010 // Moodle is distributed in the hope that it will be useful,
00011 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013 // GNU General Public License for more details.
00014 //
00015 // You should have received a copy of the GNU General Public License
00016 // along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
00017 
00027 defined('MOODLE_INTERNAL') || die();
00028 
00029 require_once($CFG->dirroot . '/lib/formslib.php');
00030 
00031 class workshop_best_evaluation_settings_form extends moodleform {
00032 
00033     function definition() {
00034         $mform = $this->_form;
00035 
00036         $plugindefaults = get_config('workshopeval_best');
00037         $current        = $this->_customdata['current'];
00038         $workshop       = $this->_customdata['workshop'];
00039 
00040         $mform->addElement('header', 'general', get_string('settings', 'workshopeval_best'));
00041 
00042         $label = get_string('evaluationmethod', 'workshop');
00043         $mform->addElement('static', 'methodname', $label, get_string('pluginname', 'workshopeval_best'));
00044         $mform->addHelpButton('methodname', 'evaluationmethod', 'workshop');
00045 
00046         $options = array();
00047         for ($i = 9; $i >= 1; $i = $i-2) {
00048             $options[$i] = get_string('comparisonlevel' . $i, 'workshopeval_best');
00049         }
00050         $label = get_string('comparison', 'workshopeval_best');
00051         $mform->addElement('select', 'comparison', $label, $options);
00052         $mform->addHelpButton('comparison', 'comparison', 'workshopeval_best');
00053         $mform->setDefault('comparison', $plugindefaults->comparison);
00054 
00055         $mform->addElement('submit', 'submit', get_string('aggregategrades', 'workshop'));
00056 
00057         $this->set_data($current);
00058     }
00059 }
 All Data Structures Namespaces Files Functions Variables Enumerations