diff --git a/question/category_class.php b/question/category_class.php index 772d3c27e62..d6a9864e1d7 100644 --- a/question/category_class.php +++ b/question/category_class.php @@ -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 '

'; - echo $this->str->edit; - helpbutton("categories_edit", $this->str->editcategory, "quiz"); - echo '

'; - echo '
'; + print_heading_with_help($this->str->edit, 'categories_edit', 'quiz'); $this->output_edit_single_table($category); - echo '
'; - //cancel button - echo '

-
'; - echo $this->pageurl->hidden_params_out(); - echo ' - -
-
-

'; + echo '
'; + print_single_button($CFG->wwwroot . '/question/category.php', + $this->pageurl->params, $this->str->cancel); + echo '
'; print_footer($COURSE); exit; } else { @@ -355,8 +345,8 @@ class question_category_object { // wrap the table in a form and output it echo '

'; - echo '
'; - echo "sesskey\" />"; + echo '
'; + echo ''; echo $this->pageurl->hidden_params_out(); echo ''; print_table($edittable);