mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
removing more redundant files after qtype form formslib migration
This commit is contained in:
parent
c6fc998899
commit
490d89e591
@ -1,37 +0,0 @@
|
||||
<form id="theform" method="post" action="question.php">
|
||||
<center>
|
||||
<table cellpadding="5">
|
||||
|
||||
<tr valign="top">
|
||||
<td align="right"><b><?php print_string("category", "quiz") ?>:</b></td>
|
||||
<td align="left">
|
||||
<?php question_category_select_menu($course->id, true, true, $question->category); ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr valign="top">
|
||||
<td align="right"><b><?php print_string("questionname", "quiz") ?>:</b></td>
|
||||
<td align="left">
|
||||
<input type="text" name="name" size="50" value="<?php p($question->name) ?>" alt="<?php print_string("questionname", "quiz") ?>" />
|
||||
<?php if (isset($err["name"])) formerr($err["name"]); ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr valign="top">
|
||||
<td align="right"><b><?php print_string("recurse", "quiz") ?>:</b></td>
|
||||
<td align="left">
|
||||
<?php if (!isset($question->questiontext)) {
|
||||
$question->questiontext = "0";
|
||||
} ?>
|
||||
<input type="hidden" name="questiontext" value="0" />
|
||||
<input type="checkbox" name="questiontext" value="1" <?php echo ($question->questiontext == "1") ? 'checked="checked"' : '' ?> />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<input type="hidden" name="sesskey" value="<?php echo $USER->sesskey; ?>" />
|
||||
<input type="hidden" name="questiontextformat" value="0" />
|
||||
<input type="hidden" name="id" value="<?php p($question->id) ?>" />
|
||||
<input type="hidden" name="qtype" value="<?php p($question->qtype) ?>" />
|
||||
<input type="submit" value="<?php print_string("savechanges") ?>" />
|
||||
</center>
|
||||
</form>
|
@ -1,9 +0,0 @@
|
||||
<?php // $Id$
|
||||
|
||||
if (empty($question->name)) {
|
||||
$question->name = get_string("random", "quiz");
|
||||
}
|
||||
|
||||
print_heading_with_help(get_string("editingrandom", "quiz"), "random", "quiz");
|
||||
require("$CFG->dirroot/question/type/random/editquestion.html");
|
||||
?>
|
@ -1,61 +0,0 @@
|
||||
<?php
|
||||
$QTYPES[$question->qtype]->print_question_form_start($question, array(), $course, $usehtmleditor);
|
||||
?>
|
||||
<tr valign="top">
|
||||
<td align="right"><b><?php print_string("casesensitive", "quiz") ?>:</b></td>
|
||||
<td align="left">
|
||||
<?php
|
||||
unset($menu);
|
||||
$menu[0] = get_string("caseno", "quiz");
|
||||
$menu[1] = get_string("caseyes", "quiz");
|
||||
choose_from_menu($menu, "usecase", "$options->usecase", "");
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td align="right"><b><?php print_string("correctanswers", "quiz") ?></b>:</td>
|
||||
<td align="left">
|
||||
<div style="width: 35em">
|
||||
<?php print_string("filloutoneanswer", "quiz") ?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
for ($i=1; $i<=count($answers); $i++) {
|
||||
?>
|
||||
<tr valign="top">
|
||||
<td align="right"><b><?php echo get_string("answer", "quiz")." $i"; ?>:</b></td>
|
||||
<td align="left">
|
||||
<?php
|
||||
if ($answers[$i-1]->answer === '') {
|
||||
$answertext = '';
|
||||
$fractionval = 0;
|
||||
$feedbacktext = '';
|
||||
} else {
|
||||
$answertext = $answers[$i-1]->answer;
|
||||
$fractionval = $answers[$i-1]->fraction;
|
||||
$feedbacktext = $answers[$i-1]->feedback;
|
||||
}
|
||||
?>
|
||||
<input type="text" name="answer[]" size="50" value="<?php p($answertext) ?>" alt="<?php echo get_string("answer", "quiz")." $i"; ?>" />
|
||||
<?php print_string("grade");
|
||||
echo ": ";
|
||||
choose_from_menu($gradeoptions, "fraction[]", $fractionval,""); ?>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td align="right"><b><?php print_string("feedback", "quiz") ?>:</b></td>
|
||||
<td align="left">
|
||||
<textarea name="feedback[]" rows="2" cols="50"><?php p($feedbacktext) ?></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td colspan="2"> </td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
|
||||
$QTYPES[$question->qtype]->print_replacement_options($question, $course, $contextquiz);
|
||||
$QTYPES[$question->qtype]->print_question_form_end($question);
|
||||
?>
|
@ -1,29 +0,0 @@
|
||||
<?php // $Id$
|
||||
if (!empty($question->id)) {
|
||||
$options = get_record("question_shortanswer", "question", $question->id);
|
||||
} else {
|
||||
$options->usecase = 0;
|
||||
}
|
||||
if (!empty($options->answers)) {
|
||||
$answersraw = get_records_list('question_answers', 'id', $options->answers, 'id ASC');
|
||||
}
|
||||
|
||||
$answers = array();
|
||||
if (!empty($answersraw)) {
|
||||
foreach ($answersraw as $answer) {
|
||||
$answers[] = $answer; // insert answers into slots
|
||||
}
|
||||
}
|
||||
|
||||
$emptyanswer->answer = '';
|
||||
$i = count($answers);
|
||||
$limit = QUESTION_NUMANS;
|
||||
$limit = $limit <= $i ? $i+1 : $limit;
|
||||
for (; $i < $limit; $i++) {
|
||||
$answers[] = $emptyanswer; // Make answer slots, default as blank
|
||||
}
|
||||
|
||||
print_heading_with_help(get_string("editingshortanswer", "quiz"), "shortanswer", "quiz");
|
||||
require("$CFG->dirroot/question/type/shortanswer/editquestion.html");
|
||||
|
||||
?>
|
Loading…
x
Reference in New Issue
Block a user