dirroot.'/grade/export/lib.php'); require_once('grade_export_xml.php'); $id = required_param('id', PARAM_INT); // course id $feedback = optional_param('feedback', '', PARAM_ALPHA); // process post information if ($data = data_submitted() && confirm_sesskey()) { $itemids = implode(",", $data->itemids); // this redirect should trigger a download prompt redirect('export.php?id='.$id.'&itemids='.$itemids); // print the grades on screen for feedbacks print_header(); $export = new grade_export($id, $itemids); $export->display_grades($feedback); print_footer(); exit; } print_gradeitem_selections($id); ?>