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:
skodak 2007-08-30 15:03:51 +00:00
parent 8a275c7242
commit 11745964a5
5 changed files with 92 additions and 139 deletions

View file

@ -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");