}
echo "<br />\n";
- echo "<form id=\"passwordform\" method=\"post\" action=\"attempt.php?id=$cm->id\" autocomplete=\"off\">\n";
+ echo "<form id=\"passwordform\" method=\"post\" action=\"attempt.php?id=$cm->id\" onclick=\"this.autocomplete='off'\">\n";
+ echo '<fieldset class="invisiblefieldset">';
print_simple_box_start("center");
- echo "<div align=\"center\">\n";
+ echo "<div class=\"boxaligncenter\">\n";
print_string("requirepasswordmessage", "quiz");
echo "<br /><br />\n";
echo " <input name=\"quizpassword\" type=\"password\" value=\"\" alt=\"password\" />";
echo "</div>\n";
print_simple_box_end();
+ echo '</fieldset>';
echo "</form>\n";
if (empty($popup)) {
unset($buttonoptions);
$buttonoptions['q'] = $quiz->id;
$buttonoptions['forcenew'] = true;
- echo '<center>';
+ echo '<div class="boxaligncenter">';
print_single_button($CFG->wwwroot.'/mod/quiz/attempt.php', $buttonoptions, get_string('startagain', 'quiz'));
- echo '</center>';
+ echo '</div>';
if ($quiz->popup) {
notify(get_string('popupnotice', 'quiz'));
}
?>
<script type="text/javascript">
//<![CDATA[
- document.write("<form id=\"responseform\" method=\"post\" action=\"attempt.php\" autocomplete=\"off\">\n");
+ document.write("<form id=\"responseform\" method=\"post\" action=\"attempt.php\" onclick=\"this.autocomplete='off'\">\n");
//]]>
</script>
<noscript>
+ <div>
<?php print_heading(get_string('noscript', 'quiz')); ?>
+ </div>
</noscript>
<?php
} else {
- echo "<form id=\"responseform\" method=\"post\" action=\"attempt.php\" autocomplete=\"off\">\n";
+ echo "<form id=\"responseform\" method=\"post\" action=\"attempt.php\" onclick=\"this.autocomplete='off'\">\n";
}
// Add a hidden field with the quiz id
+ echo '<fieldset class="invisiblefieldset">';
echo '<input type="hidden" name="q" value="' . s($quiz->id) . "\" />\n";
/// Print the navigation panel if required
//]]>
</script>
<?php
- echo '<input type="hidden" id="page" name="page" value="'.$page."\" />\n";
+ echo '<input type="hidden" name="page" value="'.$page."\" />\n";
quiz_print_navigation_panel($page, $numpages);
echo "<br />\n";
}
}
// Finish the form
+ echo '</fieldset>';
echo "</form>\n";
<?php defined('MOODLE_INTERNAL') or die('Direct access to this script is forbidden.');?>
-<div align="center">
+<div class="boxaligncenter">
<?php
if (!empty($popup)) {
?>
//]]>
</script>
<noscript>
+<div>
<?php print_string('closewindow'); ?>
+</div>
</noscript>
<?php
}
notify(get_string('changessaved'));
- echo '<center><input type="button" onclick="window.opener.location.reload(1); self.close();return false;" value="' .
- get_string('closewindow') . "\" /></center>";
+ echo '<div class="boxaligncenter"><input type="button" onclick="window.opener.location.reload(1); self.close();return false;" value="' .
+ get_string('closewindow') . "\" /></div>";
print_footer();
exit;
</script>
<form method="post" action="module.php" id="form">
+<fieldset class="invisiblefieldset">
<input type="hidden" name="sesskey" value="<?php echo $USER->sesskey ?>" />
<!-- Table of default values -->
</table>
+</fieldset>
</form>
<script type="text/javascript">
if (! $cm = get_coursemodule_from_instance("quiz", $modform->instance, $course->id)) {
error("Course Module ID was incorrect");
}
- echo "<center>\n";
+ echo "<div class=\"attemptsnotice\">\n";
echo "<a href=\"report.php?mode=overview&id=$cm->id\">".get_string('numattempts', 'quiz', $a)."</a><br />".get_string("attemptsexist","quiz");
- echo "</center><br/ >\n";
+ echo "</div><br />\n";
$sumgrades = quiz_print_question_list($modform, false, $SESSION->quiz_showbreaks, $SESSION->quiz_reordertool);
if (!set_field('quiz', 'sumgrades', $sumgrades, 'id', $modform->instance)) {
$quiz = &$modform;
include('tabs.php');
- echo '<table border="0" width="100%" cellpadding="2" cellspacing="0">';
- echo '<tr><td width="50%" valign="top">';
+ echo '<table border="0" style="width:100%" cellpadding="2" cellspacing="0">';
+ echo '<tr><td style="width:50%" valign="top">';
print_simple_box_start("center", "100%");
$sumgrades = quiz_print_question_list($modform, true, $SESSION->quiz_showbreaks, $SESSION->quiz_reordertool);
print_simple_box_end();
- echo '</td><td valign="top" width="50%">';
+ echo '</td><td style="width:50%" valign="top">';
require($CFG->dirroot.'/question/showbank.php');
$strpreview = get_string("preview", "quiz");
if (!$quiz->questions) {
- echo "<p align=\"center\">";
+ echo "<p class=\"quizquestionlistcontrols\">";
print_string("noquestions", "quiz");
echo "</p>";
return 0;
{$CFG->prefix}question_categories c
WHERE q.id in ($quiz->questions)
AND q.category = c.id")) {
- echo "<p align=\"center\">";
+ echo "<p class=\"quizquestionlistcontrols\">";
print_string("noquestions", "quiz");
echo "</p>";
return 0;
$lastindex++;
}
echo "<form method=\"post\" action=\"edit.php\">";
+ echo '<fieldset class="invisiblefieldset">';
echo "<input type=\"hidden\" name=\"sesskey\" value=\"$USER->sesskey\" />";
print_simple_box_start('center', '100%', '#ffffff', 0);
- echo "<table border=\"0\" cellpadding=\"2\" cellspacing=\"0\" width=\"100%\">\n";
- echo "<tr><th colspan=\"3\" nowrap=\"nowrap\" class=\"header\" scope=\"col\">$strorder</th><th class=\"header\" scope=\"col\">#</th><th align=\"left\" width=\"100%\" nowrap=\"nowrap\" class=\"header\" scope=\"col\">$strquestionname</th><th nowrap=\"nowrap\" class=\"header\" scope=\"col\">$strtype</th><th nowrap=\"nowrap\" class=\"header\" scope=\"col\">$strgrade</th><th align=\"center\" width=\"60\" nowrap=\"nowrap\" class=\"header\" scope=\"col\">$straction</th></tr>\n";
+ echo "<table border=\"0\" cellpadding=\"2\" cellspacing=\"0\" style=\"width:100%;\">\n";
+ echo "<tr><th colspan=\"3\" style=\"white-space:nowrap;\" class=\"header\" scope=\"col\">$strorder</th>";
+ echo "<th class=\"header\" scope=\"col\">#</th>";
+ echo "<th align=\"left\" style=\"white-space:nowrap; width:100%\" class=\"header\" scope=\"col\">$strquestionname</th>";
+ echo "<th style=\"white-space:nowrap;\" class=\"header\" scope=\"col\">$strtype</th>";
+ echo "<th style=\"white-space:nowrap;\" class=\"header\" scope=\"col\">$strgrade</th>";
+ echo "<th align=\"center\" style=\"white-space:nowrap; width:60px;\" class=\"header\" scope=\"col\">$straction</th>";
+ echo "</tr>\n";
foreach ($order as $i => $qnum) {
if ($qnum and empty($questions[$qnum])) {
if ($qnum == 0) { // This is a page break
if ($showbreaks) {
echo '<td colspan ="3"> </td>';
- echo '<td><table width="100%" style="line-height:11px; font-size:9px; margin: -5px -5px;"><tr>';
- echo '<td><hr noshade="noshade" /></td>';
- echo '<td width="50">Page break</td>';
- echo '<td><hr noshade="noshade" /></td><td width="45">';
+ echo '<td><table style="width:100%; line-height:11px; font-size:9px; margin: -5px -5px;"><tr>';
+ echo '<td><hr /></td>';
+ echo '<td style="width:50px;">Page break</td>';
+ echo '<td><hr /></td>';
+ echo '<td style="width:45px;">';
if ($count > 1) {
echo "<a title=\"$strmoveup\" href=\"edit.php?up=$count&quizid=$quiz->id&sesskey=$USER->sesskey\"><img
src=\"$CFG->pixpath/t/up.gif\" class=\"iconsmall\" alt=\"$strmoveup\" /></a>";
$context = $quiz->id ? '&contextquiz='.$quiz->id : '';
$quiz_id = $quiz->id ? '&quizid=' . $quiz->id : '';
if ($question->qtype != 'random') {
- echo "<a title=\"$strpreview\" href=\"javascript:void(0)\" onClick=\"openpopup('/question/preview.php?id=$qnum$quiz_id','questionpreview', " .
+ echo "<a title=\"$strpreview\" href=\"javascript:void(0)\" onclick=\"openpopup('/question/preview.php?id=$qnum$quiz_id','questionpreview', " .
QUESTION_PREVIEW_POPUP_OPTIONS . ", false)\">
<img src=\"$CFG->pixpath/t/preview.gif\" class=\"iconsmall\" alt=\"$strpreview\" /></a>";
}
echo "<tr><td colspan=\"6\" align=\"right\">\n";
print_string('total');
- echo "</td>";
- echo ": <td align=\"left\">\n";
- echo "<b>$sumgrade</b>";
+ echo ": </td>";
+ echo "<td align=\"left\">\n";
+ echo "<strong>$sumgrade</strong>";
echo "</td><td> \n</td></tr>\n";
echo "<tr><td colspan=\"6\" align=\"right\">\n";
print_string('maximumgrade');
- echo "</td>";
- echo ": <td align=\"left\">\n";
+ echo ": </td>";
+ echo "<td align=\"left\">\n";
echo '<input type="text" name="maxgrade" size="2" tabindex="'.($qno+1)
.'" value="'.$quiz->grade.'" />';
echo '</td><td align="left">';
helpbutton("maxgrade", get_string("maximumgrade"), "quiz");
echo "</td></tr></table>\n";
- echo '<div align="center"><input type="submit" value="'.get_string('savechanges').'" />';
+ echo '<div class="quizquestionlistcontrols"><input type="submit" value="'.get_string('savechanges').'" />';
echo '<input type="hidden" name="savechanges" value="save" /></div>';
echo '<input type="hidden" name="savequizid" value="'.$quiz->id.'" />'; // ugly hack to prevent modform session "mistakes"
print_simple_box_end();
+ echo '</fieldset>';
echo "</form>\n";
/// Form to choose to show pagebreaks and to repaginate quiz
echo '<form method="post" action="edit.php" id="showbreaks">';
+ echo '<fieldset class="invisiblefieldset">';
echo '<input type="hidden" name="sesskey" value="'.$USER->sesskey.'" />';
echo '<input type="hidden" name="showbreaks" value="0" />';
echo '<input type="checkbox" name="showbreaks" value="1"';
echo ' ';
helpbutton('reorderingtool', get_string('reorderingtool', 'quiz'), 'quiz');
- echo '<div align="center"><input type="submit" name="repaginate" value="'. get_string('go') .'" /></div>';
+ echo '<div class="quizquestionlistcontrols"><input type="submit" name="repaginate" value="'. get_string('go') .'" /></div>';
+ echo '</fieldset>';
echo '</form>';
return $sumgrade;
if (has_capability('moodle/question:manage', $coursecontext)) {
$streditquestions =
"<form target=\"_parent\" method=\"get\" action=\"$CFG->wwwroot/question/edit.php\">
+ <fieldset class=\"invisiblefieldset\">
<input type=\"hidden\" name=\"courseid\" value=\"$course->id\" />
<input type=\"submit\" value=\"".get_string("editquestions", "quiz")."\" />
- </form>";
+ </fieldset>
+ </form>";
}
print_header_simple($strquizzes, '', $strquizzes,
'', '', true, $streditquestions, navmenu($course));
<script type="text/javascript" src="timer.js"></script>
<div id="timer">
<!--EDIT BELOW CODE TO YOUR OWN MENU-->
-<table class="generalbox" border="0" cellpadding="0" cellspacing="0" width="150">
+<table class="generalbox" border="0" cellpadding="0" cellspacing="0" style="width:150px;">
<tr>
<td class="generalboxcontent" bgcolor="#ffffff" width="100%">
<table class="generaltable" border="0" width="150" cellspacing="0" cellpadding="0">
</tr>
<tr>
<td id="QuizTimer" class="generaltablecell" align="center" width="100%">
- <form id="clock"><input onfocus="blur()" type="text" id="time"
+ <form id="clock"><fieldset class="invisiblefieldset"><input onfocus="blur()" type="text" id="time"
style="background-color: transparent; border: none; width: 70%; font-family: sans-serif; font-size: 14pt; font-weight: bold; text-align: center;" />
+ </fieldset>
</form>
</td>
</tr>
echo "<tr><td class=\"forumpostpicture\" width=\"35\" valign=\"top\">";
print_user_picture($activity->user->userid, $course, $activity->user->picture);
- echo "</td><td width=\"100%\"><font size=\"2\">";
+ echo "</td><td style=\"width:100%;\"><font size=\"2\">";
if ($detail) {
echo "<img src=\"$CFG->modpixpath/$activity->type/icon.gif\" ".
$strpreview = get_string('previewquestion', 'quiz');
$context = $quiz->id ? '&contextquiz='.$quiz->id : '';
$quiz_id = $quiz->id ? '&quizid=' . $quiz->id : '';
- return "<a title=\"$strpreview\" href=\"javascript:void(0)\" onClick=\"openpopup('/question/preview.php?id=$qnum$quiz_id','questionpreview', " .
+ return "<a title=\"$strpreview\" href=\"javascript:void(0)\" onclick=\"openpopup('/question/preview.php?id=$qnum$quiz_id','questionpreview', " .
QUESTION_PREVIEW_POPUP_OPTIONS . ", false)\">
<img src=\"../../pix/t/preview.gif\" class=\"iconsmall\" alt=\"$strpreview\" /></a>";
}
update_module_button($this->modulerecord->id, $this->courserecord->id, get_string('modulename', 'quiz')).'</td>';
if(!empty($CFG->showblocksonmodpages)) {
$buttons .= '<td><form '.$CFG->frametarget.' method="get" action="view.php">'.
+ '<fieldset class="invisiblefieldset">'.
'<input type="hidden" name="id" value="'.$this->modulerecord->id.'" />'.
'<input type="hidden" name="edit" value="'.($this->user_is_editing()?'off':'on').'" />'.
- '<input type="submit" value="'.get_string($this->user_is_editing()?'blockseditoff':'blocksediton').'" /></form></td>';
+ '<input type="submit" value="'.get_string($this->user_is_editing()?'blockseditoff':'blocksediton').'" />'.
+ '</fieldset></form></td>';
}
$buttons .= '</tr></table>';
}
global $CFG, $USER;
echo '<div class="controls">';
echo '<form id="options" action="report.php" method="post">';
+ echo '<fieldset class="invisiblefieldset">';
echo '<p class="quiz-report-options">'.get_string('analysisoptions', 'quiz').': </p>';
echo '<input type="hidden" name="id" value="'.$cm->id.'" />';
echo '<input type="hidden" name="q" value="'.$quiz->id.'" />';
echo '<input type="hidden" name="mode" value="analysis" />';
- echo '<table id="analysis-options" align="center">';
- echo '<tr align="left"><td><label for="attemptselection">'.get_string('attemptselection', 'quiz_analysis').'</label></td><td>';
+ echo '<table id="analysis-options" class="boxaligncenter">';
+ echo '<tr align="left"><td><label for="menuattemptselection">'.get_string('attemptselection', 'quiz_analysis').'</label></td><td>';
$options = array ( QUIZ_ALLATTEMPTS => get_string("attemptsall", 'quiz_analysis'),
QUIZ_HIGHESTATTEMPT => get_string("attemptshighest", 'quiz_analysis'),
QUIZ_FIRSTATTEMPT => get_string("attemptsfirst", 'quiz_analysis'),
echo '<input type="submit" value="'.get_string('go').'" />';
helpbutton("analysisoptions", get_string("analysisoptions",'quiz_analysis'), 'quiz');
echo '</td></tr></table>';
+ echo '</fieldset>';
echo '</form>';
echo '</div>';
echo "\n";
- echo '<table align="center"><tr>';
+ echo '<table class="boxaligncenter"><tr>';
$options = array();
$options["id"] = "$cm->id";
$options["q"] = "$quiz->id";
}
// grade all and "back" links
- $links = "<center><a href=\"report.php?mode=grading&action=grade&q=$quiz->id&questionid=$question->id&gradeall=1\">".get_string('gradeall', 'quiz').'</a> | '.
- "<a href=\"report.php?mode=grading&q=$quiz->id&action=viewquestions\">".get_string('backtoquestionlist', 'quiz').'</a></center>'.
+ $links = "<div class=\"boxaligncenter\"><a href=\"report.php?mode=grading&action=grade&q=$quiz->id&questionid=$question->id&gradeall=1\">".get_string('gradeall', 'quiz').'</a> | '.
+ "<a href=\"report.php?mode=grading&q=$quiz->id&action=viewquestions\">".get_string('backtoquestionlist', 'quiz').'</a></div>'.
// print everything here
print_heading($question->name);
// Display the form with one part for each selected attempt
echo '<form method="post" action="report.php">'.
+ '<fieldset class="invisiblefieldset">'.
'<input type="hidden" name="mode" value="grading" />'.
'<input type="hidden" name="q" value="'.$quiz->id.'">'.
'<input type="hidden" name="sesskey" value="'.sesskey().'" />'.
$options->readonly = 1;
// print the user name, attempt count, the question, and some more hidden fields
- echo '<div align="center" width="80%" style="padding:15px;">'.
+ echo '<div class="boxaligncenter" width="80%" style="padding:15px;">'.
fullname($attempt, true).': '.
get_string('attempt', 'quiz').$attempt->attempt;
echo '</div>';
}
- echo '<div align="center"><input type="submit" value="'.get_string('savechanges').'" /></div>'.
+ echo '<div class="boxaligncenter"><input type="submit" value="'.get_string('savechanges').'" /></div>'.
+ '</fieldset>'.
'</form>';
if ($usehtmleditor) {
// Start form
echo '<div id="tablecontainer">';
echo '<form id="attemptsform" method="post" action="report.php" onsubmit="var menu = document.getElementById(\'menuaction\'); return (menu.options[menu.selectedIndex].value == \'delete\' ? confirm(\''.$strreallydel.'\') : true);">';
+ echo '<fieldset class="invisiblefieldset">';
echo '<input type="hidden" name="id" value="'.$cm->id.'" />';
echo '<input type="hidden" name="mode" value="overview" />';
echo ' ';
$options = array('delete' => get_string('delete'));
echo choose_from_menu($options, 'action', '', get_string('withselected', 'quiz'), 'if(this.selectedIndex > 0) submitFormById(\'attemptsform\');', '', true);
- echo '<noscript id="noscriptmenuaction" style="display: inline;">';
- echo '<input type="submit" value="'.get_string('go').'" /></noscript>';
+ echo '<noscript id="noscriptmenuaction" style="display: inline;"><div>';
+ echo '<input type="submit" value="'.get_string('go').'" /></div></noscript>';
echo '<script type="text/javascript">'."\n<!--\n".'document.getElementById("noscriptmenuaction").style.display = "none";'."\n-->\n".'</script>';
echo '</td></tr></table>';
}
// Close form
+ echo '</fieldset>';
echo '</form></div>';
if (!empty($attempts)) {
- echo '<table align="center"><tr>';
+ echo '<table class="boxaligncenter"><tr>';
$options = array();
$options["id"] = "$cm->id";
$options["q"] = "$quiz->id";
// Print display options
echo '<div class="controls">';
echo '<form id="options" action="report.php" method="post">';
+ echo '<fieldset class="invisiblefieldset">';
echo '<p>'.get_string('displayoptions', 'quiz').': </p>';
echo '<input type="hidden" name="id" value="'.$cm->id.'" />';
echo '<input type="hidden" name="q" value="'.$quiz->id.'" />';
echo '<input type="hidden" name="mode" value="overview" />';
echo '<input type="hidden" name="noattempts" value="0" />';
echo '<input type="hidden" name="detailedmarks" value="0" />';
- echo '<table id="overview-options" align="center">';
+ echo '<table id="overview-options" class="boxaligncenter">';
echo '<tr align="left">';
echo '<td><label for="pagesize">'.get_string('pagesize', 'quiz').'</label></td>';
echo '<td><input type="text" id="pagesize" name="pagesize" size="1" value="'.$pagesize.'" /></td>';
echo '<tr><td colspan="2" align="center">';
echo '<input type="submit" value="'.get_string('go').'" />';
echo '</td></tr></table>';
+ echo '</fieldset>';
echo '</form>';
echo '</div>';
echo "\n";
// Print heading
print_heading(get_string('regradingquiz', 'quiz', format_string($quiz->name)));
- echo '<center>';
+ echo '<div class="boxaligncenter">';
print_string('regradedisplayexplanation', 'quiz');
- echo '<center>';
+ echo '</div>';
// Loop through all questions and all attempts and regrade while printing progress info
foreach ($questions as $question) {
- echo '<b>'.get_string('regradingquestion', 'quiz', $question->name).'</b> '.get_string('attempts', 'quiz').": \n";
+ echo '<strong>'.get_string('regradingquestion', 'quiz', $question->name).'</strong> '.get_string('attempts', 'quiz').": \n";
foreach ($attempts as $attempt) {
set_time_limit(30);
$changed = regrade_question_in_attempt($question, $attempt, $quiz, true);
echo ' #'.$attempt->id;
}
}
- echo '<br/ >';
+ echo '<br />';
// the following makes sure that the output is sent immediately.
@flush();@ob_flush();
}
$attemptlist = '';
foreach ($attempts as $at) {
$attemptlist .= ($at->id == $attempt->id)
- ? '<b>'.$at->attempt.'</b>, '
+ ? '<strong>'.$at->attempt.'</strong>, '
: '<a href="review.php?attempt='.$at->id.($showall?'&showall=true':'').'">'.$at->attempt.'</a>, ';
}
$table->data[] = array(get_string('attempts', 'quiz').':', trim($attemptlist, ' ,'));
unset($buttonoptions);
$buttonoptions['q'] = $quiz->id;
$buttonoptions['forcenew'] = true;
- echo '<center>';
+ echo '<div class="controls">';
print_single_button($CFG->wwwroot.'/mod/quiz/attempt.php', $buttonoptions, get_string('startagain', 'quiz'));
- echo '</center>';
+ echo '</div>';
} else { // print number of the attempt
print_heading(get_string('reviewofattempt', 'quiz', $attempt->attempt));
}
$numpages = quiz_number_of_pages($attempt->layout);
if ($numpages > 1 and !$showall) {
print_paging_bar($numpages, $page, 1, 'review.php?attempt='.$attempt->id.'&');
- echo '<center><a href="review.php?attempt='.$attempt->id.'&showall=true">';
+ echo '<div class="controls"><a href="review.php?attempt='.$attempt->id.'&showall=true">';
print_string('showall', 'quiz');
- echo '</a></center>';
+ echo '</a></div>';
}
/// Print all the questions
foreach ($pagequestions as $i) {
if (!isset($questions[$i])) {
print_simple_box_start('center', '90%');
- echo '<b><font size="+1">' . $number . '</font></b><br />';
+ echo '<strong><font size="+1">' . $number . '</font></strong><br />';
notify(get_string('errormissingquestion', 'quiz', $i));
print_simple_box_end();
$number++; // Just guessing that the missing question would have lenght 1
print_simple_box(format_text($quiz->intro, FORMAT_MOODLE, $formatoptions), "center");
}
+ echo '<div class="quizinfo">';
+
// Print information about number of attempts and grading method.
if ($quiz->attempts > 1) {
- echo "<p align=\"center\">".get_string("attemptsallowed", "quiz").": $quiz->attempts</p>";
+ echo "<p>".get_string("attemptsallowed", "quiz").": $quiz->attempts</p>";
}
if ($quiz->attempts != 1) {
- echo "<p align=\"center\">".get_string("grademethod", "quiz").": ".$QUIZ_GRADE_METHOD[$quiz->grademethod]."</p>";
+ echo "<p>".get_string("grademethod", "quiz").": ".$QUIZ_GRADE_METHOD[$quiz->grademethod]."</p>";
}
// Print information about timings.
$available = ($quiz->timeopen < $timenow and ($timenow < $quiz->timeclose or !$quiz->timeclose));
if ($available) {
if ($quiz->timelimit) {
- echo "<p align=\"center\">".get_string("quiztimelimit","quiz", format_time($quiz->timelimit * 60))."</p>";
+ echo "<p>".get_string("quiztimelimit","quiz", format_time($quiz->timelimit * 60))."</p>";
}
quiz_view_dates($quiz);
} else if ($timenow < $quiz->timeopen) {
- echo "<p align=\"center\">".get_string("quiznotavailable", "quiz", userdate($quiz->timeopen));
+ echo "<p>".get_string("quiznotavailable", "quiz", userdate($quiz->timeopen));
} else {
- echo "<p align=\"center\">".get_string("quizclosed", "quiz", userdate($quiz->timeclose));
+ echo "<p>".get_string("quizclosed", "quiz", userdate($quiz->timeclose));
}
+ echo '</div>';
} else {
$available = false;
}
}
if ($overallfeedback) {
- echo '<p align="center">', quiz_feedback_for_grade($mygrade, $quiz->id), '</p>';
+ echo '<p class="quizgradefeedback">'.quiz_feedback_for_grade($mygrade, $quiz->id).'</p>';
}
}
} else if ($available && $moreattempts) {
echo "<br />";
- echo "<div align=\"center\">";
+ echo "<div class=\"quizattempt\">";
if ($unfinished) {
$buttontext = get_string('continueattemptquiz', 'quiz');
$lastattempttime = $lastattempt->timefinish;
if ($numattempts == 1 && $quiz->delay1 && $timenow <= $lastattempttime + $quiz->delay1) {
$tempunavailable = get_string('temporaryblocked', 'quiz') .
- ' <b>'. userdate($lastattempttime + $quiz->delay1). '<b>';
+ ' <strong>'. userdate($lastattempttime + $quiz->delay1). '</strong>';
} else if ($numattempts > 1 && $quiz->delay2 && $timenow <= $lastattempttime + $quiz->delay2) {
$tempunavailable = get_string('temporaryblocked', 'quiz') .
- ' <b>'. userdate($lastattempttime + $quiz->delay2). '<b>';
+ ' <strong>'. userdate($lastattempttime + $quiz->delay2). '</strong>';
}
// If so, display a message and prevent the start button from appearing.
//]]>
</script>
<noscript>
+<div>
<?php print_heading(get_string('noscript', 'quiz')); ?>
+</div>
</noscript>
<?php
}
// wrap the table in a form and output it
echo '<form action="category.php" method="post">';
+ echo '<fieldset class="invisiblefieldset">';
echo "<input type=\"hidden\" name=\"sesskey\" value=\"$USER->sesskey\" />";
echo '<input type="hidden" name="id" value="'. $this->course->id . '" />';
echo '<input type="hidden" name="addcategory" value="true" />';
print_table($this->newtable);
+ echo '</fieldset>';
echo '</form>';
}
$this->output_edit_single_table($category,$page);
echo '</td></tr></table>';
echo '<p><div align="center"><form action="category.php" method="get">
+ <fieldset class="invisiblefieldset">
<input type="hidden" name="sesskey" value="'.$USER->sesskey.'" />
<input type="hidden" name="id" value="' . $this->course->id . '" />
- <input type="submit" value="' . $this->str->cancel . '" /></form></div></p>';
+ <input type="submit" value="' . $this->str->cancel . '" />
+ </fieldset>
+ </form>
+ </div></p>';
print_footer($this->course);
exit;
} else {
// wrap the table in a form and output it
echo '<p><form action="category.php" method="post">';
+ echo '<fieldset class="invisiblefieldset">';
echo "<input type=\"hidden\" name=\"sesskey\" value=\"$USER->sesskey\" />";
echo '<input type="hidden" name="id" value="'. $this->course->id . '" />';
echo '<input type="hidden" name="updateid" value="' . $category->id . '" />';
echo "<input type=\"hidden\" name=\"page\" value=\"$page\" />";
print_table($edittable);
+ echo '</fieldset>';
echo '</form></p>';
}
$categorystrings = $this->categorystrings;
unset ($categorystrings[$category->id]);
echo "<p><div align=\"center\"><form action=\"category.php\" method=\"get\">";
+ echo '<fieldset class="invisiblefieldset">';
echo "<input type=\"hidden\" name=\"sesskey\" value=\"$USER->sesskey\" />";
echo "<input type=\"hidden\" name=\"id\" value=\"{$this->course->id}\" />";
echo "<input type=\"hidden\" name=\"delete\" value=\"$category->id\" />";
choose_from_menu($categorystrings, "confirm", "", "");
echo "<input type=\"submit\" value=\"". get_string("categorymoveto", "quiz") . "\" />";
echo "<input type=\"submit\" name=\"cancel\" value=\"{$this->str->cancel}\" />";
+ echo '</fieldset>';
echo "</form></div></p>";
print_footer($this->course);
exit;
include('tabs.php');
}
- echo '<table align="center" border="0" cellpadding="2" cellspacing="0">';
+ echo '<table class="boxaligncenter" border="0" cellpadding="2" cellspacing="0">';
echo '<tr><td valign="top">';
include($CFG->dirroot.'/question/showbank.php');
}
echo ' onchange="getElementById(\'displayoptions\').submit(); return true;" />';
print_string('showhidden', 'quiz');
- echo '</td><td valign="middle"><noscript>';
+ echo '</td><td valign="middle"><noscript><div>';
echo ' <input type="submit" value="'. get_string('go') .'" />';
- echo '</noscript></td></tr></table></fieldset></form>';
+ echo '</div></noscript></td></tr></table></fieldset></form>';
}
notify("Category not found!");
return;
}
- echo "<center>";
+ echo '<div class="boxaligncenter">';
$formatoptions = new stdClass;
$formatoptions->noclean = true;
echo format_text($category->info, FORMAT_MOODLE, $formatoptions, $course->id);
echo '</table>';
- echo '</center>';
+ echo '</div>';
$categorylist = ($recurse) ? question_categorylist($category->id) : $category->id;
$canedit = has_capability('moodle/question:manage', $context);
echo '<form method="post" action="edit.php?courseid='.$course->id.'">';
+ echo '<fieldset class="invisiblefieldset">';
echo '<input type="hidden" name="sesskey" value="'.$USER->sesskey.'" />';
print_simple_box_start('center', '100%', '#ffffff', 0);
echo '<table id="categoryquestions" cellspacing="0"><tr>';
$actionwidth = $canedit ? 95 : 70;
- echo "<th width=\"$actionwidth\" style=\"white-space:nowrap;\" class=\"header\" scope=\"col\">$straction</th>";
+ echo "<th style=\"width:$actionwidth; white-space:nowrap;\" class=\"header\" scope=\"col\">$straction</th>";
$sortoptions = array('name, qtype ASC' => get_string("sortalpha", "quiz"),
'qtype, name ASC' => get_string("sorttypealpha", "quiz"),
'id ASC' => get_string("sortage", "quiz"));
$orderselect = choose_from_menu ($sortoptions, 'sortorder', $sortorder, false, 'this.form.submit();', '0', true);
- $orderselect .= '<noscript><input type="submit" value="'.get_string("sortsubmit", "quiz").'" /></noscript>';
- echo "<th width=\"100%\" align=\"left\" style=\"white-space:nowrap;\" class=\"header\" scope=\"col\">$strquestionname $orderselect</th>
+ $orderselect .= '<noscript><div><input type="submit" value="'.get_string("sortsubmit", "quiz").'" /></div></noscript>';
+ echo "<th align=\"left\" style=\"width:100%; white-space:nowrap;\" class=\"header\" scope=\"col\">$strquestionname $orderselect</th>
<th style=\"white-space:nowrap;\" class=\"header\" scope=\"col\">$strtype</th>";
echo "</tr>\n";
foreach ($questions as $question) {
}
// preview
- echo "<a title=\"$strpreview\" href=\"javascript:void();\" onClick=\"openpopup('/question/preview.php?id=$question->id&quizid=$quizid','$strpreview', " .
+ echo "<a title=\"$strpreview\" href=\"javascript:void();\" onclick=\"openpopup('/question/preview.php?id=$question->id&quizid=$quizid','$strpreview', " .
QUESTION_PREVIEW_POPUP_OPTIONS . ", false)\"><img
src=\"$CFG->pixpath/t/preview.gif\" alt=\"$strpreview\" /></a> ";
echo ' <input type="submit" name="addrandom" value="'. get_string('add') .'" />';
helpbutton('random', get_string('random', 'quiz'), 'quiz');
}
-
- echo "</form>\n";
+ echo '</fieldset>';
+ echo "</form>\n";
}
-?>
+?>
\ No newline at end of file
else {
$efile = "{$CFG->wwwroot}/file.php?file=/".$qformat->question_get_export_dir()."/$exportfilename".$file_ext."&forcedownload=1";
}
- echo "<p><center><a href=\"$efile\">$download_str</a></center></p>";
- echo "<p><center><font size=\"-1\">$downloadextra_str</font></center></p>";
+ echo "<p><div class=\"boxaligncenter\"><a href=\"$efile\">$download_str</a></div></p>";
+ echo "<p><div class=\"boxaligncenter\"><font size=\"-1\">$downloadextra_str</font></div></p>";
print_continue("edit.php?courseid=$course->id");
print_footer($course);
print_simple_box_start("center");
echo "<form enctype=\"multipart/form-data\" method=\"post\" action=\"export.php\">\n";
+ echo '<fieldset class="invisiblefieldset">';
echo "<input type=\"hidden\" name=\"sesskey\" value=\"" . sesskey() . "\" />\n";
echo "<table cellpadding=\"5\">\n";
echo "</td></tr>\n";
echo "</table>\n";
+ echo '</fieldset>';
echo "</form>\n";
print_simple_box_end();
print_heading($info);
$options['category'] = $this->category->id;
- echo "<center>";
+ echo '<div class="boxaligncenter">';
print_single_button("multiple.php", $options, get_string("randomcreate", "quiz"));
- echo "</center>";
+ echo "</div>";
return true;
}
}
else {
global $course, $CFG;
- print '<table align="center" border="1">';
+ print '<table class="boxaligncenter" border="1">';
print '<tr><td colspan="2" style="background-color:#FF8888;">This matching question is malformed. Please ensure there are no blank answers, no two questions have the same answer, and/or there are correct answers for each question. There must be at least as many subanswers as subquestions, and at least one subquestion.</td></tr>';
print "<tr><td>Question:</td><td>".$quest->QUESTION_BLOCK->text;
print_simple_box_start("center");
if ($hostname_access_error) { notify("couldn't connect to ODBC Socket Server on " . $hostname_access_error); }
echo "<form method=\"post\" action=\"import.php\">";
+ echo '<fieldset class="invisiblefieldset">';
echo "<table cellpadding=\"5\">";
echo "<tr><td align=\"right\">";
echo " <input type=\"submit\" name=\"save\" value=\"Connect to Server\" />";
echo "</td></tr>";
echo "</table>";
+ echo '</fieldset>';
echo "</form>";
print_simple_box_end();
print_footer($course);
print_heading_with_help($strimportquestions, "import", "quiz");
print_simple_box_start("center");
echo "<form method=\"post\" action=\"import.php\">";
+ echo '<fieldset class="invisiblefieldset">';
echo "<table cellpadding=\"5\">";
echo "<tr><td align=\"right\">";
echo "Choose a category of questions to import:</td><td>";
echo " <input type=\"submit\" name=\"save\" value=\"Import Questions\" />";
echo "</td></tr>";
echo "</table>";
+ echo '</fieldset>';
echo "</form>";
print_simple_box_end();
print_footer($course);
?>
<form id="form" enctype="multipart/form-data" method="post" action="import.php">
- <input type="hidden" name="sesskey" value="<?php echo sesskey(); ?>" />
- <?php print_simple_box_start("center"); ?>
- <table cellpadding="5">
- <tr>
- <td align="right"><?php echo $txt->category; ?>:</td>
- <td><?php choose_from_menu($catmenu, "category", $category->id, ""); ?>
- <?php echo $txt->fromfile; ?>
- <input name="catfromfile" type="checkbox" />
- <?php helpbutton('importcategory', $txt->importcategory, 'quiz'); ?></td>
- </tr>
-
- <tr>
- <td align="right"><?php echo $txt->fileformat; ?>:</td>
- <td><?php choose_from_menu($fileformatnames, "format", "gift", "");
- helpbutton("import", $txt->importquestions, "quiz"); ?></td>
- </tr>
- <tr>
- <td align="right"><?php echo $txt->matchgrades; ?></td>
- <td><?php choose_from_menu($matchgrades,'matchgrades',$txt->matchgradeserror,'' );
- helpbutton('matchgrades', $txt->matchgrades, 'quiz'); ?></td>
- </tr>
- </table>
- <?php
- print_simple_box_end();
-
- print_simple_box_start('center'); ?>
- <?php echo $txt->importfileupload; ?>
- <table cellpadding="5">
- <tr>
- <td align="right"><?php echo $txt->upload; ?>:</td>
- <td><?php upload_print_form_fragment(1,array('newfile'),null,false,null,$course->maxbytes,0,false); ?></td>
- </tr>
-
- <tr>
- <td> </td>
- <td><input type="submit" name="save" value="<?php echo $txt->uploadthisfile; ?>" /></td>
- </tr>
- </table>
- <?php
- print_simple_box_end();
-
- print_simple_box_start('center'); ?>
- <?php echo $txt->importfilearea; ?>
- <table cellpadding="5">
- <tr>
- <td align="right"><?php echo $txt->file; ?>:</td>
- <td><input type="text" name="choosefile" size="50" /></td>
- </tr>
-
- <tr>
- <td> </td>
- <td><?php button_to_popup_window ("/files/index.php?id={$course->id}&choose=form.choosefile",
- "coursefiles", $txt->choosefile, 500, 750, $txt->choosefile); ?>
- <input type="submit" name="save" value="<?php echo $txt->importfromthisfile; ?>" /></td>
- </tr>
- </table>
- <?php
- print_simple_box_end(); ?>
+ <fieldset class="invisiblefieldset">
+ <input type="hidden" name="sesskey" value="<?php echo sesskey(); ?>" />
+ <?php print_simple_box_start("center"); ?>
+ <table cellpadding="5">
+ <tr>
+ <td align="right"><?php echo $txt->category; ?>:</td>
+ <td><?php choose_from_menu($catmenu, "category", $category->id, ""); ?>
+ <?php echo $txt->fromfile; ?>
+ <input name="catfromfile" type="checkbox" />
+ <?php helpbutton('importcategory', $txt->importcategory, 'quiz'); ?></td>
+ </tr>
+
+ <tr>
+ <td align="right"><?php echo $txt->fileformat; ?>:</td>
+ <td><?php choose_from_menu($fileformatnames, "format", "gift", "");
+ helpbutton("import", $txt->importquestions, "quiz"); ?></td>
+ </tr>
+ <tr>
+ <td align="right"><?php echo $txt->matchgrades; ?></td>
+ <td><?php choose_from_menu($matchgrades,'matchgrades',$txt->matchgradeserror,'' );
+ helpbutton('matchgrades', $txt->matchgrades, 'quiz'); ?></td>
+ </tr>
+ </table>
+ <?php
+ print_simple_box_end();
+
+ print_simple_box_start('center'); ?>
+ <?php echo $txt->importfileupload; ?>
+ <table cellpadding="5">
+ <tr>
+ <td align="right"><?php echo $txt->upload; ?>:</td>
+ <td><?php upload_print_form_fragment(1,array('newfile'),null,false,null,$course->maxbytes,0,false); ?></td>
+ </tr>
+
+ <tr>
+ <td> </td>
+ <td><input type="submit" name="save" value="<?php echo $txt->uploadthisfile; ?>" /></td>
+ </tr>
+ </table>
+ <?php
+ print_simple_box_end();
+
+ print_simple_box_start('center'); ?>
+ <?php echo $txt->importfilearea; ?>
+ <table cellpadding="5">
+ <tr>
+ <td align="right"><?php echo $txt->file; ?>:</td>
+ <td><input type="text" name="choosefile" size="50" /></td>
+ </tr>
+
+ <tr>
+ <td> </td>
+ <td><?php button_to_popup_window ("/files/index.php?id={$course->id}&choose=form.choosefile",
+ "coursefiles", $txt->choosefile, 500, 750, $txt->choosefile); ?>
+ <input type="submit" name="save" value="<?php echo $txt->importfromthisfile; ?>" /></td>
+ </tr>
+ </table>
+ <?php
+ print_simple_box_end(); ?>
+ </fieldset>
</form>
<?php
? 'decimals'
: 'significantfigures'), 'quiz', $i);
}
- return '<input type="submit" onClick="'
+ return '<input type="submit" onclick="'
. "getElementById('addform').regenerateddefid.value='$defid'; return true;"
.'" value="'. get_string('generatevalue', 'quiz') . '"/><br/>'
. '<input type="text" size="3" name="calcmin[]" '
// Print the new-dataset table
$addtable->data = array($addline);
echo "<form id=\"addform\" method=\"post\" action=\"question.php\">
+ <fieldset class=\"invisiblefieldset\">
<input type=\"hidden\" name=\"regenerateddefid\" value=\"0\"/>
<input type=\"hidden\" name=\"id\" value=\"$question->id\"/>
<input type=\"hidden\" name=\"category\" value=\"$question->category\"/>
<input type=\"hidden\" name=\"qtype\" value=\"$question->qtype\"/>
<input type=\"hidden\" name=\"sesskey\" value=\"".sesskey()."\"/>
- <input type=\"hidden\" name=\"wizardpage\" value=\"datasetitems\"/>";
+ <input type=\"hidden\" name=\"wizardpage\" value=\"datasetitems\"/>
+ </fieldset>";
print_table($addtable);
echo '</form>';
// Print the existing-datasets table
if (!empty($table->data)) {
echo "<form method=\"post\" action=\"question.php\">
+ <fieldset class=\"invisiblefieldset\">
<input type=\"hidden\" name=\"id\" value=\"$question->id\"/>
<input type=\"hidden\" name=\"category\" value=\"$question->category\"/>
<input type=\"hidden\" name=\"qtype\" value=\"$question->qtype\"/>
<input type=\"hidden\" name=\"sesskey\" value=\"".sesskey()."\"/>
- <input type=\"hidden\" name=\"wizardpage\" value=\"datasetitems\"/>";
+ <input type=\"hidden\" name=\"wizardpage\" value=\"datasetitems\"/>
+ </fieldset>";
print_table($table);
echo '</form>';
- echo "<center><br /><br /><form method=\"post\" action=\"question.php\">
+ echo "<div class=\"boxaligncenter\"><br /><br />
+ <form method=\"post\" action=\"question.php\">
+ <fieldset class=\"invisiblefieldset\">
<input type=\"hidden\" name=\"id\" value=\"$question->id\"/>
<input type=\"hidden\" name=\"category\" value=\"$question->category\"/>
<input type=\"hidden\" name=\"qtype\" value=\"$question->qtype\"/>
<input type=\"hidden\" name=\"sesskey\" value=\"".sesskey()."\"/>
<input type=\"hidden\" name=\"wizardpage\" value=\"datasetitems\"/>
<input type=\"submit\" name=\"backtoquiz\" value=\"$strbacktoquiz\" />
- </form></center>\n";
+ </fieldset>
+ </form></div>\n";
} else {
notify( $strdataitemneed );
}
<form id="theform" method="post" action="question.php">
-<center>
+<div class="boxaligncenter">
<table cellpadding="5">
<?php if (!empty($datasets)) { ?>
<tr valign="top">
<input type="hidden" name="sesskey" value="<?php p(sesskey()) ?>" />
<input type="hidden" name="wizardpage" value="datasetdefinitions" />
<input type="submit" value="<?php print_string("savechanges") ?>" />
-</center>
+</div>
</form>
<form id="theform" method="post" action="question.php">
-<center>
+<div class="boxaligncenter">
<table cellpadding="5">
<tr valign="top">
<form id="theform" method="post" action="question.php">
+<fieldset class="invisiblefieldset">
<table cellpadding="5">
<tr valign="top">
?>
</table>
<input type="hidden" name="type" value="<?php echo($type->id); ?>" />
+</fieldset>
</form>
/// Print the table
print_heading_with_help($stritemtypes, 'rqp', 'quiz');
echo '<form action="types.php" method="post">';
+ echo '<fieldset class="invisiblefieldset">';
echo '<input type="hidden" name="sesskey" value="'.sesskey().'" />';
- echo '<center>';
+ echo '<div class="boxaligncenter">';
$table->print_html();
- echo '</center>';
+ echo '</div>';
+ echo '</fieldset>';
echo '</form>';
/// Finish the page