Skip to content
Snippets Groups Projects
Commit e6138024 authored by Philip Kaluđerčić's avatar Philip Kaluđerčić :u7121:
Browse files

Warn if a comment starts with a wrong interjection

parent 634b53af
No related branches found
No related tags found
No related merge requests found
......@@ -37,6 +37,16 @@ sub add {
return unless %last_option;
if ($last_option{"comment"}) {
if (defined $last_option{"correct"}) {
if (($last_option{"correct"} eq JSON::true) and
($last_option{"comment"} =~ /^\s*Nein,/)) {
warn "$ARGV:$.: Correct answer starting with \"Nein\"\n";
}
if (($last_option{"correct"} eq JSON::false) and
($last_option{"comment"} =~ /^\s*Ja,/)) {
warn "$ARGV:$.: Wrong answer starting with \"Ja\"\n";
}
}
$last_option{"comment"} = md($last_option{"comment"});
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment