| 1454 | 
           ariadna | 
           1 | 
           <?php
  | 
        
        
            | 
            | 
           2 | 
           // This file is part of Moodle - http://moodle.org/
  | 
        
        
            | 
            | 
           3 | 
           //
  | 
        
        
            | 
            | 
           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.
  | 
        
        
            | 
            | 
           8 | 
           //
  | 
        
        
            | 
            | 
           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.
  | 
        
        
            | 
            | 
           13 | 
           //
  | 
        
        
            | 
            | 
           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/>.
  | 
        
        
            | 
            | 
           16 | 
              | 
        
        
            | 
            | 
           17 | 
           /**
  | 
        
        
            | 
            | 
           18 | 
            * Settings for the Mynotes block
  | 
        
        
            | 
            | 
           19 | 
            *
  | 
        
        
            | 
            | 
           20 | 
            * @package    block_mynotes
  | 
        
        
            | 
            | 
           21 | 
            * @author     Gautam Kumar Das<gautam.arg@gmail.com>
  | 
        
        
            | 
            | 
           22 | 
            */
  | 
        
        
            | 
            | 
           23 | 
              | 
        
        
            | 
            | 
           24 | 
           defined('MOODLE_INTERNAL') || die;
  | 
        
        
            | 
            | 
           25 | 
              | 
        
        
            | 
            | 
           26 | 
           if ($ADMIN->fulltree) {
  | 
        
        
            | 
            | 
           27 | 
              | 
        
        
            | 
            | 
           28 | 
               $perpageoptions = array();
  | 
        
        
            | 
            | 
           29 | 
               for ($i = 1; $i < 20; $i++) {
  | 
        
        
            | 
            | 
           30 | 
                   $perpageoptions[$i] = $i;
  | 
        
        
            | 
            | 
           31 | 
               }
  | 
        
        
            | 
            | 
           32 | 
               $settings->add(new admin_setting_configselect('block_mynotes/mynotesperpage', get_string('mynotesperpage', 'block_mynotes'),
  | 
        
        
            | 
            | 
           33 | 
                                  get_string('mynotesperpage_help', 'block_mynotes'), 5, $perpageoptions));
  | 
        
        
            | 
            | 
           34 | 
              | 
        
        
            | 
            | 
           35 | 
               $settings->add(new admin_setting_configtext('block_mynotes/characterlimit', get_string('characterlimit', 'block_mynotes'),
  | 
        
        
            | 
            | 
           36 | 
                                  get_string('characterlimit_help', 'block_mynotes'), 180, PARAM_INT, 3));
  | 
        
        
            | 
            | 
           37 | 
              | 
        
        
            | 
            | 
           38 | 
               $positionoptions = array();
  | 
        
        
            | 
            | 
           39 | 
               $positionoptions['mynotes-pos-rb'] = get_string('bottomright', 'block_mynotes');
  | 
        
        
            | 
            | 
           40 | 
               $positionoptions['mynotes-pos-lb'] = get_string('bottomleft', 'block_mynotes');
  | 
        
        
            | 
            | 
           41 | 
               $positionoptions['mynotes-pos-rt'] = get_string('topright', 'block_mynotes');
  | 
        
        
            | 
            | 
           42 | 
               $positionoptions['mynotes-pos-lt'] = get_string('topleft', 'block_mynotes');
  | 
        
        
            | 
            | 
           43 | 
               $settings->add(new admin_setting_configselect('block_mynotes/icondisplayposition', get_string('icondisplayposition', 'block_mynotes'),
  | 
        
        
            | 
            | 
           44 | 
                                  get_string('icondisplayposition_help', 'block_mynotes'), 'mynotes-pos-rb', $positionoptions));
  | 
        
        
            | 
            | 
           45 | 
           }
  |