ali 2 anos atrás
pai
commit
466b3dc9b1

+ 2 - 2
src/components/Widgets/Test/TestParticipation/TestParticipation.vue

@@ -208,11 +208,11 @@ export default {
           this.backToClassList()
         })
     },
-    initPageFromAnswerBook (answerBook, setRemainingTime = true) {
+    initPageFromAnswerBook (answerBook) {
       this.answerBook = new AnswerBook(answerBook)
       this.answerBook.loading = false
       if (this.answerBook.remainingTime === null) {
-        this.answerBook.remainingTime = this.getRemainingTimeInSeconds(this.answerBook.server_time, this.answerBook.attending_start_time, this.answerBook.duration)
+        this.answerBook.remainingTime = this.getRemainingTimeInSeconds(this.answerBook.server_time, this.answerBook.attending_start_time, this.answerBook.test_info.duration_deadline)
       }
       this.remainingTime = this.answerBook.remainingTime
       this.$store.commit('Test/updateAnswerBook', this.answerBook)

+ 3 - 0
src/models/Test.js

@@ -9,6 +9,9 @@ class Test extends Model {
       { key: 'description' },
       { key: 'level' },
       { key: 'unit' },
+      { key: 'start_time' },
+      { key: 'end_time' },
+      { key: 'duration_deadline' },
       { key: 'status' },
       { key: 'test_set' },
       {

+ 1 - 1
src/pages/User/Profile/classroomInfo.vue

@@ -641,7 +641,7 @@ export default {
             required: true,
             label: 'مدت آزمون(دقیقه)',
             align: 'left',
-            field: row => row.duration
+            field: row => row.test_info.duration_deadline
           },
           {
             name: 'test_questions.length',