<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ru">
	<id>http://wiki.mipt.ru/index.php?action=history&amp;feed=atom&amp;title=Short_answer_analysis</id>
	<title>Short answer analysis - История изменений</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.mipt.ru/index.php?action=history&amp;feed=atom&amp;title=Short_answer_analysis"/>
	<link rel="alternate" type="text/html" href="http://wiki.mipt.ru/index.php?title=Short_answer_analysis&amp;action=history"/>
	<updated>2026-05-06T18:33:10Z</updated>
	<subtitle>История изменений этой страницы в вики</subtitle>
	<generator>MediaWiki 1.42.1</generator>
	<entry>
		<id>http://wiki.mipt.ru/index.php?title=Short_answer_analysis&amp;diff=5429&amp;oldid=prev</id>
		<title>Олег Давидович: 1 версия импортирована</title>
		<link rel="alternate" type="text/html" href="http://wiki.mipt.ru/index.php?title=Short_answer_analysis&amp;diff=5429&amp;oldid=prev"/>
		<updated>2024-10-18T06:45:38Z</updated>

		<summary type="html">&lt;p&gt;1 версия импортирована&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;ru&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Предыдущая версия&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Версия от 06:45, 18 октября 2024&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;ru&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(нет различий)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Олег Давидович</name></author>
	</entry>
	<entry>
		<id>http://wiki.mipt.ru/index.php?title=Short_answer_analysis&amp;diff=5428&amp;oldid=prev</id>
		<title>1&gt;Rezeau: /* Regular Expressions analysis */</title>
		<link rel="alternate" type="text/html" href="http://wiki.mipt.ru/index.php?title=Short_answer_analysis&amp;diff=5428&amp;oldid=prev"/>
		<updated>2024-07-08T08:11:36Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Regular Expressions analysis&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Lesson}}&lt;br /&gt;
In a Lesson, the short answer question type has two methods of anaysis of a student&amp;#039;s answer. This kind of analysis in NOT available for Quiz short answer questions.  In a short answer question the student is expected to answer with one word or a few words. [[Short-Answer question type]] page give more information about this question type.&lt;br /&gt;
&lt;br /&gt;
There are two different &amp;#039;&amp;#039;student answer&amp;#039;&amp;#039; analysis systems available for the Short Answer type of question: the &amp;#039;&amp;#039;&amp;#039;simple system &amp;#039;&amp;#039;&amp;#039;is used by default; the &amp;#039;&amp;#039;&amp;#039;Regular Expressions system&amp;#039;&amp;#039;&amp;#039; is used if it has been installed (it is an optional plugin) and the &amp;quot;Use Regular Expressions&amp;quot; option box has been checked on the Edit Question Page screen.&lt;br /&gt;
&lt;br /&gt;
== Simple analysis ==&lt;br /&gt;
&lt;br /&gt;
In the (default) simple system of analysis, the comparisons ignore the case of the text and the asterisk (*) character can be used in answers as a &amp;quot;wild card&amp;quot; character. The evaluation process goes through the answers in the order they appear on the Edit screen. When a match is found the process stops and that becomes the student&amp;#039;s answer. &lt;br /&gt;
&lt;br /&gt;
The asterisk stands for any number of characters (including no characters at all). For example, the &amp;#039;&amp;#039;expected answer&amp;#039;&amp;#039; &amp;quot;Long*&amp;quot; will match &amp;quot;longer&amp;quot;, &amp;quot;longest&amp;quot; and &amp;quot;long&amp;quot;. Please note, however, that the &amp;#039;&amp;#039;expected answer&amp;#039;&amp;#039; &amp;quot;Long*&amp;quot; will also match &amp;quot;longing&amp;quot;, &amp;quot;longer than yours&amp;quot; and so forth. &lt;br /&gt;
&lt;br /&gt;
If a &amp;quot;wild card&amp;quot; type of student answer analysis is required, it is strongly recommended to use the &amp;#039;&amp;#039;&amp;#039;regular expressions&amp;#039;&amp;#039;&amp;#039; analysis system explained below.&lt;br /&gt;
&lt;br /&gt;
The matching process goes through the &amp;#039;&amp;#039;expected answers&amp;#039;&amp;#039; in the order they appear on the Edit screen. Once a match is found the process stops and the corresponding result (and &amp;#039;&amp;#039;response&amp;#039;&amp;#039; message, if present) is returned. So, if for example the &amp;#039;&amp;#039;expected answers&amp;#039;&amp;#039; are &amp;quot;Longest&amp;quot;, &amp;quot;Long*&amp;quot; and &amp;quot;*&amp;quot; (in that order), the &amp;#039;&amp;#039;student&amp;#039;s answer&amp;#039;&amp;#039; &amp;quot;longer&amp;quot; will match the second &amp;#039;&amp;#039;expected answer&amp;#039;&amp;#039; and, in this case, the third &amp;#039;&amp;#039;expected answer&amp;#039;&amp;#039;, although a match, is ignored.&lt;br /&gt;
&lt;br /&gt;
If one of the &amp;#039;&amp;#039;expected answers&amp;#039;&amp;#039; is just &amp;quot;*&amp;quot; (a single *) this &amp;#039;&amp;#039;expected answer&amp;#039;&amp;#039; will match anything. This is used as the last &amp;quot;catch-all&amp;quot; &amp;#039;&amp;#039;expected answer&amp;#039;&amp;#039;. You will use this &amp;quot;catch-all&amp;quot; asterisk if you want to provide the student with your own &amp;quot;wrong answer&amp;quot; feedback message instead of the default system &amp;quot;That&amp;#039;s the Wrong Answer&amp;quot; message (or the equivalent in your own language pack).&lt;br /&gt;
&lt;br /&gt;
If an asterisk (*) is actually needed in an &amp;#039;&amp;#039;expected answer&amp;#039;&amp;#039;, you&amp;#039;ll have to use the &amp;#039;&amp;#039;&amp;#039;Regular Expressions&amp;#039;&amp;#039;&amp;#039; analysis system and enter the asterisk as \*, backslash asterisk.&lt;br /&gt;
&lt;br /&gt;
== Regular Expressions analysis ==&lt;br /&gt;
&lt;br /&gt;
This system gives you access to a more powerful but more complicated system for analysing the student&amp;#039;s answers. For a complete introduction to Regular Expressions, see these sites http://www.zend.com/zend/tut/tutorial-delin2.php regular-expressions or https://www.rezeau.org/recherche/eao/developpement/expandRegexpToString.htm.&lt;br /&gt;
&lt;br /&gt;
===&amp;#039;&amp;#039;Correct answer matching a regular expression pattern&amp;#039;&amp;#039;===&lt;br /&gt;
&lt;br /&gt;
It is not possible to give complete examples of the vast possibilities offered by this system, and the following are just some possibilities.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Example 1.&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
:Suppose your question is &amp;quot;What are the colors of the French flag?&amp;quot;.  &lt;br /&gt;
&lt;br /&gt;
:In the &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Answer 1&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; field you type this regular expression: &amp;quot;it’s blue, white(,| and) red/i&amp;quot;. This will match any of those four student answers:&lt;br /&gt;
*it&amp;#039;s blue, white, red&lt;br /&gt;
*it&amp;#039;s blue, white and red&lt;br /&gt;
*It&amp;#039;s blue, white, red&lt;br /&gt;
*It&amp;#039;s blue, white and red&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Note.-&amp;#039;&amp;#039;&amp;#039; By default a regular expression match is case sensitive; to make the match case insensitive you must add the /i parameter right at the end of your expression.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Example 2.&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
:&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Question&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;: &amp;quot;What is blue, or red, or yellow?&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
:&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Answer&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;: &amp;quot;(|it&amp;#039;s )a colou?r&amp;quot;. This will match:&lt;br /&gt;
*a colour&lt;br /&gt;
*a color&lt;br /&gt;
*it&amp;#039;s a colour&lt;br /&gt;
*it&amp;#039;s a color&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Note.-&amp;#039;&amp;#039;&amp;#039; The beginning of this regular expression &amp;quot;(|it&amp;#039;s )&amp;quot; will match either nothing or &amp;quot;it&amp;#039;s &amp;quot; (i.e. &amp;quot;it&amp;#039;s&amp;quot; followed by a space). The ? (question-mark) means: preceding character zero or one time; it is used here to match British English as well as US spelling.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Example 3.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Question&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;: &amp;quot;Name an animal whose name is made of 3 letters and the middle letter is the vowel a&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
:&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Answer&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;: &amp;quot;[bcr]at&amp;quot;. This will match: &lt;br /&gt;
*bat&lt;br /&gt;
*cat&lt;br /&gt;
*rat&lt;br /&gt;
&lt;br /&gt;
===&amp;#039;&amp;#039;Detecting missing required words or character strings&amp;#039;&amp;#039;===&lt;br /&gt;
&lt;br /&gt;
Regular expressions alone cannot detect absent character strings, so you have to add a little code in your Answer field to take care of this. Any &amp;#039;&amp;#039;expected answer&amp;#039;&amp;#039; which begins with a double hyphen will analyse the &amp;#039;&amp;#039;student’s answer&amp;#039;&amp;#039; to find out whether the following string is present or absent. If present, the analysis continues to the next question; if absent, the analysis stops and the relevant Response message is displayed.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Example 4.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
:&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Question:&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &amp;quot;What are the colors of the French flag?&amp;quot;&lt;br /&gt;
:&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Answer 2:&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; --.*blue.*/i&lt;br /&gt;
:&amp;#039;&amp;#039;student answer:&amp;#039;&amp;#039; &amp;quot;it&amp;#039;s red and white&amp;quot;&lt;br /&gt;
:&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Response 2:&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; The color of the sky is missing!&lt;br /&gt;
:&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Jump 2:&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; this page&lt;br /&gt;
&lt;br /&gt;
Here, the &amp;#039;&amp;#039;&amp;#039;.&amp;#039;&amp;#039;&amp;#039; (dot character) stands for “any character” and the &amp;#039;&amp;#039;&amp;#039;*&amp;#039;&amp;#039;&amp;#039; (asterisk) means “preceding special character repeated any number of times”. The &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Answer 2&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; regular expression above means: check whether the character string “blue”, preceded by anything and followed by anything is &amp;#039;&amp;#039;absent&amp;#039;&amp;#039; from the student&amp;#039;s answer. Please note that the use of the asterisk is different in the Simple analysis system and in the Regular Expressions system.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Example 5.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Question&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;: &amp;quot;Name an animal whose name is made of 3 letters and the middle letter is the vowel &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;a&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
:&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Answer&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;: &amp;quot;--[b|c|r]&amp;quot;. Response: &amp;quot;Your answer should start with one of these letters: &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;b&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;c&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; or &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;r&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===&amp;#039;&amp;#039;Detecting unwanted (incorrect) words or character strings&amp;#039;&amp;#039;===&lt;br /&gt;
&lt;br /&gt;
You may want to detect, in the student&amp;#039;s answer, the presence of one or several words which should be not be there (because they are wrong) and to single them out with a specific response. To do this, just start the &amp;#039;&amp;#039;expected answer&amp;#039;&amp;#039; in the &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Answer&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; field with a double plus sign (++).&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Example 6.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
:&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Answer:&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; ++(yellow|black|orange|green|black|pink)/i&lt;br /&gt;
:&amp;#039;&amp;#039;student answer:&amp;#039;&amp;#039; &amp;quot;it&amp;#039;s blue, orange and white&amp;quot;&lt;br /&gt;
:&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Response:&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; One or more colors are wrong!&lt;br /&gt;
:&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Jump:&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; this page&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Note.-&amp;#039;&amp;#039;&amp;#039; If any of these (wrong) color names is detected in the student&amp;#039;s answer, then the negative feedback message (&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Response&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;) will be displayed &amp;#039;&amp;#039;and&amp;#039;&amp;#039; the wrong strings will be colored red (or the color of the &amp;#039;&amp;#039;.incorrect&amp;#039;&amp;#039; class will be used if it exists in a CSS stylesheet of your current theme).&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Example 7.&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
:&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Question:&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &amp;quot;Name an animal whose name is made of 3 letters and the middle letter is the vowel a&amp;quot;.&lt;br /&gt;
:&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Answer:&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &amp;quot;++hat&amp;quot;.&lt;br /&gt;
:&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Response:&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &amp;quot;You might wear one made of an animal&amp;#039;s skin, but a hat can&amp;#039;t be considered as an animal.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Escaping special characters===&lt;br /&gt;
&lt;br /&gt;
If you need to use characters which are part of the regular expressions set of special characters, you need to &amp;quot;escape&amp;quot; them (i.e. precede them with a backslash). E.g. if you want to accept the answer &amp;quot;My computer cost 1000$&amp;quot;, you must write the regular expression as &amp;quot;My computer cost 1000\$&amp;quot;.&lt;br /&gt;
 The special characters which must be escaped are .^$*()[]+?|&lt;br /&gt;
&lt;br /&gt;
===Order of the &amp;#039;&amp;#039;expected answers&amp;#039;&amp;#039;===&lt;br /&gt;
Because the program tries to match the student&amp;#039;s answer with the teacher&amp;#039;s &amp;#039;&amp;#039;expected answers&amp;#039;&amp;#039; &amp;#039;&amp;#039;&amp;#039;in the order of the &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Answer&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; fields&amp;#039;&amp;#039;&amp;#039;, the &amp;#039;&amp;#039;order&amp;#039;&amp;#039; of those &amp;#039;&amp;#039;expected answers&amp;#039;&amp;#039; is of the greatest importance. The best analysis system will be achieved by a careful combination of regular expressions and order of &amp;#039;&amp;#039;expected answers&amp;#039;&amp;#039;. Of course, any question programed with the Regular expressions system will have to be thoroughly tested by the teacher before being released in a Lesson.&lt;br /&gt;
&lt;br /&gt;
==Tips and tricks==&lt;br /&gt;
The teacher should make some sort of provision for the student who does not know the answer to a question. This is true for all questions and especially the short answer and numeric questions.  The most common way is to prevent these students from getting stuck in a loop by making sure the &amp;quot;Maximum number of attempts&amp;quot; setting in the Lesson is less than the frustration point of the students.&lt;br /&gt;
&lt;br /&gt;
Another way is to use a wildcard that will accept any answer as the last line of the analysis. The teacher can give a hint in the response for this answer.  &lt;br /&gt;
&lt;br /&gt;
Be aware that as teacher, the maximum number of attempts will not apply when a teacher previews the lesson. So it is possible for non-editing teacher or co-teachers to get stuck in an endless loop.  And for a student to get bumped to another page after the maximum number of attempts.&lt;br /&gt;
&lt;br /&gt;
==See also ==&lt;br /&gt;
*[[Short-Answer question type]]&lt;br /&gt;
*[[Question bank|Question Bank page]]&lt;br /&gt;
*[[Quiz module]]&lt;br /&gt;
&lt;br /&gt;
[[de:Analyse von Kurzantwort-Fragen]]&lt;/div&gt;</summary>
		<author><name>1&gt;Rezeau</name></author>
	</entry>
</feed>