/
var
/
www
/
html
/
cetesb
/
blocks
/
configurable_reports
/
db
/
Upload File
HOME
<?php // This file is part of Moodle - http://moodle.org/ // // Moodle is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // Moodle is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with Moodle. If not, see <http://www.gnu.org/licenses/>. /** * Version details * * Configurable Reports - A Moodle block for creating customizable reports * * @package block_configurable_reports * @author: Juan leyva <http://www.twitter.com/jleyvadelgado> * @date: 2013-09-07 * * @copyright Juan leyva <http://www.twitter.com/jleyvadelgado> * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ defined('MOODLE_INTERNAL') || die(); function xmldb_block_configurable_reports_upgrade($oldversion) { global $DB, $CFG; $dbman = $DB->get_manager(); if ($oldversion < 2011040103) { $table = new xmldb_table('block_configurable_reports_report'); $dbman->rename_table($table, 'block_configurable_reports'); upgrade_plugin_savepoint(true, 2011040103, 'block', 'configurable_reports'); } if ($oldversion < 2011040106) { $table = new xmldb_table('block_configurable_reports'); $field = new xmldb_field('global', XMLDB_TYPE_INTEGER, '4', XMLDB_UNSIGNED, null, null, '0', null); if (!$dbman->field_exists($table, $field)) { $dbman->add_field($table, $field); } $field = new xmldb_field('lastexecutiontime', XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, null, null, '0', null); if (!$dbman->field_exists($table, $field)) { $dbman->add_field($table, $field); } $field = new xmldb_field('cron', XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, null, null, '0', null); if (!$dbman->field_exists($table, $field)) { $dbman->add_field($table, $field); } upgrade_plugin_savepoint(true, 2011040106, 'block', 'configurable_reports'); } if ($oldversion < 2011040115) { $table = new xmldb_table('block_configurable_reports'); $field = new xmldb_field('remote', XMLDB_TYPE_INTEGER, '1', XMLDB_UNSIGNED, null, null, '0', null); if (!$dbman->field_exists($table, $field)) { $dbman->add_field($table, $field); } upgrade_plugin_savepoint(true, 2011040115, 'block', 'configurable_reports'); } return true; }