本文整理匯總了PHP中lms_steam::user_get_booked_courses方法的典型用法代碼示例。如果您正苦於以下問題:PHP lms_steam::user_get_booked_courses方法的具體用法?PHP lms_steam::user_get_booked_courses怎麽用?PHP lms_steam::user_get_booked_courses使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類lms_steam
的用法示例。
在下文中一共展示了lms_steam::user_get_booked_courses方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: semester_get_user_coursememberships
public function semester_get_user_coursememberships($semester_obj_id, $user)
{
$semester = steam_factory::get_object($GLOBALS["STEAM"]->get_id(), $semester_obj_id, CLASS_GROUP);
if (!is_object($user)) {
throw new Exception("Not a user." . $semester_obj_id, E_PARAMETER);
}
$booked_courses = lms_steam::user_get_booked_courses($user->get_id(), $semester_obj_id);
if (count($booked_courses) > 0) {
return $booked_courses;
} else {
return array();
}
}
示例2: getCoursesForUser
public function getCoursesForUser($userID)
{
return lms_steam::user_get_booked_courses($userID);
}
示例3: get_certs
public static function get_certs($user_name)
{
$result = array();
$user = steam_factory::get_user($GLOBALS["STEAM"]->get_id(), $user_name);
$courses = lms_steam::user_get_booked_courses($user->get_id());
foreach ($courses as $course) {
$unit = elearning_mediathek::get_elearning_unit($course["OBJ_ID"]);
if ($unit === false) {
continue;
}
$elearning_user = new elearning_user($user_name, $course["OBJ_ID"]);
if ($elearning_user->has_exam_cert()) {
$result[] = $elearning_user->get_exam_cert();
}
}
return $result;
}