本文整理汇总了PHP中ExerciseLib::showQuestion方法的典型用法代码示例。如果您正苦于以下问题:PHP ExerciseLib::showQuestion方法的具体用法?PHP ExerciseLib::showQuestion怎么用?PHP ExerciseLib::showQuestion使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ExerciseLib
的用法示例。
在下文中一共展示了ExerciseLib::showQuestion方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
if (empty($objQuestionTmp->level)) {
$txtQuestionLevel = '-';
}
$questionLevel = Display::tag('div', $txtQuestionLevel, array('style' => $styleLevel));
// Question score
$questionScore = Display::tag('div', $objQuestionTmp->selectWeighting(), array('style' => $styleScore));
echo '<div id="question_id_list_' . $id . '" >';
echo '<div class="header_operations">';
echo $questionName;
echo $questionType;
echo $questionCategory;
echo $questionLevel;
echo $questionScore;
echo $actions;
echo '</div>';
echo '<div class="question-list-description-block">';
echo '<p class="lead">' . get_lang($question_class) . '</p>';
//echo get_lang('Level').': '.$objQuestionTmp->selectLevel();
ExerciseLib::showQuestion($id, false, null, null, false, true, false, true, $objExercise->feedback_type, true);
echo '</div>';
echo '</div>';
unset($objQuestionTmp);
}
}
}
if (!$nbrQuestions) {
echo Display::display_warning_message(get_lang('NoQuestion'));
}
echo '</div>';
//question list div
}
示例2: array
if ($objExercise->type == ALL_ON_ONE_PAGE && isset($_GET['reminder']) && $_GET['reminder'] == 2) {
$remind_highlight = 'no_remind_highlight';
}
$exercise_actions = '';
$is_remind_on = false;
$attributes = array('id' => 'remind_list[' . $questionId . ']');
if (in_array($questionId, $remind_list)) {
$is_remind_on = true;
$attributes['checked'] = 1;
$remind_question = true;
$remind_highlight = ' remind_highlight ';
}
// Showing the question
echo '<div id="question_div_' . $questionId . '" class="main-question ' . $remind_highlight . '" >';
// Shows the question and its answers
ExerciseLib::showQuestion($questionId, false, $origin, $i, true, false, $user_choice, false);
// Button save and continue
switch ($objExercise->type) {
case ONE_PER_PAGE:
$exercise_actions .= $objExercise->show_button($questionId, $current_question);
break;
case ALL_ON_ONE_PAGE:
$button = '<a href="javascript://" class="btn btn-info" onclick="save_now(\'' . $questionId . '\'); ">' . get_lang('SaveForNow') . '</a>';
$button .= '<span id="save_for_now_' . $questionId . '"></span> ';
$exercise_actions .= Display::div($button, array('class' => 'exercise_save_now_button'));
break;
}
// Checkbox review answers
if ($objExercise->review_answers) {
$remind_question_div = Display::tag('label', Display::input('checkbox', 'remind_list[' . $questionId . ']', '', $attributes) . get_lang('ReviewQuestionLater'), array('class' => 'checkbox', 'for' => 'remind_list[' . $questionId . ']'));
$exercise_actions .= Display::div($remind_question_div, array('class' => 'exercise_save_now_button'));