package cz.muni.fi.bronchus.questions; import java.util.*; /** * Represents container for storing all informations neccesarry for processing a test. * @author Tomáš Udržal */ public class Assessment extends Repository { /** * Duration of test */ private String duration; /** * Title of test */ private String title; /** * Value K of the best score. Neccesarry for an algorithm BestKofN. */ private String bestK; /** * True if item's feedbacks are enabled, otherwise false */ private boolean feedbacksEnabled; /** * True if item's hint is enabled, otherwise false */ private boolean hintsEnabled; /** * True if item's solution is enabled, otherwise false */ private boolean solutionsEnabled; /** * True if durations are enabled, otherwise false */ private boolean durationsEnabled; /** * True if test's feedbacks are enabled, otherwise false */ private boolean examFeedbacksEnabled; /** * Outcomes processing algorithm. Available values are * -1 zadny nevybran * 0 NumberCorrect * 1 NumberCorrectAttempted * 2 WeightedNumberCorrect * 3 WeightedNumberCorrectAttempted * 4 PercentCorrect * 5 SumOfScores * 6 SumOfScoresAttempted * 7 WeightedSumOfScores * 8 WeightedSumOfScoresAttempted * 9 BestKofN */ private int algorithm; /** * Ordering type. Available values are * -1 zadne nevybrano * 0 Sequential from all * 1 Random from all * 2 Random 'X' from all * 3 Random from all + fixed positions * 4 Random 'X' from all + fixed positions * 5 Random from all with specified Topic * 6 Random 'X' from all with specified Topic * 7 Grouping into Sections according to Topic; Random 'X' from 'Y' selection */ private int ordering=0; /** * Vector of feedbacks on outcomes processing algorithm's agregated score */ private Vector outcomesFeedback; /** Creates a new instance of Assessment */ public Assessment() { this.title=""; this.feedbacksEnabled=false; this.hintsEnabled=false; this.solutionsEnabled=false; this.durationsEnabled=false; this.examFeedbacksEnabled=false; this.algorithm=-1; this.ordering=0; this.outcomesFeedback=new Vector(); this.duration=""; this.bestK=""; } /** * Setter method for the title of the test * @param x title */ public void setTitle(String x) { title=x; } /** * Getter method for the title of the test * @return title of the test */ public String getTitle() { return title; } /** * Setter method for the feedbacks switch of the test. * @param x True if item's feedbacks are enabled, otherwise false */ public void setFeedbacksEnabled(boolean x) { feedbacksEnabled=x; } /** * Getter method for the feedbacks switch of the test * @return True if item's feedbacks are enabled, otherwise false */ public boolean isFeedbacksEnabled() { return feedbacksEnabled; } /** * Setter method for the hint switch of the test * @param x True if item's hint is enabled, otherwise false */ public void setHintsEnabled(boolean x) { hintsEnabled=x; } /** * Getter method for the hints switch of the test * @return True if item's hint is enabled, otherwise false */ public boolean isHintsEnabled() { return hintsEnabled; } /** * Setter method for the solution switch of the test * @param x True if item's solution is enabled, otherwise false */ public void setSolutionsEnabled(boolean x) { solutionsEnabled=x; } /** * Getter method for the solutions switch of the test * @return True if item's solution is enabled, otherwise false */ public boolean isSolutionsEnabled() { return solutionsEnabled; } /** * Setter method for the durations of the test and its items * @param x True if durations are enabled, otherwise false */ public void setDurationsEnabled(boolean x) { durationsEnabled=x; } /** * Getter method for the duration switch of the test * @return True if durations are enabled, otherwise false */ public boolean isDurationsEnabled() { return durationsEnabled; } /** * Setter method for the test's feedback * @param x True if test's feedbacks are enabled, otherwise false */ public void setExamFeedbacksEnabled(boolean x) { examFeedbacksEnabled=x; } /** * Getter method for the test's feedback switch * @return True if test's feedbacks are enabled, otherwise false */ public boolean isExamFeedbacksEnabled() { return examFeedbacksEnabled; } /** * Setter method for the algorithm type of the test * @param x algorithm type */ public void setAlgorithm(int x) { algorithm=x; } /** * Getter method for the algorithm type of the test * @return algorithm type of the test */ public int getAlgorithm() { return algorithm; } /** * Setter method for the ordering type of the test * @param x ordering type */ public void setOrdering(int x) { ordering=x; } /** * Getter method for the ordering type of the test * @return ordering type of the test */ public int getOrdering() { return ordering; } /** * Setter method for the duration of the test * @param x duration */ public void setDuration(String x) { duration=x; } /** * Getter method for the duration of the test * @return duration of the test */ public String getDuration() { return duration; } /** * Adds Outcomes Feedback to the end of the Vector * @param x Outcomes feedback to be added */ public void addOutcomesFeedback(OutcomesFeedback x) { outcomesFeedback.add(x); } /** * Get the Outcomes Feedback on the specified index * @return Outcomes Feedback */ public Vector getOutcomesFeedbacks() { return outcomesFeedback; } /** * Remove all items from Vector */ public void clearOutcomesFeedbacks() { outcomesFeedback.clear(); } /** * Setter method for the K value of the BestKofN algorithm of the test * @param x value K */ public void setBestK(String x) { bestK = x; } /** * Getter method for the K value of the BestKofN algorithm of the test * @return value K of the BestKofN algorithm of the test */ public String getBestK() { return bestK; } }