Moodle  2.2.1
http://www.collinsharper.com
C:/xampp/htdocs/moodle/mod/lesson/editpage_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 
00035 class lesson_add_page_form_selection extends lesson_add_page_form_base {
00036 
00037     public $qtype = 'questiontype';
00038     public $qtypestring = 'selectaqtype';
00039     protected $standard = false;
00040     protected $manager = null;
00041 
00042     public function __construct($arg1, $arg2) {
00043         $this->manager = lesson_page_type_manager::get($arg2['lesson']);
00044         parent::__construct($arg1, $arg2);
00045     }
00046 
00047     public function custom_definition() {
00048         $mform = $this->_form;
00049         $types = $this->manager->get_page_type_strings(lesson_page::TYPE_QUESTION);
00050         asort($types);
00051         $mform->addElement('select', 'qtype', get_string('selectaqtype', 'lesson'), $types);
00052         $mform->setDefault('qtype', LESSON_PAGE_MULTICHOICE); // preselect the most common type
00053     }
00054 }
00055 
00060 final class lesson_add_page_form_unknown extends lesson_add_page_form_base {}
 All Data Structures Namespaces Files Functions Variables Enumerations