本文整理汇总了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;
}