]> git.mjollnir.org Git - moodle.git/commitdiff
Xhtml fixes for MDL-7861.
authorvyshane <vyshane>
Tue, 9 Jan 2007 09:07:16 +0000 (09:07 +0000)
committervyshane <vyshane>
Tue, 9 Jan 2007 09:07:16 +0000 (09:07 +0000)
31 files changed:
mod/quiz/attempt.php
mod/quiz/attempt_close_js.php
mod/quiz/comment.php
mod/quiz/config.html
mod/quiz/edit.php
mod/quiz/editlib.php
mod/quiz/index.php
mod/quiz/jstimer.php
mod/quiz/lib.php
mod/quiz/locallib.php
mod/quiz/pagelib.php
mod/quiz/report/analysis/report.php
mod/quiz/report/grading/report.php
mod/quiz/report/overview/report.php
mod/quiz/report/regrade/report.php
mod/quiz/review.php
mod/quiz/view.php
question/category_class.php
question/edit.php
question/editlib.php
question/export.php
question/format/aon/format.php
question/format/blackboard_6/format.php
question/format/coursetestmanager/format.php
question/import.php
question/type/calculated/questiontype.php
question/type/datasetdependent/datasetitems.php
question/type/datasetdependent/questiondatasets.html
question/type/editquestionstart.html
question/type/rqp/editquestion.html
question/type/rqp/types.php

index 90a40bf0af65c6b0f9f0c7a5024ca2f1efe512e5..691ef642935ef28b4e75da6c138f22699dcfa322 100644 (file)
             }
             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";
 
 
index 4932b57470876c201cf51d1f0cc4512b76169436..fbfeaab96a3fdb9b3e9e4986bc4bf4d539719648 100644 (file)
@@ -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
index e1a960ac252b5c63a019b320e4289f9b6ed2860d..1ec2803210e199b183965446e5a2249f36c0cc73 100644 (file)
@@ -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;
index a96de083e392a091bb942653de6be279b82861bc..29f61bc4a907eaa39748ea628982b85b91853b04 100644 (file)
@@ -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 -->
 
 </table>
 
+</fieldset>
 </form>
 
 <script type="text/javascript">
index 138c6d5e678854e93ee1223502edf4310c40dec6..d07027a9d7600365a2cafb9c76be762307e3f816 100644 (file)
         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&amp;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');
 
index 7d5ebcd50353974c84ea604f3d2d071f0061e1ee..87db062348b9a5331edb5c06196f3233002e8f7f 100644 (file)
@@ -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">&nbsp;</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&amp;quizid=$quiz->id&amp;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 ? '&amp;contextquiz='.$quiz->id : '';
         $quiz_id = $quiz->id ? '&amp;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>&nbsp;\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;
index b61f655b421414dc61f224e6e366d8b1d6add1b2..aa278d6a754e8d29e41a9cc55a2407b4e9f963a0 100644 (file)
     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));
index 942fe8f7b955799a8677778f80193c03962b8658..31ca9ce35b5e5716a5f54c8278dc336cc36f4930 100644 (file)
@@ -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>
index 9936a3883b64ebf7628769c433ebbdf7b590cf01..3015effca6e1229bd57fbaca6b5606d5990d695f 100644 (file)
@@ -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\" ".
index 274f9bb9f7c64ceff764ba230b5adf0aff59348e..72ca3f02b37e9d005c6038902e8684b1f3ec5303 100644 (file)
@@ -607,7 +607,7 @@ function quiz_get_question_review($quiz, $question) {
     $strpreview = get_string('previewquestion', 'quiz');
     $context = $quiz->id ? '&amp;contextquiz='.$quiz->id : '';
     $quiz_id = $quiz->id ? '&amp;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>";
 }
index 74df0efaa5ecd331c41d4d55afd51cd1f7369e7f..8f2fe2c82871d6868bca5f4b7365c448f913cf48 100644 (file)
@@ -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>';
         }
index a093a3c15f9932f64e9fd9a449726f0be23b7670..a793f0dd2671d14897fe6c4048cc1d5d9089dab0 100644 (file)
@@ -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";
index a4bf98ffea6e991f69934e44fd6d5d968735f082..25f2c9f34183841b1e0286e3df02d3683b010700 100644 (file)
@@ -269,8 +269,8 @@ class quiz_report extends quiz_default_report {
         }
 
         // grade all and "back" links
-        $links = "<center><a href=\"report.php?mode=grading&amp;action=grade&amp;q=$quiz->id&amp;questionid=$question->id&amp;gradeall=1\">".get_string('gradeall', 'quiz').'</a> | '.
-                "<a href=\"report.php?mode=grading&amp;q=$quiz->id&amp;action=viewquestions\">".get_string('backtoquestionlist', 'quiz').'</a></center>'.
+        $links = "<div class=\"boxaligncenter\"><a href=\"report.php?mode=grading&amp;action=grade&amp;q=$quiz->id&amp;questionid=$question->id&amp;gradeall=1\">".get_string('gradeall', 'quiz').'</a> | '.
+                "<a href=\"report.php?mode=grading&amp;q=$quiz->id&amp;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) {
index 777db51f7f3ff68287068216dffb5862ddc248aa..3dd0de415ea6053857dca68eeff68993e3d196da 100644 (file)
@@ -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 '&nbsp;&nbsp;';
                     $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";
index 01a415ef2b3f4ba6427f66fba9f746566e3b9820..5943921a3424e4239cb8b962df17710c4dea5206 100644 (file)
@@ -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();
         }
index c27842eaec97205209097e8663822261002c6d14..69e824f61c67152e9e527c330e0a473256c23f36 100644 (file)
         $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?'&amp;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.'&amp;');
-        echo '<center><a href="review.php?attempt='.$attempt->id.'&amp;showall=true">';
+        echo '<div class="controls"><a href="review.php?attempt='.$attempt->id.'&amp;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
index 300f5cb10b7858697e53cd9a19610c6b202cbef9..0ad7248a6337bf88a36acc96884f9da7d5020f43 100644 (file)
             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.
@@ -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
             }
index 8caef30472b328542354c34fa47175371af62a5c..68e52476e98174ad804e9f7e509ef8b24bffbe91 100644 (file)
@@ -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;
index d811a5a855456a22058cdc591a235df374adae6b..a4c3a847afc809a7fddec663df9e94aaed28d96a 100644 (file)
@@ -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');
index da9ab4b00df23bd16f2cb3b26be906eb6599fb9d..7fd276a3ad16115971e28ec90f18e346f0c09294 100644 (file)
@@ -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&amp;quizid=$quizid','$strpreview', " .
+        echo "<a title=\"$strpreview\" href=\"javascript:void();\" onclick=\"openpopup('/question/preview.php?id=$question->id&amp;quizid=$quizid','$strpreview', " .
                 QUESTION_PREVIEW_POPUP_OPTIONS . ", false)\"><img
                 src=\"$CFG->pixpath/t/preview.gif\" alt=\"$strpreview\" /></a>&nbsp;";
         
@@ -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";
 }
 
-?>
+?>
\ No newline at end of file
index e4d3ca03789bfde0466b713c028899ea471c024d..e53c088a901f28d9052dae2e2ec22e2156a353f9 100644 (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();
 
index e78f9775df5284fd18003838622933b1c44c2360..5c974a09aeec3990c53516914bd0ef75bf8117a1 100644 (file)
@@ -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;
     }
index e47a4da724aca0927ef584d887969383e23b108f..cd0f011e46b82dcd1fc0e6b5d1e167f13bd6e394 100644 (file)
@@ -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;
index 2416f394af4934fb838bc3e7b94e0018e7a1ffd6..59aa6ddbdb1f5b19d6e96a3799c1e1f34c79ac24 100755 (executable)
@@ -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);
index 9f20241f5bca32506a41f4cd2325b1c8ce3c967a..3e0601e19547af5e7aa5f478da75006cc1ac8e8b 100644 (file)
     ?>
 
     <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>&nbsp;</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>&nbsp;</td>
-                <td><?php  button_to_popup_window ("/files/index.php?id={$course->id}&amp;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>&nbsp;</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>&nbsp;</td>
+                    <td><?php  button_to_popup_window ("/files/index.php?id={$course->id}&amp;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
index 1b87bfe4b7090bcc26f5f9532ede686795404ae2..0507b180753ed9d900f124bb9f7c2c1e6e730609 100644 (file)
@@ -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[]" '
index d750d5cdbff145e7c96ddaba9f86c99814bb66cf..76f31d23a1404865fb639acc3a0f00487a26aba1 100644 (file)
 // 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 );
     }
index 40ab32ef08c1c661fde3678c6b23609dbe0ac5a6..e8d31ee6733aa350f6a8026788197f5fb2b92e46 100644 (file)
@@ -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>
 
index 9f022e51d2ad62d4165fe047a2a46b02e230076f..7e348a21ae1aac871da15630e8261338a38c7136 100644 (file)
@@ -1,5 +1,5 @@
 <form id="theform" method="post" action="question.php">
-<center>
+<div class="boxaligncenter">
 <table cellpadding="5">
 
   <tr valign="top">
index fde1610c04b62d781d219270da410cd78766280a..9c1cac82feafcee6b655431f22d5de34f4144ee0 100644 (file)
@@ -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>
index a65a8292768a016cdc217bc1b988091355309f2c..d3c5f51238c773fa332d2968f5d1ed22c0381821 100644 (file)
 /// 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