70 lines
2.1 KiB
HTML
70 lines
2.1 KiB
HTML
<?php
|
|
/* This template determines the overall layout of a question. It is included by the
|
|
* print_question() method.
|
|
*/
|
|
?>
|
|
|
|
<script language="javascript" type="text/javascript">
|
|
if (typeof showhidecomment == "undefined") {
|
|
function showhidecomment (id) {
|
|
divobj = document.getElementById(id);
|
|
if (divobj.style.display == 'none') {
|
|
divobj.style.display = 'block';
|
|
} else {
|
|
divobj.style.display = 'none';
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<a name="<?php echo $question->id; ?>" id="<?php echo $question->id; ?>"></a>
|
|
<div id="q<?php echo $question->id; ?>" class="que <?php echo $question->qtype; ?> clearfix">
|
|
<div class="info">
|
|
<span class="no"><?php echo $number; ?></span>
|
|
<?php if ($editlink) { ?>
|
|
<span class="edit"><?php echo $editlink; ?></span>
|
|
<?php }
|
|
if ($grade) { ?>
|
|
<div class="grade">
|
|
<?php echo get_string('marks', 'quiz').': '.$grade; ?>
|
|
</div>
|
|
<?php } ?>
|
|
</div>
|
|
<div class="content">
|
|
<?php $this->print_question_formulation_and_controls($question, $state, $cmoptions, $options); ?>
|
|
</div>
|
|
<div class="grading">
|
|
<?php $this->print_question_grading_details($question, $state, $cmoptions, $options); ?>
|
|
</div>
|
|
<?php if ($comment) { ?>
|
|
<div class="comment">
|
|
<?php
|
|
echo get_string('comment', 'quiz').': ';
|
|
echo $comment;
|
|
?>
|
|
</div>
|
|
<?php } ?>
|
|
<div class="commentlink">
|
|
<?php
|
|
if (!empty($commentlink)) {
|
|
echo $commentlink;
|
|
?>
|
|
<div id="comment-wrapper-<?php echo $question->id; ?>">
|
|
<?php question_print_comment_box($question, $state, $attempt, $CFG->wwwroot.'/mod/quiz/review.php?attempt='.$attempt->id.'#'.$question->id) ?>
|
|
</div>
|
|
<?php } ?>
|
|
</div>
|
|
<?php
|
|
if ($history) { ?>
|
|
<div class="history">
|
|
<?php
|
|
print_string('history', 'quiz');
|
|
echo $history;
|
|
?>
|
|
</div>
|
|
<?php } ?>
|
|
</div>
|
|
|
|
<script language="javascript" type="text/javascript">
|
|
showhidecomment('comment-wrapper-<?php echo $question->id; ?>');
|
|
</script> |