From 68eb646f58526b9ed30c6df54a37630119d63ec2 Mon Sep 17 00:00:00 2001 From: law39 Date: Thu, 30 Apr 2020 18:59:01 +0100 Subject: [PATCH] Updated Assessment Generator Assessment Generator now generates tests if the practice list is at least greater than 1 --- .../group20/selfassessment/AssessmentGenerator.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs221/group20/selfassessment/AssessmentGenerator.java b/src/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs221/group20/selfassessment/AssessmentGenerator.java index 3e385dc..f263c8b 100644 --- a/src/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs221/group20/selfassessment/AssessmentGenerator.java +++ b/src/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs221/group20/selfassessment/AssessmentGenerator.java @@ -92,10 +92,13 @@ public class AssessmentGenerator { // wordsToTranslate.add(Application.practiseList.get(wordToTranslatePlace)); // wordsToTranslate.toArray(); // } - if( (practiseList.size()>=4) || ((listOfAssessment.isEmpty()) || !(listOfAssessment.getLast() instanceof MatchTheMeaningQuestion))){ - generatedAssessment = generateMatchMeaning(practiseList); - }else { - numberToGenerate--; + System.out.println(practiseList.size()); + if(practiseList.size() > 3) { + if (((listOfAssessment.isEmpty()) || !(listOfAssessment.getLast() instanceof MatchTheMeaningQuestion))) { + generatedAssessment = generateMatchMeaning(practiseList); + } else { + numberToGenerate--; + } } break; }