MDL-32888 Grader report: refined user search

This commit is contained in:
Melissa Aitkin 2013-06-26 11:27:29 +10:00
parent 8e4bf6cca6
commit cbe8e5b325
4 changed files with 140 additions and 66 deletions

View file

@ -102,6 +102,12 @@ abstract class grade_report {
*/
public $currentgroup;
/**
* The current groupname being displayed.
* @var string $currentgroupname
*/
public $currentgroupname;
/**
* Current course group mode
* @var int $groupmode
@ -341,6 +347,8 @@ abstract class grade_report {
}
if ($this->currentgroup) {
$group = groups_get_group($this->currentgroup);
$this->currentgroupname = $group->name;
$this->groupsql = " JOIN {groups_members} gm ON gm.userid = u.id ";
$this->groupwheresql = " AND gm.groupid = :gr_grpid ";
$this->groupwheresql_params = array('gr_grpid'=>$this->currentgroup);