mirror of
https://github.com/moodle/moodle.git
synced 2025-08-09 19:06:41 +02:00
some minor cleanup/bug fix
This commit is contained in:
parent
5b5eb8e6c7
commit
7759d32720
11 changed files with 30 additions and 67 deletions
|
@ -26,8 +26,12 @@ require_once($CFG->dirroot.'/grade/export/lib.php');
|
|||
require_once('grade_export_xls.php');
|
||||
|
||||
$id = required_param('id', PARAM_INT); // course id
|
||||
$course = get_record('course', 'id', $id);
|
||||
$feedback = optional_param('feedback', '', PARAM_ALPHA);
|
||||
|
||||
$action = 'exporttxt';
|
||||
print_header($course->shortname.': '.get_string('grades'), $course->fullname, grade_nav($course, $action));
|
||||
|
||||
// process post information
|
||||
if (($data = data_submitted()) && confirm_sesskey()) {
|
||||
|
||||
|
@ -38,9 +42,6 @@ if (($data = data_submitted()) && confirm_sesskey()) {
|
|||
}
|
||||
|
||||
// print the grades on screen for feedbacks
|
||||
$course = get_record('course', 'id', $id);
|
||||
$action = 'exporttxt';
|
||||
print_header($course->shortname.': '.get_string('grades'), $course->fullname, grade_nav($course, $action));
|
||||
|
||||
$export = new grade_export($id, $data->itemids);
|
||||
$export->display_grades($feedback);
|
||||
|
@ -49,9 +50,7 @@ if (($data = data_submitted()) && confirm_sesskey()) {
|
|||
redirect('export.php?id='.$id.'&itemids='.$itemidsurl);
|
||||
exit;
|
||||
}
|
||||
$course = get_record('course', 'id', $id);
|
||||
$action = 'exportxls';
|
||||
print_header($course->shortname.': '.get_string('grades'), $course->fullname, grade_nav($course, $action));
|
||||
|
||||
print_gradeitem_selections($id);
|
||||
print_footer();
|
||||
?>
|
Loading…
Add table
Add a link
Reference in a new issue