mirror of
https://github.com/moodle/moodle.git
synced 2025-04-19 07:25:30 +02:00
Merge branch 'MDL-52309' of https://github.com/smbader/moodle
This commit is contained in:
commit
8d9b6ec254
@ -30,9 +30,10 @@ require_once($CFG->dirroot.'/grade/lib.php');
|
||||
$download = optional_param('download', '', PARAM_ALPHA);
|
||||
$courseid = required_param('id', PARAM_INT); // Course id.
|
||||
$page = optional_param('page', 0, PARAM_INT); // Active page.
|
||||
$showreport = optional_param('showreport', 0, PARAM_INT);
|
||||
|
||||
$PAGE->set_pagelayout('report');
|
||||
$url = new moodle_url('/grade/report/history/index.php', array('id' => $courseid));
|
||||
$url = new moodle_url('/grade/report/history/index.php', array('id' => $courseid, 'showreport' => 1));
|
||||
$PAGE->set_url($url);
|
||||
|
||||
$course = $DB->get_record('course', array('id' => $courseid), '*', MUST_EXIST);
|
||||
@ -105,15 +106,18 @@ if ($table->is_downloading()) {
|
||||
print_grade_page_head($COURSE->id, 'report', 'history', get_string('pluginname', 'gradereport_history'), false, '');
|
||||
$mform->display();
|
||||
|
||||
// Render table.
|
||||
echo $output->render($table);
|
||||
// MDL-52309: Display report after form has been submitted.
|
||||
if ($showreport) {
|
||||
// Render table.
|
||||
echo $output->render($table);
|
||||
|
||||
$event = \gradereport_history\event\grade_report_viewed::create(
|
||||
array(
|
||||
'context' => $context,
|
||||
'courseid' => $courseid
|
||||
)
|
||||
);
|
||||
$event->trigger();
|
||||
$event = \gradereport_history\event\grade_report_viewed::create(
|
||||
array(
|
||||
'context' => $context,
|
||||
'courseid' => $courseid
|
||||
)
|
||||
);
|
||||
$event->trigger();
|
||||
}
|
||||
|
||||
echo $OUTPUT->footer();
|
||||
|
@ -47,7 +47,8 @@ Feature: A teacher checks the grade history report in a course
|
||||
And I give the grade "70.00" to the user "Student 2" for the grade item "The greatest assignment ever"
|
||||
And I give the grade "80.00" to the user "Student 2" for the grade item "Rewarding assignment"
|
||||
And I press "Save changes"
|
||||
When I follow "Grade history"
|
||||
And I follow "Grade history"
|
||||
When I press "Submit"
|
||||
Then the following should exist in the "gradereport_history" table:
|
||||
| First name/Surname | Grade item | Original grade | Revised grade | Grader |
|
||||
| Student 1 | The greatest assignment ever | | 50.00 | Teacher 1 |
|
||||
|
Loading…
x
Reference in New Issue
Block a user