Moodle  2.2.1
http://www.collinsharper.com
C:/xampp/htdocs/moodle/blocks/blog_recent/edit_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 
00033 class block_blog_recent_edit_form extends block_edit_form {
00034     protected function specific_definition($mform) {
00035         // Fields for editing HTML block title and contents.
00036         $mform->addElement('header', 'configheader', get_string('blocksettings', 'block'));
00037 
00038         $numberofentries = array();
00039         for ($i = 1; $i <= 20; $i++) {
00040             $numberofentries[$i] = $i;
00041         }
00042 
00043         $mform->addElement('select', 'config_numberofrecentblogentries', get_string('numentriestodisplay', 'block_blog_recent'), $numberofentries);
00044         $mform->setDefault('config_numberofrecentblogentries', 4);
00045 
00046 
00047         $intervals = array(
00048                 7200 => get_string('numhours', '', 2),
00049                 14400 => get_string('numhours', '', 4),
00050                 21600 => get_string('numhours', '', 6),
00051                 43200 => get_string('numhours', '', 12),
00052                 86400 => get_string('numhours', '', 24),
00053                 172800 => get_string('numdays', '', 2),
00054                 604800 => get_string('numdays', '', 7)
00055                 );
00056 
00057         $mform->addElement('select', 'config_recentbloginterval', get_string('recentinterval', 'block_blog_recent'), $intervals);
00058         $mform->setDefault('config_recentbloginterval', 86400);
00059     }
00060 }
 All Data Structures Namespaces Files Functions Variables Enumerations