本文整理汇总了PHP中EfrontLesson::getTests方法的典型用法代码示例。如果您正苦于以下问题:PHP EfrontLesson::getTests方法的具体用法?PHP EfrontLesson::getTests怎么用?PHP EfrontLesson::getTests使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EfrontLesson
的用法示例。
在下文中一共展示了EfrontLesson::getTests方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
if ($related_events[$key]->createMessage($allModules)) {
$events[$key] = array("avatar" => $related_events[$key]->event['avatar'], "avatar_width" => $related_events[$key]->event['avatar_width'], "avatar_height" => $related_events[$key]->event['avatar_height'], "time" => $related_events[$key]->event['time'], "message" => $related_events[$key]->event['message']);
}
}
$smarty->assign("T_TIMELINE_OPTIONS", $timeline_options);
$smarty->assign("T_TIMELINE_LINK", basename($_SERVER['PHP_SELF']) . "?ctg=social&op=timeline&lessons_ID=" . $currentLesson->lesson['id'] . "&all=1");
$smarty->assign("T_TIMELINE_EVENTS", $events);
}
}
#cpp#endif
}
//Professor specific blocks
if ($_professor_) {
//Completed tests list
if (!isset($currentUser->coreAccess['content']) || $currentUser->coreAccess['content'] != 'hidden') {
$testIds = $currentLesson->getTests(false, true);
if (sizeof($testIds) > 0) {
$result = eF_getTableData("completed_tests ct, tests t", "ct.id, ct.users_LOGIN, ct.timestamp, ct.status, t.name", "ct.status != 'deleted' and ct.pending=1 and ct.status != 'incomplete' and ct.archive = 0 and ct.tests_ID = t.id and ct.tests_ID in (" . implode(",", $testIds) . ")", "", "ct.timestamp DESC limit 10");
if ($_SESSION['s_type'] != 'administrator' && $_SESSION['s_current_branch']) {
//this applies to supervisors only
$currentBranch = new EfrontBranch($_SESSION['s_current_branch']);
$branchTreeUsers = array_keys($currentBranch->getBranchTreeUsers());
foreach ($result as $key => $value) {
if (!in_array($value['users_LOGIN'], $branchTreeUsers)) {
unset($result[$key]);
}
}
}
$smarty->assign("T_COMPLETED_TESTS", array_values($result));
}
}