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


PHP learnpath::get_objectives_count_from_db方法代碼示例

本文整理匯總了PHP中learnpath::get_objectives_count_from_db方法的典型用法代碼示例。如果您正苦於以下問題:PHP learnpath::get_objectives_count_from_db方法的具體用法?PHP learnpath::get_objectives_count_from_db怎麽用?PHP learnpath::get_objectives_count_from_db使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在learnpath的用法示例。


在下文中一共展示了learnpath::get_objectives_count_from_db方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: getLpStats


//.........這裏部分代碼省略.........
                 $action = null;
                 if ($type == 'classic') {
                     $action = '<td></td>';
                 }
                 if (in_array($row['item_type'], $chapterTypes)) {
                     $output .= '<tr class="' . $oddclass . '">
                             <td>' . $extend_link . '</td>
                             <td colspan="4">
                                ' . $title . '
                             </td>
                             <td colspan="2">' . learnpathItem::humanize_status($lesson_status, true, $type) . '</td>
                             <td colspan="2"></td>
                             <td colspan="2"></td>
                             ' . $action . '
                         </tr>';
                     continue;
                 } else {
                     $output .= '<tr class="' . $oddclass . '">
                             <td>' . $extend_link . '</td>
                             <td colspan="4">
                                ' . $title . '
                             </td>
                             <td colspan="2"></td>
                             <td colspan="2"></td>
                             <td colspan="2"></td>
                             ' . $action . '
                         </tr>';
                 }
                 $attemptCount = 1;
                 do {
                     // Check if there are interactions below.
                     $extend_attempt_link = '';
                     $extend_this_attempt = 0;
                     if ((learnpath::get_interactions_count_from_db($row['iv_id'], $course_id) > 0 || learnpath::get_objectives_count_from_db($row['iv_id'], $course_id) > 0) && !$extend_all) {
                         if ($extendAttemptId == $row['iv_id']) {
                             // The extend button for this attempt has been clicked.
                             $extend_this_attempt = 1;
                             $extend_attempt_link = Display::url(Display::return_icon('visible.gif', get_lang('HideAttemptView')), api_get_self() . '?action=stats&extend_id=' . $my_item_id . '&fold_attempt_id=' . $row['iv_id'] . $url_suffix);
                         } else {
                             // Same case if fold_attempt_id is set, so not implemented explicitly.
                             // The extend button for this attempt has not been clicked.
                             $extend_attempt_link = Display::url(Display::return_icon('invisible.gif', get_lang('ExtendAttemptView')), api_get_self() . '?action=stats&extend_id=' . $my_item_id . '&extend_attempt_id=' . $row['iv_id'] . $url_suffix);
                         }
                     }
                     if ($counter % 2 == 0) {
                         $oddclass = 'row_odd';
                     } else {
                         $oddclass = 'row_even';
                     }
                     $lesson_status = $row['mystatus'];
                     $score = $row['myscore'];
                     $time_for_total = $row['mytime'];
                     $time = learnpathItem::getScormTimeFromParameter('js', $row['mytime']);
                     if ($score == 0) {
                         $maxscore = $row['mymaxscore'];
                     } else {
                         if ($row['item_type'] == 'sco') {
                             if (!empty($row['myviewmaxscore']) && $row['myviewmaxscore'] > 0) {
                                 $maxscore = $row['myviewmaxscore'];
                             } elseif ($row['myviewmaxscore'] === '') {
                                 $maxscore = 0;
                             } else {
                                 $maxscore = $row['mymaxscore'];
                             }
                         } else {
                             $maxscore = $row['mymaxscore'];
開發者ID:feroli1000,項目名稱:chamilo-lms,代碼行數:67,代碼來源:tracking.lib.php

示例2:

 $my_path = $row['path'];
 $result_disabled_ext_all = false;
 if ($row['item_type'] == 'quiz') {
     // Check results_disabled in quiz table.
     $my_path = Database::escape_string($my_path);
     $sql = "SELECT results_disabled FROM {$TBL_QUIZ} WHERE c_id = {$course_id} AND iid ='" . (int) $my_path . "'";
     $res_result_disabled = Database::query($sql);
     $row_result_disabled = Database::fetch_row($res_result_disabled);
     if (Database::num_rows($res_result_disabled) > 0 && (int) $row_result_disabled[0] === 1) {
         $result_disabled_ext_all = true;
     }
 }
 // Check if there are interactions below
 $extend_this_attempt = 0;
 $inter_num = learnpath::get_interactions_count_from_db($row['iv_id'], $course_id);
 $objec_num = learnpath::get_objectives_count_from_db($row['iv_id'], $course_id);
 $extend_attempt_link = '';
 if ($inter_num > 0 || $objec_num > 0) {
     if (!empty($_GET['extend_attempt_id']) && $_GET['extend_attempt_id'] == $row['iv_id']) {
         // The extend button for this attempt has been clicked.
         $extend_this_attempt = 1;
         $extend_attempt_link = '<a href="' . api_get_self() . '?action=stats&extend_id=' . $my_item_id . '&fold_attempt_id=' . $row['iv_id'] . $url_suffix . '">
         ' . Display::return_icon('visible.gif', get_lang('HideAttemptView')) . '</a>';
     } else {
         // Same case if fold_attempt_id is set, so not implemented explicitly.
         // The extend button for this attempt has not been clicked.
         $extend_attempt_link = '<a href="' . api_get_self() . '?action=stats&extend_id=' . $my_item_id . '&extend_attempt_id=' . $row['iv_id'] . $url_suffix . '">
         ' . Display::return_icon('invisible.gif', get_lang('ExtendAttemptView')) . '
         </a>';
     }
 }
開發者ID:ragebat,項目名稱:chamilo-lms,代碼行數:31,代碼來源:lp_stats.php


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