parley
AnswerValidator Class Reference
#include <answervalidator.h>
Detailed Description
Provides different comparison methods to determine the quality of the answer.
Definition at line 31 of file answervalidator.h.
Public Member Functions | |
| AnswerValidator (KEduVocDocument *doc) | |
| ~AnswerValidator () | |
| bool | spellcheckerAvailable () |
| void | setTestEntry (TestEntry *entry) |
| void | setLanguage (int translation) |
| void | checkUserAnswer (const QString &userAnswer) |
| void | checkUserAnswer (const QString &solution, const QString &userAnswer, const QString &language=QString()) |
Constructor & Destructor Documentation
| AnswerValidator::AnswerValidator | ( | KEduVocDocument * | doc | ) |
Definition at line 50 of file answervalidator.cpp.
| AnswerValidator::~AnswerValidator | ( | ) |
Definition at line 58 of file answervalidator.cpp.
Member Function Documentation
| bool AnswerValidator::spellcheckerAvailable | ( | ) |
Definition at line 500 of file answervalidator.cpp.
| void AnswerValidator::setTestEntry | ( | TestEntry * | entry | ) |
Sets the current entry.
This has to be set before trying to validate! It will store the results.
- Parameters:
-
expression
Definition at line 92 of file answervalidator.cpp.
| void AnswerValidator::setLanguage | ( | int | translation | ) |
Set the language for the spell checker.
(Identifierindex)
- Parameters:
-
translation
Definition at line 64 of file answervalidator.cpp.
| void AnswerValidator::checkUserAnswer | ( | const QString & | userAnswer | ) |
Checks the user answer.
If the answer was correct, 1.0 is set as lastPercentage for the TestEntry, 0.0 means no relation between answer and solution whatsoever. The type of mistake is also set in the TestEntry.
- Parameters:
-
userAnswer
Definition at line 290 of file answervalidator.cpp.
| void AnswerValidator::checkUserAnswer | ( | const QString & | solution, | |
| const QString & | userAnswer, | |||
| const QString & | language = QString() | |||
| ) |
Definition at line 303 of file answervalidator.cpp.
The documentation for this class was generated from the following files:
KDE 4.0 API Reference