From: tjhunt Date: Wed, 23 Apr 2008 14:45:45 +0000 (+0000) Subject: Revert bogus error -> print_error changes that were stopping my patch from merging. X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=bfecee473abfa82c64eae28813280b632f2b4b84;p=moodle.git Revert bogus error -> print_error changes that were stopping my patch from merging. --- diff --git a/mod/quiz/edit.php b/mod/quiz/edit.php index 924804a416..e639c06b12 100644 --- a/mod/quiz/edit.php +++ b/mod/quiz/edit.php @@ -107,7 +107,7 @@ // Get the course object and related bits. if (! $course = get_record("course", "id", $quiz->course)) { - print_error("This course doesn't exist"); + error("This course doesn't exist"); } // Log this visit. @@ -139,7 +139,7 @@ // Avoid duplicate page breaks $quiz->questions = str_replace(',0,0', ',0', $quiz->questions); if (!set_field('quiz', 'questions', $quiz->questions, 'id', $quiz->instance)) { - print_error('Could not save question list'); + error('Could not save question list'); } } } @@ -156,7 +156,7 @@ // Avoid duplicate page breaks $quiz->questions = str_replace(',0,0', ',0', $quiz->questions); if (!set_field('quiz', 'questions', $quiz->questions, 'id', $quiz->instance)) { - print_error('Could not save question list'); + error('Could not save question list'); } } } @@ -180,7 +180,7 @@ $randomcount = required_param('randomcount', PARAM_INT); // load category if (! $category = get_record('question_categories', 'id', $categoryid)) { - print_error('Category ID is incorrect'); + error('Category ID is incorrect'); } $catcontext = get_context_instance_by_id($category->contextid); require_capability('moodle/question:useall', $catcontext); @@ -215,7 +215,7 @@ $question->qtype = RANDOM; $question = $QTYPES[RANDOM]->save_question($question, $form, $course); if(!isset($question->id)) { - print_error('Could not insert new random question!'); + error('Could not insert new random question!'); } quiz_add_quiz_question($question->id, $quiz); } @@ -226,12 +226,12 @@ if (isset($_REQUEST['questionsperpage'])) { $quiz->questionsperpage = required_param('questionsperpage', PARAM_INT); if (!set_field('quiz', 'questionsperpage', $quiz->questionsperpage, 'id', $quiz->id)) { - print_error('Could not save number of questions per page'); + error('Could not save number of questions per page'); } } $quiz->questions = quiz_repaginate($quiz->questions, $quiz->questionsperpage); if (!set_field('quiz', 'questions', $quiz->questions, 'id', $quiz->id)) { - print_error('Could not save layout'); + error('Could not save layout'); } } if (isset($_REQUEST['delete']) and confirm_sesskey()) { /// Remove a question from the quiz @@ -278,14 +278,14 @@ $quiz->questions = str_replace(',0,0', ',0', $quiz->questions); } if (!set_field('quiz', 'questions', $quiz->questions, 'id', $quiz->instance)) { - print_error('Could not save question list'); + error('Could not save question list'); } } // If rescaling is required save the new maximum if (isset($_REQUEST['maxgrade'])) { if (!quiz_set_grade(optional_param('maxgrade', 0), $quiz)) { - print_error('Could not set a new maximum grade for the quiz'); + error('Could not set a new maximum grade for the quiz'); } } } @@ -325,7 +325,7 @@ $sumgrades = quiz_print_question_list($quiz, $thispageurl, false, $quiz_showbreaks, $quiz_reordertool); if (!set_field('quiz', 'sumgrades', $sumgrades, 'id', $quiz->instance)) { - print_error('Failed to set sumgrades'); + error('Failed to set sumgrades'); } print_box_end(); @@ -352,7 +352,7 @@ $sumgrades = quiz_print_question_list($quiz, $thispageurl, true, $quiz_showbreaks, $quiz_reordertool); if (!set_field('quiz', 'sumgrades', $sumgrades, 'id', $quiz->instance)) { - print_error('Failed to set sumgrades'); + error('Failed to set sumgrades'); } print_box_end();