Variables |
| | $courseid = required_param('id', PARAM_INT) |
| | $page = optional_param('page', 0, PARAM_INT) |
| | $perpageurl = optional_param('perpage', 0, PARAM_INT) |
| | $edit = optional_param('edit', -1, PARAM_BOOL) |
| | $sortitemid = optional_param('sortitemid', 0, PARAM_ALPHANUM) |
| | $action = optional_param('action', 0, PARAM_ALPHAEXT) |
| | $move = optional_param('move', 0, PARAM_INT) |
| | $type = optional_param('type', 0, PARAM_ALPHA) |
| | $target = optional_param('target', 0, PARAM_ALPHANUM) |
| | $toggle = optional_param('toggle', NULL, PARAM_INT) |
| | $toggle_type = optional_param('toggle_type', 0, PARAM_ALPHANUM) |
| | $context = get_context_instance(CONTEXT_COURSE, $course->id) |
| | $gpr = new grade_plugin_return(array('type'=>'report', 'plugin'=>'grader', 'courseid'=>$courseid, 'page'=>$page)) |
| | return tracking object
|
if(!isset($USER->
grade_last_report)) $USER | grade_last_report [$course->id] = 'grader' |
| | last selected report session tracking
|
| if(!empty($target)&&!empty($action)&&confirm_sesskey()) | $reportname = get_string('pluginname', 'gradereport_grader') |
| | $report = new grade_report_grader($courseid, $gpr, $context, $page, $sortitemid) |
| | $numusers = $report->get_numusers() |
| | processing posted grades & feedback here
|
| foreach($warnings as $warning) | $studentsperpage = $report->get_pref('studentsperpage') |
| if(!empty($studentsperpage)) | $reporthtml = $report->get_grade_table() |