"MDL-12304, fix double text"
[moodle-linuxchix.git] / grade / export / xls / dump.php
blob5ae4dd70a52be8507549414b2280b0334e57db96
1 <?php //$Id$
3 ///////////////////////////////////////////////////////////////////////////
4 // //
5 // NOTICE OF COPYRIGHT //
6 // //
7 // Moodle - Modular Object-Oriented Dynamic Learning Environment //
8 // http://moodle.com //
9 // //
10 // Copyright (C) 1999 onwards Martin Dougiamas http://moodle.com //
11 // //
12 // This program is free software; you can redistribute it and/or modify //
13 // it under the terms of the GNU General Public License as published by //
14 // the Free Software Foundation; either version 2 of the License, or //
15 // (at your option) any later version. //
16 // //
17 // This program is distributed in the hope that it will be useful, //
18 // but WITHOUT ANY WARRANTY; without even the implied warranty of //
19 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
20 // GNU General Public License for more details: //
21 // //
22 // http://www.gnu.org/copyleft/gpl.html //
23 // //
24 ///////////////////////////////////////////////////////////////////////////
26 $nomoodlecookie = true; // session not used here
27 require '../../../config.php';
29 $id = required_param('id', PARAM_INT); // course id
30 if (!$course = get_record('course', 'id', $id)) {
31 print_error('nocourseid');
34 require_user_key_login('grade/export', $id); // we want different keys for each course
36 if (empty($CFG->gradepublishing)) {
37 error('Grade publishing disabled');
40 $context = get_context_instance(CONTEXT_COURSE, $id);
41 require_capability('gradeexport/xls:publish', $context);
43 // use the same page parameters as export.php and append &key=sdhakjsahdksahdkjsahksadjksahdkjsadhksa
44 require 'export.php';