Fixed issue where 10 tests werent being generated.

This commit is contained in:
top19 2020-05-01 09:56:22 +01:00
parent 2129fc016b
commit 31936e7ff4

View file

@ -67,7 +67,6 @@ public class AssessmentGenerator {
for (int numberToGenerate = 0; numberToGenerate < 10; numberToGenerate++) {
Question generatedAssessment = null;
int quizType = rand.nextInt(3);
System.out.println(numberToGenerate);
switch (quizType) {
case (0): //0 Means translation test.
//wordToTranslatePlace = rand.nextInt(Application.practiseList.size());
@ -98,10 +97,10 @@ public class AssessmentGenerator {
if(practiseList.size() > 3) {
if (((listOfAssessment.isEmpty()) || !(listOfAssessment.getLast() instanceof MatchTheMeaningQuestion))) {
generatedAssessment = generateMatchMeaning(practiseList);
} else {
numberToGenerate--;
break;
}
}
numberToGenerate--;
break;
}
if(generatedAssessment != null) {