2 // This file is part of Moodle - http://moodle.org/
4 // Moodle is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU General Public License as published by
6 // the Free Software Foundation, either version 3 of the License, or
7 // (at your option) any later version.
9 // Moodle is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU General Public License for more details.
14 // You should have received a copy of the GNU General Public License
15 // along with Moodle. If not, see <http://www.gnu.org/licenses/>.
22 * @Author Jason Hardin
23 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
26 $numberofsections = array();
27 for ($i = 1; $i < 53; $i++
){
28 $numberofsections[$i] = $i;
31 $increments = array();
33 for ($i = 1; $i < 11; $i++
){
37 if(isset($this->config
)){
38 $config = $this->config
;
40 $config = get_config('blocks/section_links');
44 if (!empty($config->numsections1
)) {
45 if (empty($config->incby1
)) {
48 $selected[1] = array($config->numsections1
, $config->incby1
);
50 $selected[1] = array(22, 2);
53 if (!empty($config->numsections2
)) {
54 if (empty($config->incby1
)) {
57 $selected[2] = array($config->numsections2
, $config->incby2
);
59 $selected[2] = array(40, 5);
63 <table cellpadding=
"9" cellspacing=
"0">
65 for($i = 1; $i < 3; $i++
){
69 <?php print_string('numsections'.$i, 'block_section_links'); ?>:
72 <?php choose_from_menu($numberofsections, 'numsections'.$i, $selected[$i][0]); ?>
75 <?php print_string('numsectionsdesc'.$i, 'block_section_links'); ?>
80 <?php print_string('incby'.$i, 'block_section_links'); ?>:
83 <?php choose_from_menu($increments, 'incby'.$i, $selected[$i][1]); ?>
86 <?php print_string('incbydesc'.$i, 'block_section_links'); ?>
92 <td colspan=
"3" align=
"center">
93 <input type=
"hidden" name=
"sesskey" value=
"<?php echo sesskey();?>">
94 <input type
="submit" value
="<?php print_string('savechanges') ?>" />