本文整理匯總了PHP中completion_info::get_num_tracked_users方法的典型用法代碼示例。如果您正苦於以下問題:PHP completion_info::get_num_tracked_users方法的具體用法?PHP completion_info::get_num_tracked_users怎麽用?PHP completion_info::get_num_tracked_users使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類completion_info
的用法示例。
在下文中一共展示了completion_info::get_num_tracked_users方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: array
// Handle groups (if enabled)
groups_print_course_menu($course, $CFG->wwwroot . '/course/report/completion/?course=' . $course->id);
}
// Generate where clause
$where = array();
$where_params = array();
if ($sifirst !== 'all') {
$where[] = $DB->sql_like('u.firstname', ':sifirst', false);
$where_params['sifirst'] = $sifirst . '%';
}
if ($silast !== 'all') {
$where[] = $DB->sql_like('u.lastname', ':silast', false);
$where_params['silast'] = $silast . '%';
}
// Get user match count
$total = $completion->get_num_tracked_users(implode(' AND ', $where), $where_params, $group);
// Total user count
$grandtotal = $completion->get_num_tracked_users('', array(), $group);
// If no users in this course what-so-ever
if (!$grandtotal) {
echo $OUTPUT->container(get_string('err_nousers', 'completion'), 'errorbox errorboxcontent');
echo $OUTPUT->footer();
exit;
}
// Get user data
$progress = array();
if ($total) {
$progress = $completion->get_progress_all(implode(' AND ', $where), $where_params, $group, $firstnamesort ? 'u.firstname ASC' : 'u.lastname ASC', $csv ? 0 : COMPLETION_REPORT_PAGE, $csv ? 0 : $start);
}
// Build link for paging
$link = $CFG->wwwroot . '/course/report/completion/?course=' . $course->id;