mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
Added help pages to quiz module.
A few little cleanups, such as trim() on shortanswers
This commit is contained in:
parent
377f3c9ee4
commit
cd63d77e08
6
lang/en/help/quiz/attempts.html
Normal file
6
lang/en/help/quiz/attempts.html
Normal file
@ -0,0 +1,6 @@
|
||||
<P ALIGN=CENTER><B>Quiz attempts</B></P>
|
||||
|
||||
<P>Students may be allowed to have multiple attempts at a quiz.
|
||||
|
||||
<P>This can help make the process of taking the quiz more of
|
||||
an educational activity rather than simply an assessment.
|
17
lang/en/help/quiz/categories.html
Normal file
17
lang/en/help/quiz/categories.html
Normal file
@ -0,0 +1,17 @@
|
||||
<P ALIGN=CENTER><B>Question categories</B></P>
|
||||
|
||||
<P>Rather than keeping all your questions in one big list,
|
||||
you can create categories to keep them in.
|
||||
|
||||
<P>Each category consists of a name and a short description.
|
||||
|
||||
<P>Each category can also be "published", which means
|
||||
that the category (and all questions in it) will be
|
||||
available to all courses on this server, so that
|
||||
other courses can use your questions in their quizzes.
|
||||
|
||||
<P>Categories can also be created or deleted at will.
|
||||
However, if you try to delete a category containing
|
||||
questions, then you will be asked to specify another
|
||||
category to move them to.
|
||||
|
6
lang/en/help/quiz/correctanswers.html
Normal file
6
lang/en/help/quiz/correctanswers.html
Normal file
@ -0,0 +1,6 @@
|
||||
<P ALIGN=CENTER><B>Show correct answers</B></P>
|
||||
|
||||
<P>If you enable correct answers, then the
|
||||
feedback will show also show the correct answer
|
||||
for each question (highlighted in a bright colour).
|
||||
</P>
|
5
lang/en/help/quiz/feedback.html
Normal file
5
lang/en/help/quiz/feedback.html
Normal file
@ -0,0 +1,5 @@
|
||||
<P ALIGN=CENTER><B>Feedback</B></P>
|
||||
|
||||
<P>If you enable quiz feedback, then students will receive
|
||||
question feedback on every answer (right or wrong).</P>
|
||||
|
25
lang/en/help/quiz/grademethod.html
Normal file
25
lang/en/help/quiz/grademethod.html
Normal file
@ -0,0 +1,25 @@
|
||||
<P ALIGN=CENTER><B>Grading method</B></P>
|
||||
|
||||
<P>When multiple attempts are allowed, there are different ways
|
||||
you can use the grades to calculate the student's final
|
||||
grade for the quiz.
|
||||
|
||||
<P><B>Highest grade</B><P>
|
||||
<UL>
|
||||
<P>The final grade is the highest (best) grade in any attempt.
|
||||
</UL>
|
||||
|
||||
<P><B>Average grade</B><P>
|
||||
<UL>
|
||||
<P>The final grade is the average (simple mean) grade of all attempts.
|
||||
</UL>
|
||||
|
||||
<P><B>First grade</B><P>
|
||||
<UL>
|
||||
<P>The final grade is the grade gained on the first attempt (other attempts are ignored).
|
||||
</UL>
|
||||
|
||||
<P><B>Last grade</B><P>
|
||||
<UL>
|
||||
<P>The final grade is the grade gained on the most recent attempt only.
|
||||
</UL>
|
11
lang/en/help/quiz/maxgrade.html
Normal file
11
lang/en/help/quiz/maxgrade.html
Normal file
@ -0,0 +1,11 @@
|
||||
<P ALIGN=CENTER><B>Maximum grade</B></P>
|
||||
|
||||
<P>The maximum grade you set for a quiz is what all grades
|
||||
are scaled to.
|
||||
|
||||
<P>For example, you might set the max grade to 20, because the
|
||||
quiz is worth 20% of the whole course.
|
||||
|
||||
<P>Even though you might have 10 questions in your quiz
|
||||
worth a total of 50 marks, all grades out of 50 will be
|
||||
"scaled down" to the quiz max grade of 20.
|
19
lang/en/help/quiz/multichoice.html
Normal file
19
lang/en/help/quiz/multichoice.html
Normal file
@ -0,0 +1,19 @@
|
||||
<P ALIGN=CENTER><B>Multiple Choice questions</B></P>
|
||||
|
||||
<P>In response to a question (that may include a image) the respondent
|
||||
chooses from multiple answers. There are two types of multiple choice
|
||||
questions - single answer and multiple answer.
|
||||
|
||||
<P>Single-answer questions allow one and only one answer to be chosen.
|
||||
Generally all the grades for such a question should be positive.
|
||||
|
||||
<P>Multiple-answer questions allow one or more answers to be chosen - each answer
|
||||
may carry a positive or negative grade, so that choosing ALL the options
|
||||
will not necessarily result in good grade. If the total grade is negative
|
||||
then the total grade for this question will be zero. Careful, it is
|
||||
possible to create questions that have scores greater than 100%.
|
||||
|
||||
<P>Finally, each answer (right or wrong) should include feedback - this feedback
|
||||
will be shown to the respondent next to each of their answers (if the quiz
|
||||
itself is configured to show feedback).
|
||||
</P>
|
37
lang/en/help/quiz/questiontypes.html
Normal file
37
lang/en/help/quiz/questiontypes.html
Normal file
@ -0,0 +1,37 @@
|
||||
<P ALIGN=CENTER><B>Creating a new question</B></P>
|
||||
|
||||
<P>You can add a variety of different types of questions to a category:</P>
|
||||
|
||||
<P><B>Multiple Choice</B></P>
|
||||
<UL>
|
||||
<P>In response to a question (that may include a image) the respondent
|
||||
chooses from multiple answers. There are two types of multiple choice
|
||||
questions - single answer and multiple answer.
|
||||
<P>More info: <? helpbutton("multichoice", "", "quiz") ?></P>
|
||||
</UL>
|
||||
|
||||
<P><B>Short Answer</B></P>
|
||||
<UL>
|
||||
<P>In response to a question (that may include a image), the respondent
|
||||
types a word or phrase. There may several possible correct answers,
|
||||
with different grades. Answers may or may not be sensitive to case.
|
||||
</P>
|
||||
<P>More info: <? helpbutton("shortanswer", "", "quiz") ?></P>
|
||||
</UL>
|
||||
|
||||
<P><B>True/False</B></P>
|
||||
<UL>
|
||||
<P>In response to a question (that may include a image), the respondent
|
||||
selects from two options: True or False.
|
||||
</P>
|
||||
<P>More info: <? helpbutton("truefalse", "", "quiz") ?></P>
|
||||
</UL>
|
||||
|
||||
<P><B>Random</B></P>
|
||||
<UL>
|
||||
<P>(Not yet implemented) Allows you to select a number of other questions from
|
||||
which one gets randomly selected each time a student attempts the quiz.
|
||||
</P>
|
||||
<P>More info: <? helpbutton("random", "", "quiz") ?></P>
|
||||
</UL>
|
||||
|
3
lang/en/help/quiz/random.html
Normal file
3
lang/en/help/quiz/random.html
Normal file
@ -0,0 +1,3 @@
|
||||
<P ALIGN=CENTER><B>Random question</B></P>
|
||||
|
||||
|
10
lang/en/help/quiz/shortanswer.html
Normal file
10
lang/en/help/quiz/shortanswer.html
Normal file
@ -0,0 +1,10 @@
|
||||
<P ALIGN=CENTER><B>Short Answer questions</B></P>
|
||||
|
||||
<P>In response to a question (that may include a image) the respondent
|
||||
types a word or short phrase.
|
||||
|
||||
<P>There may be several possible correct answers, each with a different
|
||||
grade. If the "Case sensitive" option is selected, then you can
|
||||
have different scores for "Word" or "word".
|
||||
|
||||
<P>Answers are compared exactly, so be careful with your spelling!
|
5
lang/en/help/quiz/timeopen.html
Normal file
5
lang/en/help/quiz/timeopen.html
Normal file
@ -0,0 +1,5 @@
|
||||
<P ALIGN=CENTER><B>Opening and closing the quiz</B></P>
|
||||
|
||||
<P>You can specify times when the quiz is accessible for people to make attempts.
|
||||
|
||||
<P>Before the opening time, and after the closing time, the quiz will be unavailable.
|
11
lang/en/help/quiz/truefalse.html
Normal file
11
lang/en/help/quiz/truefalse.html
Normal file
@ -0,0 +1,11 @@
|
||||
<P ALIGN=CENTER><B>True/False questions</B></P>
|
||||
|
||||
|
||||
<P>In response to a question (that may include a image) the respondent
|
||||
chooses from True or False.
|
||||
|
||||
<P>If feedback is enabled, then the appropriate feedback message is
|
||||
shown to the respondent after answering the quiz. For example,
|
||||
if the correct answer is "False", but they answer "True" (getting
|
||||
it wrong) then the "True" feedback is shown.
|
||||
</P>
|
@ -106,7 +106,7 @@
|
||||
error("Answer received for non-existent question ($key)!");
|
||||
}
|
||||
}
|
||||
$questions[$key]->answer[] = $value; // Store answers in array
|
||||
$questions[$key]->answer[] = trim($value); // Store answers in array (whitespace trimmed)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -81,7 +81,10 @@
|
||||
|
||||
/// Print heading
|
||||
|
||||
print_heading($streditcategories);
|
||||
echo "<P ALIGN=CENTER><FONT SIZE=3>";
|
||||
echo $streditcategories;
|
||||
helpbutton("categories", $strcategories, "quiz");
|
||||
echo "</FONT></P>";
|
||||
|
||||
/// If data submitted, then process and store.
|
||||
|
||||
|
@ -641,6 +641,7 @@ function quiz_print_cat_question_list($categoryid) {
|
||||
choose_from_menu($QUIZ_QUESTION_TYPE, "type", "", "");
|
||||
echo "<INPUT TYPE=hidden NAME=category VALUE=\"$category->id\">";
|
||||
echo "<INPUT TYPE=submit NAME=new VALUE=\"$strcreatenewquestion\">";
|
||||
helpbutton("questiontypes", $strcreatenewquestion, "quiz");
|
||||
echo "</FORM>";
|
||||
echo "</CENTER>";
|
||||
|
||||
@ -937,7 +938,7 @@ function quiz_grade_attempt_results($quiz, $questions) {
|
||||
switch ($question->type) {
|
||||
case SHORTANSWER:
|
||||
if ($question->answer) {
|
||||
$question->answer = $question->answer[0];
|
||||
$question->answer = trim($question->answer[0]);
|
||||
} else {
|
||||
$question->answer = "";
|
||||
}
|
||||
|
@ -28,6 +28,7 @@
|
||||
}
|
||||
print_date_selector("openday", "openmonth", "openyear", $form->timeopen);
|
||||
print_time_selector("openhour", "openminute", $form->timeopen);
|
||||
helpbutton("timeopen", get_string("quizopen","quiz"), "quiz");
|
||||
?>
|
||||
</TD>
|
||||
</TR>
|
||||
@ -40,6 +41,7 @@
|
||||
}
|
||||
print_date_selector("closeday", "closemonth", "closeyear", $form->timeclose);
|
||||
print_time_selector("closehour", "closeminute", $form->timeclose);
|
||||
helpbutton("timeopen", get_string("quizclose","quiz"), "quiz");
|
||||
?>
|
||||
</TD>
|
||||
<TR valign=top>
|
||||
@ -53,6 +55,7 @@
|
||||
$options[$i] = "$i ".strtolower(get_string("attempts", "quiz"));
|
||||
}
|
||||
choose_from_menu($options, "attempts", "$form->attempts", "");
|
||||
helpbutton("attempts", get_string("attemptsallowed","quiz"), "quiz");
|
||||
?>
|
||||
</TD>
|
||||
</TR>
|
||||
@ -66,6 +69,7 @@
|
||||
$options[3] = get_string("attemptfirst", "quiz");
|
||||
$options[4] = get_string("attemptlast", "quiz");
|
||||
choose_from_menu($QUIZ_GRADE_METHOD, "grademethod", "$form->grademethod", "");
|
||||
helpbutton("grademethod", get_string("grademethod","quiz"), "quiz");
|
||||
?>
|
||||
</TD>
|
||||
</TR>
|
||||
@ -77,6 +81,7 @@
|
||||
$options[0] = get_string("no");
|
||||
$options[1] = get_string("yes");
|
||||
choose_from_menu($options, "feedback", "$form->feedback", "");
|
||||
helpbutton("feedback", get_string("showfeedback","quiz"), "quiz");
|
||||
?>
|
||||
</TD>
|
||||
</TR>
|
||||
@ -88,6 +93,7 @@
|
||||
$options[0] = get_string("no");
|
||||
$options[1] = get_string("yes");
|
||||
choose_from_menu($options, "correctanswers", "$form->correctanswers", "");
|
||||
helpbutton("correctanswers", get_string("showcorrectanswer","quiz"), "quiz");
|
||||
?>
|
||||
</TD>
|
||||
</TR>
|
||||
@ -99,6 +105,7 @@
|
||||
$grades[$i] = $i;
|
||||
}
|
||||
choose_from_menu($grades, "grade", "$form->grade", "");
|
||||
helpbutton("maxgrade", get_string("maximumgrade"), "quiz");
|
||||
?>
|
||||
</TD>
|
||||
</TR>
|
||||
|
@ -248,7 +248,7 @@
|
||||
case SHORTANSWER:
|
||||
$options = get_record("quiz_shortanswer", "question", "$question->id");// OK to fail
|
||||
$answersraw = get_records_list("quiz_answers", "id", "$options->answers");// OK to fail
|
||||
print_heading(get_string("editingshortanswer", "quiz"));
|
||||
print_heading_with_help(get_string("editingshortanswer", "quiz"), "shortanswer", "quiz");
|
||||
if ($answersraw) {
|
||||
foreach ($answersraw as $answer) {
|
||||
$answers[] = $answer; // to renumber index 0,1,2...
|
||||
@ -266,7 +266,7 @@
|
||||
} else {
|
||||
$question->answer = 0;
|
||||
}
|
||||
print_heading(get_string("editingtruefalse", "quiz"));
|
||||
print_heading_with_help(get_string("editingtruefalse", "quiz"), "truefalse", "quiz");
|
||||
require("truefalse.html");
|
||||
break;
|
||||
|
||||
@ -278,13 +278,14 @@
|
||||
$answers[] = $answer; // to renumber index 0,1,2...
|
||||
}
|
||||
}
|
||||
print_heading(get_string("editingmultichoice", "quiz"));
|
||||
print_heading_with_help(get_string("editingmultichoice", "quiz"), "multichoice", "quiz");
|
||||
require("multichoice.html");
|
||||
break;
|
||||
case RANDOM:
|
||||
print_heading("Sorry, random questions are not supported yet");
|
||||
print_continue("edit.php");
|
||||
break;
|
||||
|
||||
case RANDOM:
|
||||
print_heading_with_help(get_string("editingrandom", "quiz"), "random", "quiz");
|
||||
print_continue("edit.php");
|
||||
break;
|
||||
|
||||
default:
|
||||
error("Invalid question type");
|
||||
|
@ -116,6 +116,9 @@
|
||||
|
||||
$users = array();
|
||||
foreach ($attempts as $attempt) {
|
||||
if (!$attempt->timefinish) { // Skip incomplete attempts
|
||||
continue;
|
||||
}
|
||||
if (! $questions = quiz_get_attempt_responses($attempt)) {
|
||||
error("Could not reconstruct quiz results for attempt $attempt->id!");
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user