Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 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
  * Provides the classes used internally in the plugin
19
  *
20
  * @package report_overviewstats
21
  * @author DualCube <admin@dualcube.com>
22
  * @copyright 2023 DualCube <admin@dualcube.com>
23
  * @copyright based on work by 2013 David Mudrak <david@moodle.com>
24
  * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
25
  */
26
 
27
defined('MOODLE_INTERNAL') || die();
28
 
29
// Need to load the base classes first so we can extend them.
30
require_once($CFG->dirroot . '/report/overviewstats/classes/chart.php');
31
 
32
// Load all classes files (to be replaced by autoloading in Moodle 2.6.
33
$classfiles = new DirectoryIterator($CFG->dirroot . '/report/overviewstats/classes/');
34
foreach ($classfiles as $classfile) {
35
    if ($classfile->isDot()) {
36
        continue;
37
    }
38
    if ($classfile->isLink()) {
39
        throw new coding_exception(get_string('Unexpected-symlink-exception', 'report_overviewstats'));
40
    }
41
    if ($classfile->isFile() && substr($classfile->getFilename(), -4) === '.php') {
42
        require_once($classfile->getPathname());
43
    }
44
}