require_once("../config.php");
require_once("../lib/gradelib.php");
- $id = required_param('id'); // course id
+ $courseid = required_param('courseid'); // course id
$report = optional_param('report', 'user', PARAM_FILE); // course id
/// Make sure they can even access this course
- if (!$course = get_record('course', 'id', $id)) {
+ if (!$course = get_record('course', 'id', $courseid)) {
print_error('nocourseid');
}
/// Print the report selector at the top if there is more than one report
if ($reportnames) {
- popup_form($CFG->wwwroot.'/grade/report.php?id='.$course->id.'&report=', $reportnames,
+ popup_form($CFG->wwwroot.'/grade/report.php?courseid='.$course->id.'&report=', $reportnames,
'choosegradereport', $report, '', '', '', false, 'self', get_string('gradereports', 'grades').':');
}
$param->element_type = optional_param('element_type', 0, PARAM_ALPHA);
$param->category_name = optional_param('category_name', 0, PARAM_ALPHA);
+$report = optional_param('report', 0, PARAM_ALPHANUM);
+
print_object($param);
$tree = new grade_tree($param->courseid);
}
}
print_heading(get_string('graderreport', 'grades'));
+
+// Add tabs
+if (empty($report)) {
+ $report = 'admin';
+}
+
+$tabs = $row = array();
+$row[] = new tabobject('grader', 'report.php?courseid='.$course->id.'&report=grader',
+ get_string('viewgrades', 'grades'));
+$row[] = new tabobject('admin', 'report.php?courseid='.$course->id.'&report=admin',
+ get_string('categories', 'grades'));
+$tabs[] = $row;
+
+print_tabs($tabs, $report);
+
echo $tree->get_edit_tree(1, null, $param->source, $param->action, $param->type);
?>
include_once($CFG->libdir.'/gradelib.php');
// get the params
-$courseid = required_param('id', PARAM_INT);
+$courseid = required_param('courseid', PARAM_INT);
$context = get_context_instance(CONTEXT_COURSE, $courseid);
$page = optional_param('page', 0, PARAM_INT);
$sortitemid = optional_param('sortitemid', 0, PARAM_ALPHANUM); // sort by which grade item
+$report = optional_param('report', 0, PARAM_ALPHANUM);
// setting the sort order, this depends on last state
// all this should be in the new table class that we might need to use
print_heading('Grader Report');
+// Add tabs
+if (empty($report)) {
+ $report = 'grader';
+}
+
+$tabs = $row = array();
+$row[] = new tabobject('grader', 'report.php?courseid='.$course->id.'&report=grader',
+ get_string('viewgrades', 'grades'));
+$row[] = new tabobject('categories', 'report.php?courseid='.$course->id.'&report=admin',
+ get_string('categories', 'grades'));
+$tabs[] = $row;
+
+print_tabs($tabs, $report);
+
// base url for sorting by first/last name
-$baseurl = 'report.php?id='.$courseid.'&report=grader&page='.$page;
+$baseurl = 'report.php?courseid='.$courseid.'&report=grader&page='.$page;
// base url for paging
-$pbarurl = 'report.php?id='.$courseid.'&report=grader&';
+$pbarurl = 'report.php?courseid='.$courseid.'&report=grader&';
print_paging_bar($numusers, $page, $perpage, $pbarurl);
echo $reporthtml;
}
-?>
\ No newline at end of file
+?>
include_once($CFG->libdir.'/gradelib.php');
// get the params
-$courseid = required_param('id', PARAM_INT);
+$courseid = required_param('courseid', PARAM_INT);
if (!$userid = optional_param('user', 0, PARAM_INT)) {
// current user
$userid = $USER->id;
* Table has 6 columns
*| pic | itemname/description | grade (grade_final) | percentage | rank | feedback |
*/
- $baseurl = $CFG->wwwroot.'/grade/report?id='.$id.'&userid='.$userid;
+ $baseurl = $CFG->wwwroot.'/grade/report?courseid='.$id.'&userid='.$userid;
// setting up table headers
$tablecolumns = array('itempic', 'itemname', 'grade', 'percentage', 'rank', 'feedback');
--- /dev/null
+<?PHP // $Id$
+
+$string['modulename'] = 'Categories';
+$string['admin:manage'] = 'Edit Grade Categories';
+
+?>