当前位置: 首页>>代码示例>>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;未经允许,请勿转载。