diff --git a/src/components/Diagnostic.tsx b/src/components/Diagnostic.tsx
index 94b00e02..943d90e7 100644
--- a/src/components/Diagnostic.tsx
+++ b/src/components/Diagnostic.tsx
@@ -1,5 +1,4 @@
import {infoButtonStyle} from "@/constants/buttonStyles";
-import {BAND_SCORES} from "@/constants/ielts";
import {Module} from "@/interfaces";
import {User} from "@/interfaces/user";
import useExamStore from "@/stores/examStore";
diff --git a/src/constants/ielts.tsx b/src/constants/ielts.tsx
index e3f6347a..630100c5 100644
--- a/src/constants/ielts.tsx
+++ b/src/constants/ielts.tsx
@@ -2,96 +2,119 @@ import {Module} from "@/interfaces";
export const MODULES: Module[] = ["reading", "listening", "writing", "speaking"];
-export const BAND_SCORES: {[key in Module]: number[]} = {
- reading: [0, 2.5, 3, 3.5, 4, 4.5, 5, 5.5, 6, 6.5, 7, 7.5, 8, 8.5, 9],
- listening: [0, 2.5, 3, 3.5, 4, 4.5, 5, 5.5, 6, 6.5, 7, 7.5, 8, 8.5, 9],
- writing: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9],
- speaking: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9],
- level: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9],
-};
+// BAND SCORES is not in use anymore and level scoring is made based on thresholds
+// export const BAND_SCORES: {[key in Module]: number[]} = {
+// reading: [0, 2.5, 3, 3.5, 4, 4.5, 5, 5.5, 6, 6.5, 7, 7.5, 8, 8.5, 9],
+// listening: [0, 2.5, 3, 3.5, 4, 4.5, 5, 5.5, 6, 6.5, 7, 7.5, 8, 8.5, 9],
+// writing: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9],
+// speaking: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9],
+// level: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9],
+// };
-export const moduleResultText = (level: number) => {
- if (level === 9) {
- return (
- <>
- Congratulations on your exam performance! You achieved an impressive level {level}, demonstrating
- excellent mastery of the assessed knowledge.
-
-
- If you disagree with the result, you can request a review by a qualified teacher. We are committed to the accuracy and transparency of
- the results.
-
-
- Please contact us for further information. Congratulations again on your outstanding achievement! We are here to support you on your
- academic journey.
- >
- );
- }
+export type LevelScore = "Advanced" | "Upper-Intermediate" | "Intermediate" | "Pre-Intermediate" | "Elementary" | "Beginner";
- if (level >= 6) {
- return (
- <>
- Congratulations on your exam performance! You achieved a commendable level {level}, demonstrating a
- good understanding of the assessed knowledge.
-
-
- If you have any concerns about the result, you can request a review by a qualified teacher. We are committed to the accuracy and
- transparency of the results.
-
-
- Please contact us for further information. Congratulations again on your achievement! We are here to support you on your academic
- journey.
- >
- );
- }
- if (level >= 3) {
- return (
- <>
- Congratulations on your exam performance! You achieved a level of {level}, demonstrating a
- satisfactory understanding of the assessed knowledge.
-
-
- If you have any concerns about the result, you can request a review by a qualified teacher. We are committed to the accuracy and
- transparency of the results.
-
-
- Please contact us for further information. Congratulations again on your achievement! We are here to support you on your academic
- journey.
- >
- );
- }
+const generateHighestScoreText = () : React.ReactNode => (
+ <>
+
+
+ If you disagree with the result, you can request a review by a qualified teacher. We are committed to the accuracy and transparency of
+ the results.
+
+
+ Please contact us for further information. Congratulations again on your outstanding achievement! We are here to support you on your
+ academic journey.
+ >
+);
- return (
- <>
- Thank you for taking the exam. You achieved a level {level}, but unfortunately, it did not meet the
- required standards.
-
-
- If you have any concerns about the result, you can request a review by a qualified teacher. We are committed to the accuracy and
- transparency of the results.
-
-
- Please contact us for further information. We encourage you to continue your studies and wish you the best of luck in your future
- endeavors.
- >
- );
-};
+const generateAverageScoreText = () : React.ReactNode => (
+ <>
+
+
+ If you have any concerns about the result, you can request a review by a qualified teacher. We are committed to the accuracy and
+ transparency of the results.
+
+
+ Please contact us for further information. Congratulations again on your achievement! We are here to support you on your academic
+ journey.
+ >
+);
+
+const generateLowestScoreText = () : React.ReactNode => (
+ <>
+
+
+ If you have any concerns about the result, you can request a review by a qualified teacher. We are committed to the accuracy and
+ transparency of the results.
+
+
+ Please contact us for further information. We encourage you to continue your studies and wish you the best of luck in your future
+ endeavors.
+ >
+)
export const levelResultText = (level: number) => {
+ if(level === 9) {
+ return (
+ <>
+ {"Outstanding! Your command of English is excellent. Focus on fine-tuning subtle language nuances and exploring sophisticated vocabulary. Keep up the excellent work!"}
+ {generateHighestScoreText()}
+ >
+ );
+ }
+ if(level >= 8) {
+ return (
+ <>
+ {"Impressive! You're approaching fluency. Continue refining nuances in grammar and expanding your vocabulary to express ideas more precisely."}
+ {generateAverageScoreText()}
+ >
+ );
+ }
+ if(level >= 6) {
+ return (
+ <>
+ {"Great job! You're navigating the complexities of English. Keep honing your grammar skills and exploring more advanced vocabulary."}
+ {generateAverageScoreText()}
+ >
+ );
+ }
+ if(level >= 4) {
+ return (
+ <>
+ {"Well done! You're moving beyond the basics. Work on expanding your vocabulary and refining your understanding of grammar structures."}
+ {generateAverageScoreText()}
+ >
+ );
+ }
+ if(level >= 2) {
+ return (
+ <>
+ {"Good effort! You're making progress. Continue studying and pay attention to common vocabulary and fundamental grammar rules."}
+ {generateAverageScoreText()}
+ >
+ );
+ }
+ if(level >= 0) {
+ return (
+ <>
+ {"Keep practicing! You're just starting, and improvement takes time. Focus on building your vocabulary and basic grammar skills."}
+ {generateLowestScoreText()}
+ >
+ );
+ }
+
+ return null;
+};
+
+
+export const moduleResultText = (module: Module, level: number) => {
+ if(module === 'level') return levelResultText(level);
if (level === 9) {
return (
<>
Congratulations on your exam performance! You achieved an impressive level {level}, demonstrating
excellent mastery of the assessed knowledge.
-
-
- If you disagree with the result, you can request a review by a qualified teacher. We are committed to the accuracy and transparency of
- the results.
-
-
- Please contact us for further information. Congratulations again on your outstanding achievement! We are here to support you on your
- academic journey.
+ {generateHighestScoreText()}
>
);
}
@@ -101,14 +124,7 @@ export const levelResultText = (level: number) => {
<>
Congratulations on your exam performance! You achieved a commendable level {level}, demonstrating a
good understanding of the assessed knowledge.
-
-
- If you have any concerns about the result, you can request a review by a qualified teacher. We are committed to the accuracy and
- transparency of the results.
-
-
- Please contact us for further information. Congratulations again on your achievement! We are here to support you on your academic
- journey.
+ {generateAverageScoreText()}
>
);
}
@@ -118,14 +134,7 @@ export const levelResultText = (level: number) => {
<>
Congratulations on your exam performance! You achieved a level of {level}, demonstrating a
satisfactory understanding of the assessed knowledge.
-
-
- If you have any concerns about the result, you can request a review by a qualified teacher. We are committed to the accuracy and
- transparency of the results.
-
-
- Please contact us for further information. Congratulations again on your achievement! We are here to support you on your academic
- journey.
+ {generateAverageScoreText()}
>
);
}
@@ -134,14 +143,7 @@ export const levelResultText = (level: number) => {
<>
Thank you for taking the exam. You achieved a level {level}, but unfortunately, it did not meet the
required standards.
-
-
- If you have any concerns about the result, you can request a review by a qualified teacher. We are committed to the accuracy and
- transparency of the results.
-
-
- Please contact us for further information. We encourage you to continue your studies and wish you the best of luck in your future
- endeavors.
+ {generateLowestScoreText()}
>
);
-};
+};
\ No newline at end of file
diff --git a/src/exams/Finish.tsx b/src/exams/Finish.tsx
index 2d4c94c3..47bc559f 100644
--- a/src/exams/Finish.tsx
+++ b/src/exams/Finish.tsx
@@ -10,6 +10,8 @@ import Link from "next/link";
import {useRouter} from "next/router";
import {Fragment, useEffect, useState} from "react";
import {BsArrowCounterclockwise, BsBook, BsClipboard, BsEyeFill, BsHeadphones, BsMegaphone, BsPen, BsShareFill} from "react-icons/bs";
+import { LevelScore } from "@/constants/ielts";
+import { getLevelScore } from "@/utils/score";
interface Score {
module: Module;
@@ -66,6 +68,24 @@ export default function Finish({user, scores, modules, isLoading, onViewResults}
return exam.exercises.length;
};
+ const bandScore: number = calculateBandScore(selectedScore.correct, selectedScore.total, selectedModule, user.focus);
+
+ const showLevel = (level: number) => {
+ if(selectedModule === "level") {
+ const [levelStr, grade] = getLevelScore(level);
+ return (
+