} $reportname = get_string('pluginname', 'gradereport_grader'); /// Print header print_grade_page_head($COURSE->id, 'report', 'grader', $reportname, false, $buttons); //Initialise the grader report object that produces the table //the class grade_report_grader_ajax was removed as part of MDL-21562 $report = new grade_report_grader($courseid, $gpr, $context, $page, $sortitemid); // make sure separate group does not prevent view if ($report->currentgroup == -2) { echo $OUTPUT->heading(get_string("notingroup")); echo $OUTPUT->footer(); exit; } /// processing posted grades & feedback here if ($data = data_submitted() and confirm_sesskey() and has_capability('moodle/grade:edit', $context)) { $warnings = $report->process_data($data); } else { $warnings = array(); } // final grades MUST be loaded after the processing $report->load_users(); $numusers = $report->get_numusers(); $report->load_final_grades(); echo $report->group_selector; echo '<div class="clearer"></div>'; // echo $report->get_toggles_html(); //show warnings if any foreach ($warnings as $warning) { echo $OUTPUT->notification($warning); } $studentsperpage = $report->get_students_per_page();
/** * Processes the data sent by the form (grades and feedbacks). * Caller is responsible for all access control checks * @param array $data form submission (with magic quotes) * @return array empty array if success, array of warnings if something fails. */ function process_data($data) { return parent::process_data($data); }