Automatically generated installer lang files
[moodle.git] / grade / export / ods / dump.php
CommitLineData
e060e33d 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/>.
8ad36f4c 17
6800d78e 18define('NO_MOODLE_COOKIES', true); // session not used here
fdec3d4f 19require_once '../../../config.php';
0e2d708e 20
21$id = required_param('id', PARAM_INT); // course id
f400841b 22if (!$course = $DB->get_record('course', array('id'=>$id))) {
0a3bdfaf 23 print_error('nocourseid');
24}
0e2d708e 25
26require_user_key_login('grade/export', $id); // we want different keys for each course
27
caffc55a 28if (empty($CFG->gradepublishing)) {
9b6a1a4b 29 print_error('gradepubdisable');
caffc55a 30}
31
0a3bdfaf 32$context = get_context_instance(CONTEXT_COURSE, $id);
d0cbeafb 33require_capability('gradeexport/ods:publish', $context);
0a3bdfaf 34
0e2d708e 35// use the same page parameters as export.php and append &key=sdhakjsahdksahdkjsahksadjksahdkjsadhksa
36require 'export.php';
37
6c3ef410 38