if( $quiz )
{
?>
echo $quiz->title; ?>
if( $debug != '' )
{
print( "
$debug
\n" );
var_dump( $debug );
}
if( $page )
{
?>
echo _QUIZ_QUESTION; ?> echo $page; ?> echo _QUIZ_OF; ?> echo $quiz->numquestions; ?>
}
if( count( $answers ) )
{
?>
if( $question )
{
echo '' . $question->question . '';
echo '
';
print( quiz_HTML::insertQuizMedia( $question->attachment ) );
echo '
';
}
else
{
echo '
' . $quiz->introduction . '';
echo '
';
$quizAttachment = $quiz->attachment;
print( quiz_HTML::insertQuizMedia( $quiz->attachment ) );
echo '
';
}
?>
if( $question )
{
// shuffle( $answers );
$answerList = array( );
foreach( $answers as $answer )
{
$value = $answer->id;
$text = $answer->answer;
$attach = $answer->attachment;
$answerList[ ] = quiz_HTML::makeOption( $value, $text, $attach );
}
if( $type == 'multiple' )
{
// Display as checkboxes.
echo quiz_HTML::addBoxList( $answerList, "quiz_a_", "" );
}
else
{
// Display as radio buttons.
echo quiz_HTML::addRadioList( $answerList, "quiz_a_", "" );
}
}
?>
if( $page == 0 )
{
?>
}
else
{
?>
}
?>
$min = 0;
$max = 0;
if( $question )
{
$min = $question->minimum;
$max = $question->maximum;
}
?>
}
else
{
?>
This quiz has not been properly configured.
}
}
// The quiz is not published or is checked out.
else
{
echo _QUIZ_NOT_AVAILABLE;
}
?>