mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 05:58:34 +01:00
Xhtml fixes for MDL-7861.
This commit is contained in:
parent
fc935b3095
commit
0927589412
@ -140,10 +140,11 @@
|
||||
}
|
||||
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\" />";
|
||||
@ -151,6 +152,7 @@
|
||||
echo "</div>\n";
|
||||
|
||||
print_simple_box_end();
|
||||
echo '</fieldset>';
|
||||
echo "</form>\n";
|
||||
|
||||
if (empty($popup)) {
|
||||
@ -458,9 +460,9 @@
|
||||
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'));
|
||||
}
|
||||
@ -472,18 +474,21 @@
|
||||
?>
|
||||
<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
|
||||
@ -503,7 +508,7 @@
|
||||
//]]>
|
||||
</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";
|
||||
}
|
||||
@ -549,6 +554,7 @@
|
||||
}
|
||||
|
||||
// Finish the form
|
||||
echo '</fieldset>';
|
||||
echo "</form>\n";
|
||||
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php defined('MOODLE_INTERNAL') or die('Direct access to this script is forbidden.');?>
|
||||
|
||||
<div align="center">
|
||||
<div class="boxaligncenter">
|
||||
<?php
|
||||
if (!empty($popup)) {
|
||||
?>
|
||||
@ -14,7 +14,9 @@ document.write('<input type="button" value="<?php print_string('closewindow') ?>
|
||||
//]]>
|
||||
</script>
|
||||
<noscript>
|
||||
<div>
|
||||
<?php print_string('closewindow'); ?>
|
||||
</div>
|
||||
</noscript>
|
||||
|
||||
<?php
|
||||
|
@ -70,8 +70,8 @@
|
||||
}
|
||||
|
||||
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;
|
||||
|
@ -88,6 +88,7 @@
|
||||
</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 -->
|
||||
@ -386,6 +387,7 @@
|
||||
|
||||
</table>
|
||||
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
@ -314,9 +314,9 @@
|
||||
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)) {
|
||||
@ -343,8 +343,8 @@
|
||||
$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);
|
||||
@ -354,7 +354,7 @@
|
||||
|
||||
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');
|
||||
|
||||
|
@ -148,7 +148,7 @@ function quiz_print_question_list($quiz, $allowdelete=true, $showbreaks=true, $r
|
||||
$strpreview = get_string("preview", "quiz");
|
||||
|
||||
if (!$quiz->questions) {
|
||||
echo "<p align=\"center\">";
|
||||
echo "<p class=\"quizquestionlistcontrols\">";
|
||||
print_string("noquestions", "quiz");
|
||||
echo "</p>";
|
||||
return 0;
|
||||
@ -159,7 +159,7 @@ function quiz_print_question_list($quiz, $allowdelete=true, $showbreaks=true, $r
|
||||
{$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;
|
||||
@ -176,11 +176,18 @@ function quiz_print_question_list($quiz, $allowdelete=true, $showbreaks=true, $r
|
||||
$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])) {
|
||||
@ -206,10 +213,11 @@ function quiz_print_question_list($quiz, $allowdelete=true, $showbreaks=true, $r
|
||||
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>";
|
||||
@ -270,7 +278,7 @@ function quiz_print_question_list($quiz, $allowdelete=true, $showbreaks=true, $r
|
||||
$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>";
|
||||
}
|
||||
@ -290,30 +298,32 @@ function quiz_print_question_list($quiz, $allowdelete=true, $showbreaks=true, $r
|
||||
|
||||
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"';
|
||||
@ -344,7 +354,8 @@ function quiz_print_question_list($quiz, $allowdelete=true, $showbreaks=true, $r
|
||||
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;
|
||||
|
@ -24,9 +24,11 @@
|
||||
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));
|
||||
|
@ -23,7 +23,7 @@ var ec_quiz_finish = ec_page_start + <?php echo ($timerstartvalue * 1000); ?>;
|
||||
<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">
|
||||
@ -32,8 +32,9 @@ var ec_quiz_finish = ec_page_start + <?php echo ($timerstartvalue * 1000); ?>;
|
||||
</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>
|
||||
|
@ -425,7 +425,7 @@ function quiz_print_recent_mod_activity($activity, $course, $detail=false) {
|
||||
|
||||
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\" ".
|
||||
|
@ -607,7 +607,7 @@ function quiz_get_question_review($quiz, $question) {
|
||||
$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>";
|
||||
}
|
||||
|
@ -68,9 +68,11 @@ class page_quiz extends page_generic_activity {
|
||||
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>';
|
||||
}
|
||||
|
@ -358,12 +358,13 @@ class quiz_report extends quiz_default_report {
|
||||
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'),
|
||||
@ -382,11 +383,12 @@ class quiz_report extends quiz_default_report {
|
||||
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";
|
||||
|
@ -269,8 +269,8 @@ class quiz_report extends quiz_default_report {
|
||||
}
|
||||
|
||||
// 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);
|
||||
@ -348,6 +348,7 @@ class quiz_report extends quiz_default_report {
|
||||
// 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().'" />'.
|
||||
@ -370,7 +371,7 @@ class quiz_report extends quiz_default_report {
|
||||
$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;
|
||||
|
||||
@ -384,7 +385,8 @@ class quiz_report extends quiz_default_report {
|
||||
|
||||
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) {
|
||||
|
@ -500,6 +500,7 @@ class quiz_report extends quiz_default_report {
|
||||
// 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" />';
|
||||
|
||||
@ -515,16 +516,17 @@ class quiz_report extends quiz_default_report {
|
||||
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";
|
||||
@ -563,13 +565,14 @@ class quiz_report extends quiz_default_report {
|
||||
// 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>';
|
||||
@ -590,6 +593,7 @@ class quiz_report extends quiz_default_report {
|
||||
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";
|
||||
|
@ -30,13 +30,13 @@ class quiz_report extends quiz_default_report {
|
||||
|
||||
// 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);
|
||||
@ -47,7 +47,7 @@ class quiz_report extends quiz_default_report {
|
||||
echo ' #'.$attempt->id;
|
||||
}
|
||||
}
|
||||
echo '<br/ >';
|
||||
echo '<br />';
|
||||
// the following makes sure that the output is sent immediately.
|
||||
@flush();@ob_flush();
|
||||
}
|
||||
|
@ -173,7 +173,7 @@
|
||||
$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, ' ,'));
|
||||
@ -212,9 +212,9 @@
|
||||
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));
|
||||
}
|
||||
@ -229,9 +229,9 @@
|
||||
$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
|
||||
@ -241,7 +241,7 @@
|
||||
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
|
||||
|
@ -90,12 +90,14 @@
|
||||
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.
|
||||
@ -103,14 +105,15 @@
|
||||
$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;
|
||||
}
|
||||
@ -296,7 +299,7 @@
|
||||
}
|
||||
|
||||
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>';
|
||||
}
|
||||
}
|
||||
|
||||
@ -307,7 +310,7 @@
|
||||
|
||||
} else if ($available && $moreattempts) {
|
||||
echo "<br />";
|
||||
echo "<div align=\"center\">";
|
||||
echo "<div class=\"quizattempt\">";
|
||||
|
||||
if ($unfinished) {
|
||||
$buttontext = get_string('continueattemptquiz', 'quiz');
|
||||
@ -327,10 +330,10 @@
|
||||
$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.
|
||||
@ -389,7 +392,9 @@ document.write('<input type="button" value="<?php echo $buttontext ?>" onclick="
|
||||
//]]>
|
||||
</script>
|
||||
<noscript>
|
||||
<div>
|
||||
<?php print_heading(get_string('noscript', 'quiz')); ?>
|
||||
</div>
|
||||
</noscript>
|
||||
<?php
|
||||
}
|
||||
|
@ -187,10 +187,12 @@ class question_category_object {
|
||||
|
||||
// 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>';
|
||||
}
|
||||
|
||||
@ -381,9 +383,13 @@ class question_category_object {
|
||||
$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 {
|
||||
@ -440,11 +446,13 @@ class question_category_object {
|
||||
|
||||
// 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>';
|
||||
}
|
||||
|
||||
@ -589,12 +597,14 @@ class question_category_object {
|
||||
$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;
|
||||
|
@ -63,7 +63,7 @@
|
||||
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');
|
||||
|
@ -192,9 +192,9 @@ function question_category_form($course, $current, $recurse=1, $showhidden=false
|
||||
}
|
||||
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>';
|
||||
}
|
||||
|
||||
|
||||
@ -259,7 +259,7 @@ function question_list($course, $categoryid, $quizid=0,
|
||||
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);
|
||||
@ -298,7 +298,7 @@ function question_list($course, $categoryid, $quizid=0,
|
||||
|
||||
echo '</table>';
|
||||
|
||||
echo '</center>';
|
||||
echo '</div>';
|
||||
|
||||
$categorylist = ($recurse) ? question_categorylist($category->id) : $category->id;
|
||||
|
||||
@ -330,18 +330,19 @@ function question_list($course, $categoryid, $quizid=0,
|
||||
$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) {
|
||||
@ -354,7 +355,7 @@ function question_list($course, $categoryid, $quizid=0,
|
||||
}
|
||||
|
||||
// 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> ";
|
||||
|
||||
@ -426,8 +427,8 @@ function question_list($course, $categoryid, $quizid=0,
|
||||
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";
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
@ -122,8 +122,8 @@
|
||||
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);
|
||||
@ -144,6 +144,7 @@
|
||||
|
||||
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";
|
||||
|
||||
@ -178,6 +179,7 @@
|
||||
echo "</td></tr>\n";
|
||||
|
||||
echo "</table>\n";
|
||||
echo '</fieldset>';
|
||||
echo "</form>\n";
|
||||
print_simple_box_end();
|
||||
|
||||
|
@ -215,9 +215,9 @@ class qformat_aon extends qformat_default {
|
||||
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;
|
||||
}
|
||||
|
@ -846,7 +846,7 @@ function process_matching($quest, &$questions) {
|
||||
}
|
||||
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;
|
||||
|
@ -58,6 +58,7 @@ class qformat_coursetestmanager extends qformat_default {
|
||||
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\">";
|
||||
@ -79,6 +80,7 @@ class qformat_coursetestmanager extends qformat_default {
|
||||
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);
|
||||
@ -120,6 +122,7 @@ class qformat_coursetestmanager extends qformat_default {
|
||||
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>";
|
||||
@ -138,6 +141,7 @@ class qformat_coursetestmanager extends qformat_default {
|
||||
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);
|
||||
|
@ -226,64 +226,66 @@
|
||||
?>
|
||||
|
||||
<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>
|
||||
<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();
|
||||
<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>
|
||||
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();
|
||||
<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>
|
||||
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(); ?>
|
||||
<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
|
||||
|
@ -336,7 +336,7 @@ class question_calculated_qtype extends question_dataset_dependent_questiontype
|
||||
? '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[]" '
|
||||
|
@ -250,12 +250,14 @@
|
||||
// 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>';
|
||||
|
||||
@ -264,22 +266,27 @@
|
||||
// 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 );
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
<form id="theform" method="post" action="question.php">
|
||||
<center>
|
||||
<div class="boxaligncenter">
|
||||
<table cellpadding="5">
|
||||
<?php if (!empty($datasets)) { ?>
|
||||
<tr valign="top">
|
||||
@ -30,6 +30,6 @@
|
||||
<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>
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
<form id="theform" method="post" action="question.php">
|
||||
<center>
|
||||
<div class="boxaligncenter">
|
||||
<table cellpadding="5">
|
||||
|
||||
<tr valign="top">
|
||||
|
@ -1,4 +1,5 @@
|
||||
<form id="theform" method="post" action="question.php">
|
||||
<fieldset class="invisiblefieldset">
|
||||
<table cellpadding="5">
|
||||
|
||||
<tr valign="top">
|
||||
@ -55,4 +56,5 @@
|
||||
?>
|
||||
</table>
|
||||
<input type="hidden" name="type" value="<?php echo($type->id); ?>" />
|
||||
</fieldset>
|
||||
</form>
|
||||
|
@ -158,10 +158,12 @@
|
||||
/// 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
|
||||
|
Loading…
x
Reference in New Issue
Block a user