|
Moodle
2.2.1
http://www.collinsharper.com
|
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 if ($ADMIN->fulltree) { 00030 require_once($CFG->dirroot.'/mod/lesson/locallib.php'); 00031 00033 $settings->add(new admin_setting_configtext('lesson_slideshowwidth', get_string('slideshowwidth', 'lesson'), 00034 get_string('configslideshowwidth', 'lesson'), 640, PARAM_INT)); 00035 00036 $settings->add(new admin_setting_configtext('lesson_slideshowheight', get_string('slideshowheight', 'lesson'), 00037 get_string('configslideshowheight', 'lesson'), 480, PARAM_INT)); 00038 00039 $settings->add(new admin_setting_configtext('lesson_slideshowbgcolor', get_string('slideshowbgcolor', 'lesson'), 00040 get_string('configslideshowbgcolor', 'lesson'), '#FFFFFF', PARAM_TEXT)); 00041 00043 $settings->add(new admin_setting_configtext('lesson_mediawidth', get_string('mediawidth', 'lesson'), 00044 get_string('configmediawidth', 'lesson'), 640, PARAM_INT)); 00045 00046 $settings->add(new admin_setting_configtext('lesson_mediaheight', get_string('mediaheight', 'lesson'), 00047 get_string('configmediaheight', 'lesson'), 480, PARAM_INT)); 00048 00049 $settings->add(new admin_setting_configcheckbox('lesson_mediaclose', get_string('mediaclose', 'lesson'), 00050 get_string('configmediaclose', 'lesson'), false, PARAM_TEXT)); 00051 00053 $settings->add(new admin_setting_configtext('lesson_maxhighscores', get_string('maxhighscores', 'lesson'), 00054 get_string('configmaxhighscores','lesson'), 10, PARAM_INT)); 00055 00057 $numbers = array(); 00058 for ($i=20; $i>1; $i--) { 00059 $numbers[$i] = $i; 00060 } 00061 $settings->add(new admin_setting_configselect('lesson_maxanswers', get_string('maximumnumberofanswersbranches','lesson'), 00062 get_string('configmaxanswers', 'lesson'), 4, $numbers)); 00063 00064 $defaultnextpages = array(); 00065 $defaultnextpages[0] = get_string("normal", "lesson"); 00066 $defaultnextpages[LESSON_UNSEENPAGE] = get_string("showanunseenpage", "lesson"); 00067 $defaultnextpages[LESSON_UNANSWEREDPAGE] = get_string("showanunansweredpage", "lesson"); 00068 $settings->add(new admin_setting_configselect('lesson_defaultnextpage', get_string('actionaftercorrectanswer','lesson'), 00069 get_string('configactionaftercorrectanswer', 'lesson'), 0, $defaultnextpages)); 00070 }