本文整理汇总了PHP中EfrontLesson::getStandAloneLessons方法的典型用法代码示例。如果您正苦于以下问题:PHP EfrontLesson::getStandAloneLessons方法的具体用法?PHP EfrontLesson::getStandAloneLessons怎么用?PHP EfrontLesson::getStandAloneLessons使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EfrontLesson
的用法示例。
在下文中一共展示了EfrontLesson::getStandAloneLessons方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
try {
if (isset($_GET['ajax']) && $_GET['ajax'] == "usersTable") {
$roles = EfrontUser::getRoles(true);
$smarty->assign("T_ROLES", $roles);
$constraints = array('archive' => false, 'return_objects' => false) + createConstraintsFromSortedTable();
$users = $currentGroup->getGroupUsersIncludingUnassigned($constraints);
$totalEntries = $currentGroup->countGroupUsersIncludingUnassigned($constraints);
$dataSource = $users;
$tableName = $_GET['ajax'];
$alreadySorted = 1;
$smarty->assign("T_TABLE_SIZE", $totalEntries);
include "sorted_table.php";
}
if (isset($_GET['ajax']) && $_GET['ajax'] == "lessonsTable") {
$groupLessons = $currentGroup->getLessons();
$result = EfrontLesson::getStandAloneLessons(true);
$lessons = array();
foreach ($result as $value) {
$lesson = $value->lesson;
$lesson['in_group'] = false;
$lesson['user_type'] = 'student';
if (in_array($lesson['id'], array_keys($groupLessons))) {
$lesson['in_group'] = true;
$lessons[$lesson['id']] = $lesson;
$lessons[$lesson['id']]['user_type'] = $groupLessons[$lesson['id']]['user_type'];
} else {
if ($lesson['active']) {
$lessons[$lesson['id']] = $lesson;
}
}
}