Fixed issue where 10 tests werent being generated.
This commit is contained in:
parent
2129fc016b
commit
31936e7ff4
1 changed files with 2 additions and 3 deletions
|
@ -67,7 +67,6 @@ public class AssessmentGenerator {
|
||||||
for (int numberToGenerate = 0; numberToGenerate < 10; numberToGenerate++) {
|
for (int numberToGenerate = 0; numberToGenerate < 10; numberToGenerate++) {
|
||||||
Question generatedAssessment = null;
|
Question generatedAssessment = null;
|
||||||
int quizType = rand.nextInt(3);
|
int quizType = rand.nextInt(3);
|
||||||
System.out.println(numberToGenerate);
|
|
||||||
switch (quizType) {
|
switch (quizType) {
|
||||||
case (0): //0 Means translation test.
|
case (0): //0 Means translation test.
|
||||||
//wordToTranslatePlace = rand.nextInt(Application.practiseList.size());
|
//wordToTranslatePlace = rand.nextInt(Application.practiseList.size());
|
||||||
|
@ -98,10 +97,10 @@ public class AssessmentGenerator {
|
||||||
if(practiseList.size() > 3) {
|
if(practiseList.size() > 3) {
|
||||||
if (((listOfAssessment.isEmpty()) || !(listOfAssessment.getLast() instanceof MatchTheMeaningQuestion))) {
|
if (((listOfAssessment.isEmpty()) || !(listOfAssessment.getLast() instanceof MatchTheMeaningQuestion))) {
|
||||||
generatedAssessment = generateMatchMeaning(practiseList);
|
generatedAssessment = generateMatchMeaning(practiseList);
|
||||||
} else {
|
break;
|
||||||
numberToGenerate--;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
numberToGenerate--;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if(generatedAssessment != null) {
|
if(generatedAssessment != null) {
|
||||||
|
|
Reference in a new issue