mirror of
https://github.com/moodle/moodle.git
synced 2025-02-02 14:19:07 +01:00
34283aa87d
options or not. This is handled as in the resource module. The "Show advanced options" button is only shown if the admin has chosen to declare some of the options as advanced. There are now 4 review options as suggested by Martin in http://moodle.org/mod/forum/discuss.php?d=16709 Provides separate buttons "Update this quiz" and "Edit questions", see http://moodle.org/mod/forum/discuss.php?d=16708. To make this possible edit.php can now be called with a quiz id and it saves its data itself rather than relying on mod.php. mod.html now has a "Save changes" and a "Save changes and edit questions" button. "Attempt quiz now" button gets a different language string for re-attempts. This is currently set to "Re-attempt quiz". After viewing the feedback for an attempt the "Continue" button leads back to the course homepage, as requested in bugs 1224 and 1976. If there is no feedback the user is brought straight to quiz/view.php.
20 lines
1.0 KiB
PHP
20 lines
1.0 KiB
PHP
<?php
|
|
defined('MOODLE_INTERNAL') or die('Direct access to this script is forbidden.');
|
|
|
|
$window = (!empty($quiz->popup)) ? 'quizpopup' : '_self';
|
|
$windowoptions = ($window == '_self') ? '' : "left=0, top=0, height='+window.screen.height+', width='+window.screen.width+', channelmode=yes, fullscreen=yes, scrollbars=yes, resizeable=no, directories=no, toolbar=no, titlebar=no, location=no, status=no, menubar=no";
|
|
$buttontext = ($numattempts) ? get_string('reattemptquiz', 'quiz') : get_string('attemptquiznow', 'quiz');
|
|
|
|
?>
|
|
|
|
<script language="javascript" type="text/javascript">
|
|
<!--
|
|
document.write('<input type="button" value="<?php echo $buttontext ?>" '+
|
|
'onclick="javascript: <?php if ($quiz->timelimit) echo "if (confirm(\\'$strconfirmstartattempt\\'))"; ?> '+
|
|
'window.open(\'attempt.php?id=<?php echo $cm->id ?>\', \'<?php echo $window ?>\', \'<?php echo $windowoptions ?>\'); " />');
|
|
// -->
|
|
</script>
|
|
<noscript>
|
|
<strong><?php print_string('noscript', 'quiz'); ?></strong>
|
|
</noscript>
|