当前位置: 首页>>代码示例>>PHP>>正文


PHP Exercise::getQuestionCount方法代码示例

本文整理汇总了PHP中Exercise::getQuestionCount方法的典型用法代码示例。如果您正苦于以下问题:PHP Exercise::getQuestionCount方法的具体用法?PHP Exercise::getQuestionCount怎么用?PHP Exercise::getQuestionCount使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Exercise的用法示例。


在下文中一共展示了Exercise::getQuestionCount方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: isset

// get the direction
if (!$sidx) {
    $sidx = 1;
}
//2. Selecting the count FIRST
//@todo rework this
switch ($action) {
    case 'get_user_list_plugin_widescale':
        $count = UserManager::get_user_data(null, null, null, null, true);
        break;
    case 'get_question_list':
        require_once api_get_path(SYS_CODE_PATH) . 'exercice/exercise.class.php';
        $exerciseId = isset($_REQUEST['exerciseId']) ? $_REQUEST['exerciseId'] : null;
        $exercise = new Exercise(api_get_course_int_id());
        $exercise->read($exerciseId, false);
        $count = $exercise->getQuestionCount();
        break;
    case 'get_group_reporting':
        $course_id = isset($_REQUEST['course_id']) ? $_REQUEST['course_id'] : null;
        $group_id = isset($_REQUEST['gidReq']) ? $_REQUEST['gidReq'] : null;
        $count = Tracking::get_group_reporting($course_id, $group_id, 'count');
        break;
    case 'get_user_course_report_resumed':
        $count = CourseManager::get_count_user_list_from_course_code(true, 'ruc');
        break;
    case 'get_user_course_report':
        $count = CourseManager::get_count_user_list_from_course_code(false);
        break;
    case 'get_course_exercise_medias':
        $course_id = api_get_course_int_id();
        $count = Question::get_count_course_medias($course_id);
开发者ID:ilosada,项目名称:chamilo-lms-icpna,代码行数:31,代码来源:model.ajax.php

示例2:

                                 if ($nbQuestionsTotal != $real_question_count) {
                                     $warning = Display::return_icon('warning.png', get_lang('CheckThatYouHaveEnoughQuestionsInYourCategories'));
                                 }
                                 $number_of_questions = $nbQuestionsTotal." ".$warning;
                             } else {
                                 $random_label = ' ('.get_lang('Random').') ';
                                 $number_of_questions = $random_number_of_question.' '.$random_label;
                                 //Bug if we set a random value bigger than the real number of questions
                                 if ($random_number_of_question > $rowi) {
                                     $number_of_questions = $rowi.' '.$random_label;
                                 }
                             }
                         } else {
                             $number_of_questions = $rowi;
                         }*/
     $number_of_questions = $exercise_obj->getQuestionCount();
     if ($row['random'] > 0 && $row['random'] != -1) {
         $number_of_questions = $number_of_questions . ' (' . $row['random'] . ' ' . get_lang('Random') . ') ';
     }
     //Attempts
     //$attempts = get_count_exam_results($my_exercise_id).' '.get_lang('Attempts');
     //$item .=  Display::tag('td',$attempts);
     $item .= Display::tag('td', $number_of_questions);
 } else {
     // Student only
     $visibility = api_get_item_visibility($course_info, TOOL_QUIZ, $my_exercise_id);
     if ($visibility == 0) {
         continue;
     }
     // if time is actived show link to exercise
     if ($time_limits) {
开发者ID:ilosada,项目名称:chamilo-lms-icpna,代码行数:31,代码来源:exercice.php


注:本文中的Exercise::getQuestionCount方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。