[ Index ] |
PHP Cross Reference of moodle-2.8 |
[Summary view] [Print] [Text view]
1 <?php 2 3 // This file is part of Moodle - http://moodle.org/ 4 // 5 // Moodle is free software: you can redistribute it and/or modify 6 // it under the terms of the GNU General Public License as published by 7 // the Free Software Foundation, either version 3 of the License, or 8 // (at your option) any later version. 9 // 10 // Moodle is distributed in the hope that it will be useful, 11 // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 // GNU General Public License for more details. 14 // 15 // You should have received a copy of the GNU General Public License 16 // along with Moodle. If not, see <http://www.gnu.org/licenses/>. 17 18 require_once '../../../config.php'; 19 require_once $CFG->dirroot.'/grade/export/lib.php'; 20 require_once 'grade_export_xml.php'; 21 22 $id = required_param('id', PARAM_INT); // course id 23 24 if (!$course = $DB->get_record('course', array('id'=>$id))) { 25 print_error('nocourseid'); 26 } 27 28 require_login($course); 29 $context = context_course::instance($id); 30 $groupid = groups_get_course_group($course, true); 31 32 require_capability('moodle/grade:export', $context); 33 require_capability('gradeexport/xml:view', $context); 34 35 if (groups_get_course_groupmode($COURSE) == SEPARATEGROUPS and !has_capability('moodle/site:accessallgroups', $context)) { 36 if (!groups_is_member($groupid, $USER->id)) { 37 print_error('cannotaccessgroup', 'grades'); 38 } 39 } 40 $mform = new grade_export_form(null, array('publishing' => true, 'simpleui' => true, 'multipledisplaytypes' => false, 41 'idnumberrequired' => true)); 42 $formdata = $mform->get_data(); 43 44 // print all the exported data here 45 $export = new grade_export_xml($course, $groupid, $formdata); 46 $export->print_grades(); 47 48
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Fri Nov 28 20:29:05 2014 | Cross-referenced by PHPXref 0.7.1 |