]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-10661 - another bloody invisiblefieldset bug. Merged from MOODLE_18_STABLE.
authortjhunt <tjhunt>
Mon, 30 Jul 2007 22:14:32 +0000 (22:14 +0000)
committertjhunt <tjhunt>
Mon, 30 Jul 2007 22:14:32 +0000 (22:14 +0000)
question/category_class.php

index 772d3c27e62c09e7886a85c25f6e3f97da00755c..d6a9864e1d7fd2517b038e8b9c2cab2517dcf394 100644 (file)
@@ -279,26 +279,16 @@ class question_category_object {
 
     function edit_single_category($categoryid) {
     /// Interface for adding a new category
-        global $USER, $COURSE;
+        global $CFG, $USER, $COURSE;
 
         /// Interface for editing existing categories
         if ($category = get_record("question_categories", "id", $categoryid)) {
-            echo '<h2 align="center">';
-            echo $this->str->edit;
-            helpbutton("categories_edit", $this->str->editcategory, "quiz");
-            echo '</h2>';
-            echo '<table width="100%"><tr><td>';
+            print_heading_with_help($this->str->edit, 'categories_edit', 'quiz');
             $this->output_edit_single_table($category);
-            echo '</td></tr></table>';
-            //cancel button
-            echo '<p><div align="center"><form action="category.php" method="get">
-                <div>';
-            echo $this->pageurl->hidden_params_out();
-            echo '<input type="hidden" name="sesskey" value="'.$USER->sesskey.'" />
-                <input type="submit" value="' . $this->str->cancel . '" />
-                </div>
-                </form>
-                </div></p>';
+            echo '<div class="centerpara">';
+            print_single_button($CFG->wwwroot . '/question/category.php',
+                    $this->pageurl->params, $this->str->cancel);
+            echo '</div>';
             print_footer($COURSE);
             exit;
         } else {
@@ -355,8 +345,8 @@ 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 '<fieldset class="invisiblefieldset" style="display: block;">';
+        echo '<input type="hidden" name="sesskey" value="' . $USER->sesskey . '" />';
         echo $this->pageurl->hidden_params_out();
         echo '<input type="hidden" name="updateid" value="' . $category->id . '" />';
         print_table($edittable);