[ Index ] |
PHP Cross Reference of Unnamed Project |
[Summary view] [Print] [Text view]
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 * Upgrade code for the feedback_editpdf module. 19 * 20 * @package assignfeedback_editpdf 21 * @copyright 2013 Jerome Mouneyrac 22 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 23 */ 24 25 defined('MOODLE_INTERNAL') || die(); 26 27 /** 28 * EditPDF upgrade code 29 * @param int $oldversion 30 * @return bool 31 */ 32 function xmldb_assignfeedback_editpdf_upgrade($oldversion) { 33 global $CFG, $DB; 34 35 $dbman = $DB->get_manager(); 36 37 // Moodle v2.8.0 release upgrade line. 38 // Put any upgrade step following this. 39 40 // Moodle v2.9.0 release upgrade line. 41 // Put any upgrade step following this. 42 43 // Moodle v3.0.0 release upgrade line. 44 // Put any upgrade step following this. 45 46 if ($oldversion < 2016021600) { 47 48 // Define table assignfeedback_editpdf_queue to be created. 49 $table = new xmldb_table('assignfeedback_editpdf_queue'); 50 51 // Adding fields to table assignfeedback_editpdf_queue. 52 $table->add_field('id', XMLDB_TYPE_INTEGER, '10', null, XMLDB_NOTNULL, XMLDB_SEQUENCE, null); 53 $table->add_field('submissionid', XMLDB_TYPE_INTEGER, '10', null, XMLDB_NOTNULL, null, null); 54 $table->add_field('submissionattempt', XMLDB_TYPE_INTEGER, '10', null, XMLDB_NOTNULL, null, null); 55 56 // Adding keys to table assignfeedback_editpdf_queue. 57 $table->add_key('primary', XMLDB_KEY_PRIMARY, array('id')); 58 59 // Conditionally launch create table for assignfeedback_editpdf_queue. 60 if (!$dbman->table_exists($table)) { 61 $dbman->create_table($table); 62 } 63 64 // Editpdf savepoint reached. 65 upgrade_plugin_savepoint(true, 2016021600, 'assignfeedback', 'editpdf'); 66 } 67 68 // Moodle v3.1.0 release upgrade line. 69 // Put any upgrade step following this. 70 71 return true; 72 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Thu Aug 11 10:00:09 2016 | Cross-referenced by PHPXref 0.7.1 |