Merge pull request #83 from barrysspace/expired_self_enrolments_MDL26
[moodle-mod_attendance.git] / version.php
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 * Version information
19 *
20 * @package mod_attendance
21 * @copyright 2011 Artem Andreev <andreev.artem@gmail.com>
22 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
23 */
24
25 $module->version = 2014022803;
26 $module->requires = 2013040500;
27 $module->release = '2.6.2';
28 $module->maturity = MATURITY_STABLE;
29 $module->cron = 0;
30 $module->component = 'mod_attendance';
31
32 // Nasty upgrade code to check if need to upgrade from attforblock.
33 // TODO: remove this asap.
34 if (defined('MOODLE_INTERNAL')) { // Only run if config.php has already been included.
35 global $DB;
36 $moduleexists = false;
37
38 try {
39 $moduleexists = $DB->record_exists('modules', array('name' =>'attforblock'));
40 } catch (Exception $e) {
41 // Probably a fresh install - modules table doesn't exist
42 }
43 if ($moduleexists) {
44 require_once('locallib.php');
45 attforblock_upgrade();
46 }
47
48 }