moodle/mod/lesson/action/continue.html

145 lines
5.3 KiB
HTML

<?php // $Id$
/**
* HTML template for continue.php
*
* @version $Id$
* @package lesson
**/
?>
<!-- Primary layout table -->
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr valign="top">
<?php
if ($lesson->displayleft) {
// Displaying left menu
if($firstpageid = get_field('lesson_pages', 'id', 'lessonid', $lesson->id, 'prevpageid', 0)) { ?>
<td>
<a href="#maincontent" class="skip"><?php print_string('skip', 'lesson') ?></a>
<div class="leftmenu_container">
<div class="leftmenu_title"><?php print_string('lessonmenu', 'lesson') ?></div>
<div class="leftmenu_courselink">
<a href="<?php echo "$CFG->wwwroot/course/view.php?id=$course->id"; ?>"><?php print_string("mainmenu", "lesson") ?></a>
</div>
<div class="leftmenu_links">
<?php lesson_print_tree_menu($lesson->id, $firstpageid, $cm->id) ?>
</div>
</div>
</td>
<?php
} // End if($firstpageid = get...
} // End if ($lesson->displayleft)
?>
<!-- Start Primary column -->
<td align="center" width="100%">
<?php if ($lesson->displayleft) { // Skip navigation anchor ?>
<a name="maincontent" id="maincontent" title="<?php print_string('anchortitle', 'lesson') ?>"></a>
<?php } ?>
<?php
// This calculates and prints the ongoing score message
if ($lesson->ongoing) {
lesson_print_ongoing_score($lesson);
}
?>
<table border="0" align="center">
<tr>
<td class="c0"><?php echo $feedback ?></td>
</tr>
</table>
<?php if (isset($USER->modattempts[$lesson->id])) { // User is modifying attempts - save button and some instructions ?>
<form name="endoflesson" method ="post" action="<?php echo $CFG->wwwroot ?>/mod/lesson/view.php">
<input type="hidden" name="id" value="<?php echo $cm->id ?>" />
<input type="hidden" name="pageid" value="<?php echo LESSON_EOL; ?>" />
<p align="center">
<?php print_string("savechangesandeol", "lesson") ?>
</p>
<p align="center">
<?php lesson_print_submit_link(get_string('savechanges', 'lesson'), 'endoflesson'); ?>
</p>
<p align="center">
<?php print_string("or", "lesson") ?>
</p>
<p align="center">
<?php print_string("continuetoanswer", "lesson") ?>
</p>
</form>
<?php } ?>
<?php if ($lesson->review && !$correctanswer && !$noanswer && !$isessayquestion) { // Review button back ?>
<form name="reviewback" method ="post" action="<?php echo $CFG->wwwroot ?>/mod/lesson/view.php">
<input type="hidden" name="id" value="<?php echo $cm->id ?>" />
<input type="hidden" name="pageid" value="<?php echo $pageid; ?>" />
<p>
<?php lesson_print_submit_link(get_string('reviewquestionback', 'lesson'), 'reviewback'); ?>
</p>
</form>
<?php } ?>
<form name="pageform" method ="post" action="<?php echo $CFG->wwwroot ?>/mod/lesson/view.php">
<input type="hidden" name="id" value="<?php echo $cm->id ?>" />
<input type="hidden" name="pageid" value="<?php echo $newpageid ?>" />
<?php if ($lesson->review && !$correctanswer && !$noanswer && !$isessayquestion) { // Review button continue ?>
<p>
<?php lesson_print_submit_link(get_string('reviewquestioncontinue', 'lesson'), 'pageform'); ?>
</p>
<?php } else { // Normal continue button ?>
<p>
<?php lesson_print_submit_link(get_string('continue', 'lesson'), 'pageform'); ?>
</p>
<?php } ?>
</form>
</td>
<!-- End primary column -->
<?php if($lesson->timed and !has_capability('mod/lesson:manage', $context)) { // Display for timed lessons and for students only ?>
<td>
<table align="right" width="150px" class="generaltable generalbox" cellspacing="0" cellpadding="5px" border="0" valign="top">
<tr>
<th class="header"><?php print_string("timeremaining", "lesson") ?></th>
</tr>
<tr class="r0">
<td align="center" class="c0">
<script type="text/javascript" charset="utf-8">
<!--
var starttime = <?php echo $timer->starttime ?>;
var servertime = <?php echo time() ?>;
var testlength = <?php echo $lesson->maxtime * 60 ?>;
document.write('<script type="text/javascript" src="<?php echo $CFG->wwwroot ?>/mod/lesson/timer.js" charset="utf-8"><\/script>');
window.onload = function () { show_clock(); };
// -->
</script>
<noscript>
<?php lesson_print_time_remaining($timer->starttime, $lesson->maxtime); ?>
</noscript>
</td>
</tr>
</table>
</td>
<?php } //end if($lesson->timed) { ?>
<!-- End primary layout table -->
</tr>
</table>