當前位置: 首頁>>代碼示例>>PHP>>正文


PHP EfrontLesson::getTests方法代碼示例

本文整理匯總了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));
         }
     }
開發者ID:jiangjunt,項目名稱:efront_open_source,代碼行數:31,代碼來源:control_panel.php


注:本文中的EfrontLesson::getTests方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。