public class Test extends Model
Modifier and Type | Field and Description |
---|---|
static String |
FEEDBACK_HIGH
High feedback
|
static String |
FEEDBACK_MAX
Maximum feedback
|
static String |
FEEDBACK_MEDIUM
Medium feedback
|
static String |
FEEDBACK_MIN
Minimum feedback
|
static String |
FEEDBACK_NONE
None feedback
|
static List<String> |
FEEDBACK_VALUES
Feedback values
|
Constructor and Description |
---|
Test(long selectedCourseCode,
int min,
int def,
int max,
String feedback)
Constructor from fields
|
Test(long crsCode,
int min,
int def,
int max,
String feedback,
Long editTime)
Constructor from fields
|
Modifier and Type | Method and Description |
---|---|
void |
evaluate()
Calculates total score and individual question's score of the test
|
int |
getDef()
Gets default questions in test
|
Long |
getEditTime()
Gets last time test was updated
|
String |
getFeedback()
Gets feedback to be showed to the student
|
int |
getMax()
Gets maximum questions in test
|
int |
getMin()
Gets minimum questions in test
|
Object |
getProperty(int param) |
int |
getPropertyCount() |
void |
getPropertyInfo(int param,
Hashtable arg1,
PropertyInfo propertyInfo) |
TestQuestion |
getQuestionAndAnswers(int i)
Gets the question stored in position i and related answers
|
List<TestQuestion> |
getQuestions()
Gets the questions list
|
Float |
getQuestionScore(int pos)
Gets individual score for question in position i
|
List<Float> |
getQuestionsScore()
Gets the questions's score
|
float |
getTotalScore()
Gets total test's score
|
boolean |
isEvaluated()
Checks if the test has been evaluated
|
void |
setDef(int def)
Sets default questions in test
|
void |
setEditTime(Long timestamp)
Sets last time test was updated
|
void |
setEvaluated(boolean evaluated)
Specifies if the test has been evaluated
|
void |
setFeedback(String feedback)
Sets feedback to be showed to the student
|
void |
setMax(int max)
Sets maximum questions in test
|
void |
setMin(int min)
Sets minimum questions in test
|
void |
setProperty(int param,
Object obj) |
void |
setQuestions(List<TestQuestion> questions)
Sets the questions list
|
void |
setQuestionScore(int pos,
Float score)
Sets individual answers's score
|
void |
setQuestionsScore(List<Float> questionsScore)
Sets the questions's score
|
void |
setTotalScore(float totalScore)
Sets total test's score
|
String |
toString() |
public static final String FEEDBACK_NONE
public static final String FEEDBACK_MIN
public static final String FEEDBACK_MEDIUM
public static final String FEEDBACK_HIGH
public static final String FEEDBACK_MAX
public Test(long selectedCourseCode, int min, int def, int max, String feedback)
selectedCourseCode
- Code of test's coursemin
- Minimum questions in testdef
- Default questions in testmax
- Maximum questions in testfeedback
- Feedback to be showed to the studentpublic Test(long crsCode, int min, int def, int max, String feedback, Long editTime)
crsCode
- Code of test's coursemin
- Minimum questions in testdef
- Default questions in testmax
- Maximum questions in testfeedback
- Feedback to be showed to the studenteditTime
- Last time test was updatedpublic TestQuestion getQuestionAndAnswers(int i)
i
- Question's positionpublic int getMin()
public void setMin(int min)
min
- Minimum questions in testpublic int getDef()
public void setDef(int def)
def
- Default questions in testpublic int getMax()
public void setMax(int max)
max
- Maximum questions in testpublic String getFeedback()
public void setFeedback(String feedback)
feedback
- Feedback to be showed to the studentpublic Long getEditTime()
public void setEditTime(Long timestamp)
timestamp
- Last time test was updatedpublic float getTotalScore()
public void setTotalScore(float totalScore)
totalScore
- Total test's scorepublic Float getQuestionScore(int pos)
pos
- Questions's position in testpublic void setQuestionScore(int pos, Float score)
pos
- Questions's position in testscore
- Questions's scorepublic List<TestQuestion> getQuestions()
public void setQuestions(List<TestQuestion> questions)
questions
- The questions to setpublic List<Float> getQuestionsScore()
public void setQuestionsScore(List<Float> questionsScore)
questionsScore
- The questions's scorepublic boolean isEvaluated()
public void setEvaluated(boolean evaluated)
evaluated
- true if the test has been evaluated
false if the test hasn't been evaluatedpublic void evaluate()
public Object getProperty(int param)
public int getPropertyCount()
public void getPropertyInfo(int param, Hashtable arg1, PropertyInfo propertyInfo)
public void setProperty(int param, Object obj)