[Parley-devel] KDE/kdeedu/parley/src/practice
Frederik Gladhorn
frederik.gladhorn at gmx.de
Sun Jun 1 13:12:24 CEST 2008
SVN commit 815174 by gladhorn:
Fix written test results are never counted wrong.
Thanks for noticing Nathanael!
Embarrassing bug.
/me hides
CCMAIL: parley-devel at kde.org
M +7 -2 testentry.cpp
M +2 -0 writtenpracticedialog.cpp
--- trunk/KDE/kdeedu/parley/src/practice/testentry.cpp #815173:815174
@@ -104,11 +104,16 @@
void TestEntry::incBadCount()
{
+kDebug() << "inc bad count!";
update();
+
+ // pretty hard, decrease the grade every single time
+ // could be changed, but maybe it's a good idea even...
+ m_entry->translation(m_gradeTo)->decGrade();
+ m_entry->translation(m_gradeTo)->incBadCount();
+
m_statisticBadCount++;
m_answeredCorrectInSequence = 0;
- m_entry->translation(m_gradeTo)->decGrade();
- m_entry->translation(m_gradeTo)->incBadCount();
}
void TestEntry::incTimeout()
--- trunk/KDE/kdeedu/parley/src/practice/writtenpracticedialog.cpp #815173:815174
@@ -222,6 +222,7 @@
}
if ( result == 1.0 ) {
+ // will result in wrong if tainted
resultCorrect();
showContinueButton(true);
} else {
@@ -326,6 +327,7 @@
void WrittenPracticeDialog::showSolution()
{
setAnswerTainted();
+ resultWrong();
showContinueButton(true);
mw->status->clear();
More information about the Parley-devel
mailing list