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


PHP ExerciseLib::getNumberStudentsFillBlanksAnwserCount方法代码示例

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


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

示例1: substr

     $answer_info = substr($answer_info, 0, strpos($answer_info, '::'));
     $correct_answer = $is_correct;
     $answers = $objExercise->fill_in_blank_answer_to_array($answer_info);
     $counter = 0;
     foreach ($answers as $answer_item) {
         if ($counter == 0) {
             $data[$id]['name'] = cut($question_obj->question, 100);
         } else {
             $data[$id]['name'] = '-';
         }
         $data[$id]['answer'] = $answer_item;
         $answer_item = api_substr($answer_item, 1);
         $answer_item = api_substr($answer_item, 0, api_strlen($answer_item) - 1);
         $data[$id]['answer'] = $answer_item;
         $data[$id]['correct'] = '-';
         $count = ExerciseLib::getNumberStudentsFillBlanksAnwserCount($question_id, $exercise_id);
         $count = $count[$counter];
         $percentange = 0;
         if (!empty($count_students)) {
             $percentange = $count / $count_students * 100;
         }
         $data[$id]['attempts'] = Display::bar_progress($percentange, false, $count . ' / ' . $count_students);
         $id++;
         $counter++;
     }
     break;
 case MATCHING:
     //no break
 //no break
 case MATCHING_DRAGGABLE:
     if ($is_correct == 0) {
开发者ID:jloguercio,项目名称:chamilo-lms,代码行数:31,代码来源:stats.php


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