Bug 122111 - correct and given answer are the same when forgetting one letter of two same in row
Summary: correct and given answer are the same when forgetting one letter of two same ...
Alias: None
Product: kwordquiz
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Peter Hedlund
Depends on:
Reported: 2006-02-16 16:48 UTC by Grzegorz Oledzki
Modified: 2006-02-17 04:19 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Note You need to log in before you can comment on or make changes to this bug.
Description Grzegorz Oledzki 2006-02-16 16:48:43 UTC
Version:            (using KDE KDE 3.5.1)
Installed from:    Ubuntu Packages
OS:                Linux

When the correct answer contains a double letter (two same letters in a row) and you type only one of them (so you make a mistake), then after hitting ENTER key, it reveals the correct answer (correctly) and shows the given answer the same as the correct (that is the false behaviour).

Step to reproduce:
1. Open the attached test-file (see below).
2. Go to Q&A with "Column 2 to Column 1" mode.
3. Type "ils prenent" (it's the wrong answer) and hit ENTER.
4. The programme states:
 Your answer:
   ils prennent
 Corrent answer:
   ils prennent

[so it says that you gave the correct answer, but you didn't]
Should state:
  Your answer:
   ils prenent
 Corrent answer:
   ils prennent

--------------- the test file ----------------------------------------
<?xml version="1.0"?>
<!DOCTYPE kvtml SYSTEM "kvoctrain.dtd">
 generator="kwordquiz 0.8.1"

  <o width="250" l="Column 1">ils prennent</o>
  <t width="250" l="Column 2">sie nehmen</t>
Comment 1 Peter Hedlund 2006-02-17 04:19:57 UTC
SVN commit 510376 by hedlund:

Display incorrect answers correctly (sic!).


 M  +1 -1      qaview.cpp  

--- branches/KDE/3.5/kdeedu/kwordquiz/src/qaview.cpp #510375:510376
@@ -41,7 +41,7 @@
   QString result2 = "</qt>";
   int j = s.length() - 1;
   int k = e.length() - 1;
-  while (s[j] == e[k])
+  while (s[j] == e[k] && k > i)