MDL-17991 Fixed a bug with the user selector

This commit is contained in:
nicolasconnault 2009-02-25 09:17:48 +00:00
parent 1f3d80f8f2
commit bb776ef478
2 changed files with 3 additions and 3 deletions

View File

@ -299,7 +299,7 @@ function print_graded_users_selector($course, $actionpage, $userid=null, $return
$menu[0] .= " (" . (count($menu) - 1) . ")";
}
return popup_form($CFG->wwwroot.'/grade/' . $actionpage . '&userid=', $menu, 'choosegradeduser', $userid, 'choose', '', '',
return popup_form($CFG->wwwroot.'/grade/' . $actionpage . '&userid=', $menu, 'choosegradeduser', $userid, null, '', '',
$return, 'self', get_string('selectalloroneuser', 'grades'));
}

View File

@ -191,7 +191,7 @@ class grade_report_user extends grade_report {
}
private function fill_table_recursive(&$element) {
global $CFG;
global $CFG, $DB;
$type = $element['type'];
$depth = $element['depth'];
@ -288,7 +288,7 @@ class grade_report_user extends grade_report {
FROM {grade_grades}
WHERE finalgrade > ?
AND itemid = ?";
$rank = $DB->count_records_sql($sql, array($grade_grade->finalgrade, $grade_item->id)) + 1;
$rank = $DB->count_records_sql($sql, array($grade_grade->finalgrade, $grade_grade->grade_item->id)) + 1;
$data['rank']['class'] = $class;
$data['rank']['content'] = "$rank/".$this->get_numusers(false); // total course users