This class iterates over all users that are graded in a course.
More...
This class iterates over all users that are graded in a course.
Returns detailed info about users and their grades.
- Author
- Petr Skoda skoda.nosp@m.k@mo.nosp@m.odle..nosp@m.org
- License
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
◆ __construct()
graded_users_iterator::__construct |
( |
|
$course, |
|
|
|
$grade_items = null , |
|
|
|
$groupid = 0 , |
|
|
|
$sortfield1 = 'lastname' , |
|
|
|
$sortorder1 = 'ASC' , |
|
|
|
$sortfield2 = 'firstname' , |
|
|
|
$sortorder2 = 'ASC' |
|
) |
| |
Constructor.
- Parameters
-
object | $course | A course object |
array | $grade_items | array of grade items, if not specified only user info returned |
int | $groupid | iterate only group users if present |
string | $sortfield1 | The first field of the users table by which the array of users will be sorted |
string | $sortorder1 | The order in which the first sorting field will be sorted (ASC or DESC) |
string | $sortfield2 | The second field of the users table by which the array of users will be sorted |
string | $sortorder2 | The order in which the second sorting field will be sorted (ASC or DESC) |
◆ allow_user_custom_fields()
graded_users_iterator::allow_user_custom_fields |
( |
|
$allow = true | ) |
|
Allow custom fields to be included.
- Parameters
-
bool | $allow | Whether to allow custom fields or not |
- Return values
-
◆ init()
graded_users_iterator::init |
( |
| ) |
|
Initialise the iterator.
- Return values
-
◆ next_user()
graded_users_iterator::next_user |
( |
| ) |
|
Returns information about the next user.
- Return values
-
mixed | array of user info, all grades and feedback or null when no more users found |
◆ require_active_enrolment()
graded_users_iterator::require_active_enrolment |
( |
|
$onlyactive = true | ) |
|
Should all enrolled users be exported or just those with an active enrolment?
- Parameters
-
bool | $onlyactive | True to limit the export to users with an active enrolment |
◆ $groupid
graded_users_iterator::$groupid |
|
protected |
The group ID we are interested in.
0 means all groups.
◆ $suspendedusers
graded_users_iterator::$suspendedusers = array() |
|
protected |
List of suspended users in course.
This includes users whose enrolment status is suspended or enrolment has expired or not started.
The documentation for this class was generated from the following file: