mirror of
https://github.com/moodle/moodle.git
synced 2025-08-08 10:26:40 +02:00
MDL-11069 grade export refactoring + removing internally calculated totals (we have already various totals in categories and calculations can be used too for that)
This commit is contained in:
parent
8a275c7242
commit
11745964a5
5 changed files with 92 additions and 139 deletions
|
@ -26,8 +26,6 @@ require_once($CFG->dirroot.'/grade/export/lib.php');
|
|||
|
||||
class grade_export_xml extends grade_export {
|
||||
|
||||
var $format = 'xml'; // export format
|
||||
|
||||
/**
|
||||
* To be implemented by child classes
|
||||
* @param boolean $feedback
|
||||
|
@ -35,24 +33,23 @@ class grade_export_xml extends grade_export {
|
|||
* @return string
|
||||
*/
|
||||
function print_grades($feedback = false) {
|
||||
|
||||
global $CFG;
|
||||
|
||||
$this->load_grades();
|
||||
|
||||
$retval = '';
|
||||
|
||||
/// Whether this plugin is entitled to update export time
|
||||
if ($expplugins = explode(",", $CFG->gradeexport)) {
|
||||
if (in_array($this->format, $expplugins)) {
|
||||
if (in_array('xml', $expplugins)) {
|
||||
$export = true;
|
||||
} else {
|
||||
$export = false;
|
||||
$export = false;
|
||||
}
|
||||
} else {
|
||||
$export = false;
|
||||
}
|
||||
|
||||
require_once($CFG->dirroot.'/lib/excellib.class.php');
|
||||
|
||||
/// Calculate file name
|
||||
$downloadfilename = clean_filename("{$this->course->shortname} $this->strgrades.xml");
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue