Bug 178007 - [PATCH] Incorrect answer with "Mixed number" for answer option.
Summary: [PATCH] Incorrect answer with "Mixed number" for answer option.
Status: RESOLVED FIXED
Alias: None
Product: kbruch
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Sebastian Stein
URL:
Keywords:
: 181627 191382 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-12-17 20:59 UTC by Tadeu Araujo
Modified: 2009-05-03 22:15 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Fixed the bug (10.24 KB, patch)
2008-12-17 21:22 UTC, Tadeu Araujo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tadeu Araujo 2008-12-17 20:59:24 UTC
Version:            (using Devel)
OS:                Linux
Installed from:    Compiled sources

If the "Mixed number" option for answer  is check and the fraction don't have a mixed answer, when i put the fraction correct answer the program show me that the answer was wrong.

Example:
1/4 - 2/3 = -5/12 (don't have mixed form in this case)
If i put this answer the program show me that is incorrect.
Comment 1 Tadeu Araujo 2008-12-17 21:22:28 UTC
Created attachment 29399 [details]
 Fixed the bug

Resolved the the bug.
And when the check button clicked the skip button still enabled, this can cause problems, now is unable in this situation.
Please confirm if the bug was fixed.
Comment 2 FiNeX 2009-02-01 00:15:40 UTC
@Annma: hi! Maybe you could be interested about this bug. :-)
Comment 3 Tadeu Araujo 2009-02-03 13:53:58 UTC
(In reply to comment #2)
> @Annma: hi! Maybe you could be interested about this bug. :-)
> 

Sorry but i don't understand, the Bug 178007: Incorrect answer with "Mixed number" fo..., i saw this bug and create a patch to fix it.
The patch didn't worked?
Comment 4 FiNeX 2009-02-03 14:01:58 UTC
@Tadeu: I don't know if the patch has been applied. This is why I've addedd Annma to the CC list on this bug :-)
Comment 5 Sebastian Stein 2009-05-03 11:18:29 UTC
*** Bug 191382 has been marked as a duplicate of this bug. ***
Comment 6 Sebastian Stein 2009-05-03 11:19:21 UTC
*** Bug 181627 has been marked as a duplicate of this bug. ***
Comment 7 Sebastian Stein 2009-05-03 11:20:39 UTC
I am working on it.
Comment 8 Sebastian Stein 2009-05-03 22:15:24 UTC
SVN commit 963048 by sstein:

backport from Trunk (https://bugs.kde.org/token.cgi?t=8cDojiBlcS&a=cfmem):

Implements a better way to check if a task was solved correctly by using
the == operator of the ratio class itself (fix bug 178007).

In contrast to Trunk, I have not added a help message to explain users why
tasks are counted as wrong if they were not entered in mixed notation. This
is not possible due to string freeze!

additional changes:
- removed a lot of debug statements from the code
- added clean() function to task; useful for debugging
- some whitespace changes introduced by kdevelop

Changes are partly based on patch provided by Tadeu Araujo. Thanks for your
contribution!

BUG:178007


 M  +1 -1      exerciseconvert.cpp  
 M  +1 -2      exercisefactorize.cpp  
 M  +6 -6      fractionbasewidget.cpp  
 M  +4 -4      fractionbasewidget.h  
 M  +21 -18    resultwidget.cpp  
 M  +19 -30    task.cpp  
 M  +3 -0      task.h  
 M  +89 -64    taskview.cpp  
 M  +3 -3      taskview.h  
 M  +0 -4      taskwidget.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=963048