Bug fixing:
- Prevented the viewing of the exam solutions to generate another record; - Made it so the solution is the same after viewing the results;
This commit is contained in:
@@ -93,7 +93,7 @@ export default function Page() {
|
||||
}, [selectedModules, setExams, exams]);
|
||||
|
||||
useEffect(() => {
|
||||
if (selectedModules.length > 0 && exams.length !== 0 && moduleIndex >= selectedModules.length && !hasBeenUploaded) {
|
||||
if (selectedModules.length > 0 && exams.length !== 0 && moduleIndex >= selectedModules.length && !hasBeenUploaded && !showSolutions) {
|
||||
const newStats: Stat[] = userSolutions.map((solution) => ({
|
||||
...solution,
|
||||
session: sessionId,
|
||||
|
||||
@@ -96,7 +96,9 @@ export default function Page() {
|
||||
}, [selectedModules, setExams, exams]);
|
||||
|
||||
useEffect(() => {
|
||||
if (selectedModules.length > 0 && exams.length !== 0 && moduleIndex >= selectedModules.length && !hasBeenUploaded) {
|
||||
if (selectedModules.length > 0 && exams.length !== 0 && moduleIndex >= selectedModules.length && !hasBeenUploaded && !showSolutions) {
|
||||
alert("HEHE");
|
||||
|
||||
const newStats: Stat[] = userSolutions.map((solution) => ({
|
||||
...solution,
|
||||
session: sessionId,
|
||||
|
||||
Reference in New Issue
Block a user