ali 2 lat temu
rodzic
commit
e85979b69b

+ 9 - 1
src/components/Widgets/Test/TestParticipation/TestParticipation.vue

@@ -205,10 +205,18 @@ export default {
       // Calculate the remaining time in seconds considering the duration
       return Math.floor((durationInMinutes * 60) - timeDiffInSeconds)
     },
+    onTimeout () {
+      this.$q.notify({
+        type: 'negative',
+        message: 'زمان آزمون به اتمام رسیده است.'
+      })
+      this.stopTimer()
+      this.backToClassList()
+    },
     startTimer () {
       this.timerInterval = setInterval(() => {
         if (this.remainingTime <= 0) {
-          this.stopTimer()
+          this.onTimeout()
         } else {
           this.remainingTime--
           this.answerBook.remainingTime = this.remainingTime