本文整理汇总了PHP中Quiz::show_question方法的典型用法代码示例。如果您正苦于以下问题:PHP Quiz::show_question方法的具体用法?PHP Quiz::show_question怎么用?PHP Quiz::show_question使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Quiz
的用法示例。
在下文中一共展示了Quiz::show_question方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: isset
<?php
$intro_id = 63;
$modid = 46;
include "AMP/BaseDB.php";
require_once "Modules/Quiz/Quiz.php";
include "AMP/BaseTemplate.php";
include "AMP/BaseModuleIntro.php";
//$modid = 46;
//$mod_id = 69;
#$quiz_id = isset( $_REQUEST['quiz_id'] ) && $_REQUEST['quiz_id'] ? intval( $_REQUEST['quiz_id']) : false;
$question_id = isset($_REQUEST['question_id']) && $_REQUEST['question_id'] ? intval($_REQUEST['question_id']) : 1;
$answer_id = isset($_REQUEST['answer_id']) && $_REQUEST['answer_id'] ? intval($_REQUEST['answer_id']) : false;
$section_id = isset($_REQUEST['section_id']) && $_REQUEST['section_id'] ? intval($_REQUEST['section_id']) : false;
$Q = new Quiz($dbcon);
$Q->answer = $answer_id;
$Q->id = $question_id;
#$Q->set_section();
$Q->section = $section_id;
if ($answer_id && $question_id) {
echo $Q->show_answer();
//echo $Q->show_next();
} else {
echo $Q->show_question();
}
require_once "AMP/BaseFooter.php";