From 41ee645c29e9d4cbee10795703a140b39f09d0ae Mon Sep 17 00:00:00 2001 From: moodler Date: Wed, 21 Jul 2004 13:02:53 +0000 Subject: [PATCH] Removing some old files --- mod/quiz/description.html | 80 ------------ mod/quiz/editmultianswer.php | 236 ----------------------------------- mod/quiz/match.html | 104 --------------- mod/quiz/multichoice.html | 124 ------------------ mod/quiz/numerical.html | 141 --------------------- mod/quiz/random.html | 30 ----- mod/quiz/randomsamatch.html | 98 --------------- mod/quiz/shortanswer.html | 126 ------------------- mod/quiz/truefalse.html | 103 --------------- 9 files changed, 1042 deletions(-) delete mode 100644 mod/quiz/description.html delete mode 100644 mod/quiz/editmultianswer.php delete mode 100644 mod/quiz/match.html delete mode 100644 mod/quiz/multichoice.html delete mode 100644 mod/quiz/numerical.html delete mode 100644 mod/quiz/random.html delete mode 100644 mod/quiz/randomsamatch.html delete mode 100644 mod/quiz/shortanswer.html delete mode 100644 mod/quiz/truefalse.html diff --git a/mod/quiz/description.html b/mod/quiz/description.html deleted file mode 100644 index 1c7552b494..0000000000 --- a/mod/quiz/description.html +++ /dev/null @@ -1,80 +0,0 @@ -
action="question.php"> -
- - - - - - - - - - - - - - - - - -

:

- id, true, true, $question->category); ?> -

:

- - -

:

-
-
-
-

- -

-
- "; - } - - print_textarea($usehtmleditor, 15, 60, 630, 300, "questiontext", $question->questiontext); - - if ($usehtmleditor) { /// Trying this out for a while - echo ''; - } else { - echo "
"; - print_string("formattexttype"); - echo ": "; - if (!isset($question->questiontextformat)) { - $question->questiontextformat = FORMAT_MOODLE; - } - choose_from_menu(format_text_menu(), "questiontextformat", $question->questiontextformat, ""); - helpbutton("textformat", get_string("helpformatting")); - echo "
"; - } - ?> -

:

- image", get_string("none"),"",""); - } - ?> -
- - - - -"> - -
-
- diff --git a/mod/quiz/editmultianswer.php b/mod/quiz/editmultianswer.php deleted file mode 100644 index c78d483fb5..0000000000 --- a/mod/quiz/editmultianswer.php +++ /dev/null @@ -1,236 +0,0 @@ -category)) { - error("This question doesn't belong to a valid category!"); - } - if (! $course = get_record("course", "id", $category->course)) { - error("This question category doesn't belong to a valid course!"); - } - require_login($course->id); - if (!isteacher($course->id)) { - error("You can't modify these questions!"); - } - - $question = extractMultiAnswerQuestion($form->questiontext); - $question->id = $form->id; - $question->qtype = $form->qtype; - $question->name = $form->name; - $question->category = $form->category; - - if (empty($form->image)) { - $question->image = ""; - } else { - $question->image = $form->image; - } - - // Formcheck - $err = array(); - if (empty($question->name)) { - $err["name"] = get_string("missingname", "quiz"); - } - if (empty($question->questiontext)) { - $err["questiontext"] = get_string("missingquestiontext", "quiz"); - } - if ($err) { // Formcheck failed - $category = $form->category; - notify(get_string("someerrorswerefound")); - unset($_POST); - require('question.php'); - exit; - - } else { - - if (!empty($question->id)) { // Question already exists - if (!update_record("quiz_questions", $question)) { - error("Could not update question!"); - } - } else { // Question is a new one - $question->stamp = make_unique_id_code(); // Set the unique code (not to be changed) - if (!$question->id = insert_record("quiz_questions", $question)) { - error("Could not insert new question!"); - } - } - - // Now to save all the answers and type-specific options - $result = quiz_save_question_options($question); - - if (!empty($result->error)) { - error($result->error); - } - - if (!empty($result->notice)) { - notice_yesno($result->notice, "question.php?id=$question->id", "edit.php"); - print_footer($course); - exit; - } - - redirect("edit.php"); - } - - } else if ($question->questiontext and $question->id) { - $answers = quiz_get_answers($question); - - foreach ($answers as $multianswer) { - $parsableanswerdef = '{' . $multianswer->norm . ':'; - switch ($multianswer->answertype) { - case MULTICHOICE: - $parsableanswerdef .= 'MULTICHOICE:'; - break; - case SHORTANSWER: - $parsableanswerdef .= 'SHORTANSWER:'; - break; - case NUMERICAL: - $parsableanswerdef .= 'NUMERICAL:'; - break; - default: - error("answertype $multianswer->answertype not recognized"); - } - $separator= ''; - foreach ($multianswer->subanswers as $subanswer) { - $parsableanswerdef .= $separator - . '%' . round(100*$subanswer->fraction) . '%'; - $parsableanswerdef .= $subanswer->answer; - if (isset($subanswer->min) && isset($subanswer->max) - and $subanswer->min || $subanswer->max) { - // Special for numerical answers: - $errormargin = $subanswer->answer - $subanswer->min; - $parsableanswerdef .= ":$errormargin"; - } - if ($subanswer->feedback) { - $parsableanswerdef .= "#$subanswer->feedback"; - } - $separator = '~'; - } - $parsableanswerdef .= '}'; - $question->questiontext = str_replace - ("{#$multianswer->positionkey}", $parsableanswerdef, - $question->questiontext); - } - } - - -?> - -
action="editmultianswer.php"> - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

:

- - id, true, true, $question->category ); ?> - -

:

- - - - - -

:

- - "; - - } - - print_textarea($usehtmleditor, 15, 60, 630, 300, "questiontext", $question->questiontext); - - if ($usehtmleditor) { - - helpbutton("richtext", get_string("helprichtext"), "moodle"); - - } else { - - helpbutton("text", get_string("helptext"), "moodle"); - - } - - ?> - -

:

- - image", get_string("none"),"",""); - - } - - ?> - -
- - - - - - - - - -"> - - - -
- -
- - - diff --git a/mod/quiz/match.html b/mod/quiz/match.html deleted file mode 100644 index a9e9aeaf6c..0000000000 --- a/mod/quiz/match.html +++ /dev/null @@ -1,104 +0,0 @@ -
action="question.php"> -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

:

- id, true, true, $question->category); ?> -

:

- - -

:

-
-
-
-

- -

-
- "; - } - - print_textarea($usehtmleditor, 15, 60, 630, 300, "questiontext", $question->questiontext); - - if ($usehtmleditor) { /// Trying this out for a while - echo ''; - } else { - echo "
"; - print_string("formattexttype"); - echo ": "; - if (!isset($question->questiontextformat)) { - $question->questiontextformat = FORMAT_MOODLE; - } - choose_from_menu(format_text_menu(), "questiontextformat", $question->questiontextformat, ""); - helpbutton("textformat", get_string("helpformatting")); - echo "
"; - } - ?> -

:

- image", get_string("none"),"",""); - } - ?> -

:

-

:

- -
-    - -
- - - -"> - -
-
- diff --git a/mod/quiz/multichoice.html b/mod/quiz/multichoice.html deleted file mode 100644 index 5576efcf0e..0000000000 --- a/mod/quiz/multichoice.html +++ /dev/null @@ -1,124 +0,0 @@ -
action="question.php"> -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

:

- id, true, true, $question->category); ?> -

:

- - -

:

-
-
-
-

- -

-
- "; - } - - print_textarea($usehtmleditor, 15, 60, 630, 300, "questiontext", $question->questiontext); - - if ($usehtmleditor) { /// Trying this out for a while - echo ''; - } else { - echo "
"; - print_string("formattexttype"); - echo ": "; - if (!isset($question->questiontextformat)) { - $question->questiontextformat = FORMAT_MOODLE; - } - choose_from_menu(format_text_menu(), "questiontextformat", $question->questiontextformat, ""); - helpbutton("textformat", get_string("helpformatting")); - echo "
"; - } - ?> -

:

- image", get_string("none"),"",""); - } - ?> -

:

- single", ""); - unset($menu); - ?> -

:

-

:

-    - fraction, ""); ?> -
-

:

- -
 
- - - -"> - -
-
- diff --git a/mod/quiz/numerical.html b/mod/quiz/numerical.html deleted file mode 100644 index a5c56d1361..0000000000 --- a/mod/quiz/numerical.html +++ /dev/null @@ -1,141 +0,0 @@ -
action="question.php"> -
- - - - - - - - - - - - - - - - - - - - - min) && is_numeric($answers[0]->answer)) { - $acceptederror = (float)($answers[0]->answer) - - (float)($answers[0]->min); - } else { - $acceptederror = ""; - } - ?> - - - - - - - - - - -

:

- id, true, true, $question->category); ?> -

:

- - -

:

-
-
-
-

- -

-
- "; - } - - print_textarea($usehtmleditor, 15, 60, 630, 300, "questiontext", $question->questiontext); - - if ($usehtmleditor) { /// Trying this out for a while - echo ''; - } else { - echo "
"; - print_string("formattexttype"); - echo ": "; - if (!isset($question->questiontextformat)) { - $question->questiontextformat = FORMAT_MOODLE; - } - choose_from_menu(format_text_menu(), "questiontextformat", $question->questiontextformat, ""); - helpbutton("textformat", get_string("helpformatting")); - echo "
"; - } - ?> -

:

- image", get_string("none"),"",""); - } - ?> -

:

-    -

:

- ± - - - - -
-

:

- -
- - - -"> -
-
- - - diff --git a/mod/quiz/random.html b/mod/quiz/random.html deleted file mode 100644 index 06f585f242..0000000000 --- a/mod/quiz/random.html +++ /dev/null @@ -1,30 +0,0 @@ -
-
- - - - - - - - - - -

:

- id, true, true, $question->category); ?> -

:

- name)) { - $question->name = get_string("random", "quiz"); - } ?> - - -
- - - - - -"> -
-
- diff --git a/mod/quiz/randomsamatch.html b/mod/quiz/randomsamatch.html deleted file mode 100644 index e763e604cf..0000000000 --- a/mod/quiz/randomsamatch.html +++ /dev/null @@ -1,98 +0,0 @@ -
action="question.php"> -
- - - - - - - - - - - -
-
-
-

- -

- - - - - - - -

:

- category]; ?> - category"; ?>"> -

:

- name)) { - $question->name = get_string("randomsamatch", "quiz"); - } - ?> - - -

:

- "; - } - - if (empty($question->questiontext)) { - $question->questiontext = get_string("randomsamatchintro", "quiz"); - } - print_textarea($usehtmleditor, 15, 60, 630, 300, "questiontext", $question->questiontext); - - if ($usehtmleditor) { /// Trying this out for a while - echo ''; - } else { - echo "
"; - print_string("formattexttype"); - echo ": "; - if (!$question->questiontextformat) { - $question->questiontextformat = FORMAT_MOODLE; - } - choose_from_menu(format_text_menu(), "questiontextformat", $question->questiontextformat, ""); - helpbutton("textformat", get_string("helpformatting")); - echo "
"; - } - ?> -

:

- choose", ""); - unset($menu); - ?> -
- - - -"> - -
-
- diff --git a/mod/quiz/shortanswer.html b/mod/quiz/shortanswer.html deleted file mode 100644 index 669ccd36e5..0000000000 --- a/mod/quiz/shortanswer.html +++ /dev/null @@ -1,126 +0,0 @@ -
action="question.php"> -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

:

- id, true, true, $question->category); ?> -

:

- - -

:

-
-
-
-

- -

-
- "; - } - - print_textarea($usehtmleditor, 15, 60, 630, 300, "questiontext", $question->questiontext); - - if ($usehtmleditor) { /// Trying this out for a while - echo ''; - } else { - echo "
"; - print_string("formattexttype"); - echo ": "; - if (!isset($question->questiontextformat)) { - $question->questiontextformat = FORMAT_MOODLE; - } - choose_from_menu(format_text_menu(), "questiontextformat", $question->questiontextformat, ""); - helpbutton("textformat", get_string("helpformatting")); - echo "
"; - } - ?> -

:

- image", get_string("none"),"",""); - } - ?> -

:

- usecase", ""); - ?> -

:

-

-

:

-    - fraction,""); ?> -
-

:

- -
 
- - - -"> - -
-
- diff --git a/mod/quiz/truefalse.html b/mod/quiz/truefalse.html deleted file mode 100644 index ed56dcd261..0000000000 --- a/mod/quiz/truefalse.html +++ /dev/null @@ -1,103 +0,0 @@ -
action="question.php"> -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

:

- id, true, true, $question->category); - ?> -

:

- - -

:

-
-
-
-

- -

-
- "; - } - - print_textarea($usehtmleditor, 15, 60, 630, 300, "questiontext", $question->questiontext); - - if ($usehtmleditor) { /// Trying this out for a while - echo ''; - } else { - echo "
"; - print_string("formattexttype"); - echo ": "; - if (!isset($question->questiontextformat)) { - $question->questiontextformat = FORMAT_MOODLE; - } - choose_from_menu(format_text_menu(), "questiontextformat", $question->questiontextformat, ""); - helpbutton("textformat", get_string("helpformatting")); - echo "
"; - } - ?> -

:

- image", get_string("none"),"",""); - } - ?> -

:

- answer", ""); ?> -
-

():

- -

():

- -
- - - -"> - -
-
- -- 2.39.5