本文整理汇总了PHP中ilCourseParticipants::getPassedUsersForObjects方法的典型用法代码示例。如果您正苦于以下问题:PHP ilCourseParticipants::getPassedUsersForObjects方法的具体用法?PHP ilCourseParticipants::getPassedUsersForObjects怎么用?PHP ilCourseParticipants::getPassedUsersForObjects使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ilCourseParticipants
的用法示例。
在下文中一共展示了ilCourseParticipants::getPassedUsersForObjects方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _preloadListData
/**
* Get certificate/passed status for all given objects and users
*
* Used in ilObjCourseAccess for ilObjCourseListGUI
*
* @param array $a_usr_ids
* @param array $a_obj_ids
*/
static function _preloadListData($a_usr_ids, $a_obj_ids)
{
global $ilDB;
if (!is_array($a_usr_ids)) {
$a_usr_ids = array($a_usr_ids);
}
if (!is_array($a_obj_ids)) {
$a_obj_ids = array($a_obj_ids);
}
foreach ($a_usr_ids as $usr_id) {
foreach ($a_obj_ids as $obj_id) {
self::$has_certificate[$usr_id][$obj_id] = false;
}
}
include_once "Services/Certificate/classes/class.ilCertificate.php";
if (ilCertificate::isActive()) {
$obj_active = ilCertificate::areObjectsActive($a_obj_ids);
include_once 'Modules/Course/classes/class.ilCourseParticipants.php';
$data = ilCourseParticipants::getPassedUsersForObjects($a_obj_ids, $a_usr_ids);
foreach ($data as $rec) {
if ($obj_active[$rec["obj_id"]]) {
self::$has_certificate[$rec["usr_id"]][$rec["obj_id"]] = true;
}
}
}
}