Moodle  2.2.1
http://www.collinsharper.com
C:/xampp/htdocs/moodle/admin/tool/qeupgradehelper/partialupgrade-example.php
Go to the documentation of this file.
00001 <?php
00002 // This file is part of Moodle - http://moodle.org/
00003 //
00004 // Moodle is free software: you can redistribute it and/or modify
00005 // it under the terms of the GNU General Public License as published by
00006 // the Free Software Foundation, either version 3 of the License, or
00007 // (at your option) any later version.
00008 //
00009 // Moodle is distributed in the hope that it will be useful,
00010 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00011 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012 // GNU General Public License for more details.
00013 //
00014 // You should have received a copy of the GNU General Public License
00015 // along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
00016 
00047 //function tool_qeupgradehelper_get_quizzes_to_upgrade() {
00048 //    return array(1, 2, 3);
00049 //}
00050 
00051 
00066 //function tool_qeupgradehelper_get_quizzes_to_upgrade() {
00067 //    global $CFG;
00068 //    $rawids = file($CFG->dirroot . '/' . $CFG->admin . '/tool/qeupgradehelper/quiz-ids-to-upgrade.txt');
00069 //    $cleanids = array();
00070 //    foreach ($rawids as $id) {
00071 //        $id = clean_param($id, PARAM_INT);
00072 //        if ($id) {
00073 //            $cleanids[] = $id;
00074 //        }
00075 //    }
00076 //    return $cleanids;
00077 //}
00078 
00079 
00095 //function tool_qeupgradehelper_get_quizzes_to_upgrade() {
00096 //    global $DB;
00097 //
00098 //    $quizmoduleid = $DB->get_field('modules', 'id', array('name' => 'quiz'));
00099 //
00100 //    $oneyearago = strtotime('-1 year');
00101 //
00102 //    return $DB->get_fieldset_sql('
00103 //        SELECT DISTINCT quiz.id
00104 //
00105 //        FROM {quiz} quiz
00106 //        JOIN {course_modules} cm ON cm.module = :quizmoduleid
00107 //                AND cm.instance = quiz.id
00108 //        JOIN {course} c ON quiz.course = c.id
00109 //
00110 //        WHERE c.startdate > :cutoffdate
00111 //
00112 //        ORDER BY quiz.id
00113 //        ', array('quizmoduleid' => $quizmoduleid, 'cutoffdate' => $oneyearago));
00114 //    ");
00115 //}
 All Data Structures Namespaces Files Functions Variables Enumerations