This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
en:create:points [26.01.2015 08:38] – [Multiple Choice Response Pattern] alexander.ritter | en:create:points [30.11.2015 11:13] – [Correct and Incorrect Answers] admin | ||
---|---|---|---|
Line 18: | Line 18: | ||
The simplest way of keeping score is for a quiz or a knowledge test. These have a range of selection questions and one of the options is correct for each one. | The simplest way of keeping score is for a quiz or a knowledge test. These have a range of selection questions and one of the options is correct for each one. | ||
- | The following PHP code initially defines which questions will be analyzed | + | The following PHP code initially defines which questions will be evaluated |
- | Following this, all questions are checked in a FOR loop -- it is significantly more compact than having a dozen IF constructions. | + | Following this, all questions are checked in a FOR loop -- this is significantly more compact than having a dozen IF constructions. |
Line 27: | Line 27: | ||
// Define questions and the correct answers | // Define questions and the correct answers | ||
$questions = array( | $questions = array( | ||
- | ' | + | ' |
- | ' | + | ' |
- | ' | + | ' |
- | ' | + | ' |
- | ' | + | ' |
- | // and so on. | + | // and so on |
); | ); | ||
Line 151: | Line 151: | ||
- | **Tip:** Define inverted items immediately | + | **Tip:** Define inverted items immediately |
Line 196: | Line 196: | ||
===== Multiple Choice Response Pattern ===== | ===== Multiple Choice Response Pattern ===== | ||
- | Sometimes multiple conditions have to combined when checking an answer. For example, | + | Sometimes multiple conditions have to combined when checking an answer. For example, |