} $buttons = new single_button(new moodle_url('index.php', $options), $string, 'get'); } else { $USER->gradeediting[$course->id] = 0; $buttons = ''; } $gradeserror = array(); // Handle toggle change request if (!is_null($toggle) && !empty($toggle_type)) { set_user_preferences(array('grade_report_show' . $toggle_type => $toggle)); } //first make sure we have proper final grades - this must be done before constructing of the grade tree grade_regrade_final_grades($courseid); // Perform actions if (!empty($target) && !empty($action) && confirm_sesskey()) { grade_report_grader::process_action($target, $action); } $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)) {
/** * Processes a single action against a category, grade_item or grade. * @param string $target eid ({type}{id}, e.g. c4 for category4) * @param string $action Which action to take (edit, delete etc...) * @return */ function process_action($target, $action) { return parent::process_action($target, $action); }