Index: openacs-4/packages/xowiki/tcl/form-field-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/form-field-procs.tcl,v diff -u -N -r1.284.2.79 -r1.284.2.80 --- openacs-4/packages/xowiki/tcl/form-field-procs.tcl 11 Feb 2020 12:47:59 -0000 1.284.2.79 +++ openacs-4/packages/xowiki/tcl/form-field-procs.tcl 11 Feb 2020 13:13:05 -0000 1.284.2.80 @@ -704,11 +704,22 @@ return 0 } FormField instproc answer_check=answer_words {} { - set value [regsub -all { +} ${:value} " "] + # + # Correct, when the answer is equal to the provided (sequence of) + # words, but white-space is ignored. When the first word is + # "*lower*" then the provided answer of the student is converted + # to lower case before the comparison is performed; as a + # consequence the comparison is not case sensitive. Note that the + # answer_words have to be provided in lower case as well. + # + set value [regsub -all {[ ]+} ${:value} " "] if {[string match "*lower*" [lindex ${:correct_when} 1]]} { set value [string tolower $value] + set words [lrange ${:correct_when} 2 end] + } else { + set words [lrange ${:correct_when} 1 end] } - return [expr {$value eq [:answer]}] + return [expr {$value eq $words}] } FormField instproc answer_is_correct {} {