本文整理汇总了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) {