kerasus vor 2 Jahren
Ursprung
Commit
1dd2147193
20 geänderte Dateien mit 46 neuen und 46 gelöschten Zeilen
  1. 2 2
      src/components/Widgets/Classroom/AdminClassroomAnswerBookList/AdminClassroomAnswerBookList.vue
  2. 2 2
      src/components/Widgets/Classroom/AdminClassroomShow/components/TestList.vue
  3. 2 2
      src/components/Widgets/Classroom/ClassroomAnswerBookList/ClassroomAnswerBookList.vue
  4. 2 2
      src/components/Widgets/Other/Shop/ShopCompleteInfo/components/AllQuestions.vue
  5. 1 1
      src/components/Widgets/Other/Shop/ShopCompleteInfo/components/ShowEventTest.vue
  6. 4 4
      src/components/Widgets/Test/AdminAnswerBookShow/AdminAnswerBookShow.vue
  7. 4 4
      src/components/Widgets/Test/ShowTestGradeForGrader/ShowTestGradeForGrader.vue
  8. 2 2
      src/components/Widgets/Test/TestParticipation/TestParticipation.vue
  9. 3 3
      src/components/Widgets/Test/TestParticipation/components/AllQuestions.vue
  10. 8 8
      src/components/Widgets/Test/TestParticipation/components/SingleQuestion.vue
  11. 4 4
      src/components/Widgets/Test/TestShow/TestShow.vue
  12. 1 1
      src/components/Widgets/TestSet/AdminEventTestSetCreate/AdminEventTestSetCreate.vue
  13. 2 2
      src/components/Widgets/TestSet/AdminEventTestSetIndex/AdminEventTestSetIndex.vue
  14. 1 1
      src/components/Widgets/TestSet/AdminEventTestSetShow/AdminEventTestSetShow.vue
  15. 1 1
      src/components/Widgets/TestSet/AdminTestSetCreate/AdminTestSetCreate.vue
  16. 2 2
      src/components/Widgets/TestSet/AdminTestSetIndex/AdminTestSetIndex.vue
  17. 1 1
      src/components/Widgets/TestSet/AdminTestSetShow/AdminTestSetShow.vue
  18. 2 2
      src/models/AnswerSheet.js
  19. 1 1
      src/models/TestSet.js
  20. 1 1
      src/pages/User/Profile/classroomInfo.vue

+ 2 - 2
src/components/Widgets/Classroom/AdminClassroomAnswerBookList/AdminClassroomAnswerBookList.vue

@@ -114,11 +114,11 @@ export default {
             field: row => row.test_info.title
           },
           {
-            name: 'test_set_questions_length',
+            name: 'test_questions_length',
             required: true,
             label: 'تعداد سوالات',
             align: 'left',
-            field: row => row.test_info.test_set_questions_length
+            field: row => row.test_info.test_questions_length
           },
           // {
           //   name: 'level',

+ 2 - 2
src/components/Widgets/Classroom/AdminClassroomShow/components/TestList.vue

@@ -109,11 +109,11 @@ export default {
             field: row => row.title
           },
           {
-            name: 'test_set_questions_length',
+            name: 'test_questions_length',
             required: true,
             label: 'تعداد سوالات',
             align: 'left',
-            field: row => row.test_set_info?.test_set_questions ? row.test_set_info.test_set_questions.length : '-'
+            field: row => row.test_set_info?.test_questions ? row.test_set_info.test_questions.length : '-'
           },
           {
             name: 'level',

+ 2 - 2
src/components/Widgets/Classroom/ClassroomAnswerBookList/ClassroomAnswerBookList.vue

@@ -115,11 +115,11 @@ export default {
             field: row => row.test_info.title
           },
           {
-            name: 'test_set_questions_length',
+            name: 'test_questions_length',
             required: true,
             label: 'تعداد سوالات',
             align: 'left',
-            field: row => row.test_info.test_set_questions_length
+            field: row => row.test_info.test_questions_length
           },
           // {
           //   name: 'level',

+ 2 - 2
src/components/Widgets/Other/Shop/ShopCompleteInfo/components/AllQuestions.vue

@@ -38,7 +38,7 @@
       <q-tab-panel v-for="(answerSheet, answerSheetIndex) in answerBook.answer_sheet_info.list"
                    :key="answerSheetIndex"
                    :name="(answerSheetIndex + 1)">
-        <div v-html="'<span>' + (answerSheetIndex + 1) + ' - </span>' + answerSheet.test_set_question_info.question_info.text" />
+        <div v-html="'<span>' + (answerSheetIndex + 1) + ' - </span>' + answerSheet.test_question_info.question_info.text" />
         <div>
           <entity-create v-if="mounted"
                          :ref="'entityCreate_' + answerSheetIndex.toString()"
@@ -105,7 +105,7 @@ export default {
           { type: 'input', name: 'answer_text', label: 'متن پاسخ', placeholder: ' ', value: answerSheetItem.answer_text, inputType: 'textarea', col: 'col-12' },
           { type: 'file', name: 'answer_attachment', label: 'فایل پیوست', placeholder: ' ', value: answerSheetItem.answer_attachment, col: 'col-12' },
           { type: 'hidden', name: 'answer_book', value: this.answerBook.id },
-          { type: 'hidden', name: 'test_set_question', value: answerSheetItem.test_set_question },
+          { type: 'hidden', name: 'test_question', value: answerSheetItem.test_question },
           {
             type: BtnControlComp,
             name: 'btn',

+ 1 - 1
src/components/Widgets/Other/Shop/ShopCompleteInfo/components/ShowEventTest.vue

@@ -71,7 +71,7 @@ export default {
       APIGateway.answerBook.get(this.answerBookId)
         .then((answerBook) => {
           this.localAnswerBook = new AnswerBook(answerBook)
-          if (this.localAnswerBook.test_info.test_set_questions_length === 0) {
+          if (this.localAnswerBook.test_info.test_questions_length === 0) {
             this.$q.notify({
               type: 'negative',
               message: 'لیست سوالات پرسشنامه خالی است.'

+ 4 - 4
src/components/Widgets/Test/AdminAnswerBookShow/AdminAnswerBookShow.vue

@@ -23,7 +23,7 @@
             {{ toShamsi(answerBook.attending_start_time) }}
           </div>
           <div class="col-md-4 col-12">
-            {{ answerBook.test_info.test_set_info.test_set_questions.length }}
+            {{ answerBook.test_info.test_set_info.test_questions.length }}
             سوال
           </div>
           <div class="col-md-4 col-12">
@@ -37,7 +37,7 @@
                 :key="answerSheetIndex"
                 clickable>
           <q-item-section>
-            <q-item-label v-html="'<span>' + (answerSheetIndex + 1) + ' - </span>' + answerSheet.test_set_question_info.question_info.text" />
+            <q-item-label v-html="'<span>' + (answerSheetIndex + 1) + ' - </span>' + answerSheet.test_question_info.question_info.text" />
             <q-item-label>
               <q-card class="q-mt-sm">
                 <q-card-section>
@@ -78,11 +78,11 @@
             <q-badge v-if="answerSheet.score !== null">
               {{ answerSheet.score }}
               از
-              {{ answerSheet.test_set_question_info.question_info.mark }}
+              {{ answerSheet.test_question_info.question_info.mark }}
               نمره
             </q-badge>
             <q-badge v-else>
-              {{ answerSheet.test_set_question_info.question_info.mark }}
+              {{ answerSheet.test_question_info.question_info.mark }}
               نمره
             </q-badge>
           </q-item-section>

+ 4 - 4
src/components/Widgets/Test/ShowTestGradeForGrader/ShowTestGradeForGrader.vue

@@ -23,7 +23,7 @@
             {{ toShamsi(answerBook.attending_start_time) }}
           </div>
           <div class="col-md-4 col-12">
-            {{ answerBook.test_info.test_set_info.test_set_questions.length }}
+            {{ answerBook.test_info.test_set_info.test_questions.length }}
             سوال
           </div>
         </div>
@@ -33,7 +33,7 @@
                 :key="answerSheetIndex"
                 clickable>
           <q-item-section>
-            <q-item-label v-html="'<span>' + (answerSheetIndex + 1) + ' - </span>' + answerSheet.test_set_question_info.question_info.text" />
+            <q-item-label v-html="'<span>' + (answerSheetIndex + 1) + ' - </span>' + answerSheet.test_question_info.question_info.text" />
             <q-item-label>
               <q-card class="q-mt-sm">
                 <q-card-section>
@@ -74,11 +74,11 @@
             <q-badge v-if="answerSheet.score !== null">
               {{ answerSheet.score }}
               از
-              {{ answerSheet.test_set_question_info.question_info.mark }}
+              {{ answerSheet.test_question_info.question_info.mark }}
               نمره
             </q-badge>
             <q-badge v-else>
-              {{ answerSheet.test_set_question_info.question_info.mark }}
+              {{ answerSheet.test_question_info.question_info.mark }}
               نمره
             </q-badge>
           </q-item-section>

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

@@ -18,7 +18,7 @@
             {{ toShamsi(answerBook.attending_start_time) }}
           </div>
           <div class="col-md-4 col-12">
-            {{ answerBook.test_info.test_set_info.test_set_questions.length }}
+            {{ answerBook.test_info.test_set_info.test_questions.length }}
             سوال
           </div>
           <div class="col-md-4 col-12">
@@ -194,7 +194,7 @@ export default {
       APIGateway.answerBook.get(this.$route.params.answer_book_id)
         .then((answerBook) => {
           this.answerBook = new AnswerBook(answerBook)
-          if (this.answerBook.test_info.test_set_questions_length === 0) {
+          if (this.answerBook.test_info.test_questions_length === 0) {
             this.$q.notify({
               type: 'negative',
               message: 'لیست سوالات آزمون خالی است.'

+ 3 - 3
src/components/Widgets/Test/TestParticipation/components/AllQuestions.vue

@@ -1,14 +1,14 @@
 <template>
   <div class="AllQuestions">
     <q-list separator>
-      <!--      <q-item v-for="(question, questionIndex) in answerBook.test_info.test_set_info.test_set_questions"-->
+      <!--      <q-item v-for="(question, questionIndex) in answerBook.test_info.test_set_info.test_questions"-->
       <q-item v-for="(answerSheet, answerSheetIndex) in answerBook.answer_sheet_info.list"
               :key="answerSheetIndex"
               clickable>
-        <q-item-section v-html="'<span>' + (answerSheetIndex + 1) + ' - </span>' + answerSheet.test_set_question_info.question_info.text" />
+        <q-item-section v-html="'<span>' + (answerSheetIndex + 1) + ' - </span>' + answerSheet.test_question_info.question_info.text" />
         <q-item-section side>
           <q-badge>
-            {{ answerSheet.test_set_question_info.question_info.mark }}
+            {{ answerSheet.test_question_info.question_info.mark }}
             نمره
           </q-badge>
         </q-item-section>

+ 8 - 8
src/components/Widgets/Test/TestParticipation/components/SingleQuestion.vue

@@ -68,33 +68,33 @@ export default {
         { type: 'input', name: 'answer_text', label: 'متن پاسخ', placeholder: ' ', inputType: 'textarea', col: 'col-12' },
         { type: 'file', name: 'answer_attachment', label: 'فایل پیوست', placeholder: ' ', col: 'col-12' },
         { type: 'hidden', name: 'answer_book', value: this.answerBook.id },
-        { type: 'hidden', name: 'test_set_question', value: null }
+        { type: 'hidden', name: 'test_question', value: null }
       ]
     }
   },
   computed: {
     hasNextQuestion () {
-      return this.answerBook.test_info.test_set_info.test_set_questions.length > this.questionNumber
+      return this.answerBook.test_info.test_set_info.test_questions.length > this.questionNumber
     },
     hasPrevQuestion () {
       return this.questionNumber > 1
     },
     isLastQuestion () {
-      return this.answerBook.test_info.test_set_info.test_set_questions.length === this.questionNumber
+      return this.answerBook.test_info.test_set_info.test_questions.length === this.questionNumber
     },
     testSetQuestion () {
-      // return this.answerBook.test_info.test_set_info.test_set_questions[this.questionNumber - 1]
-      return this.answerBook.answer_sheet_info.list[this.questionNumber - 1].test_set_question_info
+      // return this.answerBook.test_info.test_set_info.test_questions[this.questionNumber - 1]
+      return this.answerBook.answer_sheet_info.list[this.questionNumber - 1].test_question_info
     },
     question () {
-      // return this.answerBook.test_info.test_set_info.test_set_questions[this.questionNumber - 1]
+      // return this.answerBook.test_info.test_set_info.test_questions[this.questionNumber - 1]
       return this.testSetQuestion.question_info
     }
   },
   mounted () {
     this.setInputs()
     this.mounted = true
-    if (this.answerBook.test_info.test_set_info.test_set_questions.length < this.questionNumber || this.questionNumber < 1) {
+    if (this.answerBook.test_info.test_set_info.test_questions.length < this.questionNumber || this.questionNumber < 1) {
       this.$router.push({ name: 'UserPanel.Test.AnswerBook.Participate.AllQuestions', params: this.$route.params })
     }
   },
@@ -123,7 +123,7 @@ export default {
       FormBuilderAssist.setAttributeByName(this.inputs, 'btnFinal', 'atClick', () => { this.sendAnswer('final') })
       FormBuilderAssist.setAttributeByName(this.inputs, 'btnNext', 'atClick', () => { this.sendAnswer('next') })
       FormBuilderAssist.setAttributeByName(this.inputs, 'btnPrev', 'atClick', () => { this.sendAnswer('prev') })
-      FormBuilderAssist.setAttributeByName(this.inputs, 'test_set_question', 'value', this.testSetQuestion?.id)
+      FormBuilderAssist.setAttributeByName(this.inputs, 'test_question', 'value', this.testSetQuestion?.id)
     },
     sendAnswer (actionType) {
       const answerText = FormBuilderAssist.getInputsByName(this.inputs, 'answer_text').value

+ 4 - 4
src/components/Widgets/Test/TestShow/TestShow.vue

@@ -12,7 +12,7 @@
             {{ toShamsi(answerBook.attending_start_time) }}
           </div>
           <div class="col-md-4 col-12">
-            {{ answerBook.test_info.test_set_info.test_set_questions.length }}
+            {{ answerBook.test_info.test_set_info.test_questions.length }}
             سوال
           </div>
           <div class="col-md-4 col-12">
@@ -26,7 +26,7 @@
                 :key="answerSheetIndex"
                 clickable>
           <q-item-section>
-            <q-item-label v-html="'<span>' + (answerSheetIndex + 1) + ' - </span>' + answerSheet.test_set_question_info.question_info.text" />
+            <q-item-label v-html="'<span>' + (answerSheetIndex + 1) + ' - </span>' + answerSheet.test_question_info.question_info.text" />
             <q-item-label>
               <entity-show v-if="mounted"
                            ref="entityShow"
@@ -46,11 +46,11 @@
             <q-badge v-if="answerSheet.score !== null">
               {{ answerSheet.score }}
               از
-              {{ answerSheet.test_set_question_info.question_info.mark }}
+              {{ answerSheet.test_question_info.question_info.mark }}
               نمره
             </q-badge>
             <q-badge v-else>
-              {{ answerSheet.test_set_question_info.question_info.mark }}
+              {{ answerSheet.test_question_info.question_info.mark }}
               نمره
             </q-badge>
           </q-item-section>

+ 1 - 1
src/components/Widgets/TestSet/AdminEventTestSetCreate/AdminEventTestSetCreate.vue

@@ -54,7 +54,7 @@ export default {
         { type: 'inputEditor', name: 'description', responseKey: 'description', label: 'توضیحات پرسشنامه', col: 'col-md-12 col-12' },
         { type: 'hidden', name: 'type', responseKey: 'type', value: 'QUESTIONNAIRE' },
         { type: BtnControlComp, name: 'btnCreateQuestion', responseKey: 'btnCreateQuestion', label: 'تعریف سوال جدید', placeholder: ' ', atClick: () => {}, col: 'col-12 flex justify-end' },
-        { type: QuestionsSelectorComp, name: 'test_set_questions', responseKey: 'test_set_questions', unitId: false, questionType: 'EVENT', col: 'col-md-12 col-12' },
+        { type: QuestionsSelectorComp, name: 'test_questions', responseKey: 'test_questions', unitId: false, questionType: 'EVENT', col: 'col-md-12 col-12' },
         { type: BtnControlComp, name: 'btn', responseKey: 'btn', label: 'تایید نهایی', placeholder: ' ', atClick: () => {}, col: 'col-12 flex justify-end' }
       ]
     }

+ 2 - 2
src/components/Widgets/TestSet/AdminEventTestSetIndex/AdminEventTestSetIndex.vue

@@ -106,11 +106,11 @@ export default {
             field: row => row.title
           },
           {
-            name: 'test_set_questions.length',
+            name: 'test_questions.length',
             required: true,
             label: 'تعداد سوالات',
             align: 'left',
-            field: row => row.test_set_questions.length
+            field: row => row.test_questions.length
           },
           {
             name: 'beginning_time',

+ 1 - 1
src/components/Widgets/TestSet/AdminEventTestSetShow/AdminEventTestSetShow.vue

@@ -55,7 +55,7 @@ export default {
         { type: 'hidden', name: 'id', responseKey: 'id' },
         { type: 'hidden', name: 'type', responseKey: 'type', value: 'QUESTIONNAIRE' },
         { type: BtnControlComp, name: 'btnCreateQuestion', responseKey: 'btnCreateQuestion', label: 'تعریف سوال جدید', placeholder: ' ', atClick: () => {}, col: 'col-12 flex justify-end' },
-        { type: QuestionsSelectorComp, name: 'test_set_questions', responseKey: 'test_set_questions', unitId: false, questionType: 'EVENT', col: 'col-md-12 col-12' },
+        { type: QuestionsSelectorComp, name: 'test_questions', responseKey: 'test_questions', unitId: false, questionType: 'EVENT', col: 'col-md-12 col-12' },
         { type: BtnControlComp, name: 'btn', responseKey: 'btn', label: 'تایید نهایی', placeholder: ' ', atClick: () => {}, col: 'col-12 flex justify-end' }
       ]
     }

+ 1 - 1
src/components/Widgets/TestSet/AdminTestSetCreate/AdminTestSetCreate.vue

@@ -54,7 +54,7 @@ export default {
         { type: 'input', name: 'title', responseKey: 'title', label: 'عنوان آزمون', placeholder: ' ', col: 'col-md-6 col-12' },
         { type: 'inputEditor', name: 'description', responseKey: 'description', label: 'توضیحات آزمون', col: 'col-md-12 col-12' },
         { type: 'hidden', name: 'unit', responseKey: 'unit', value: unitId },
-        { type: QuestionsSelectorComp, name: 'test_set_questions', responseKey: 'test_set_questions', unitId, col: 'col-md-12 col-12' },
+        { type: QuestionsSelectorComp, name: 'test_questions', responseKey: 'test_questions', unitId, col: 'col-md-12 col-12' },
         { type: BtnControlComp, name: 'btn', responseKey: 'btn', label: 'تایید نهایی', placeholder: ' ', atClick: () => {}, col: 'col-12 flex justify-end' }
       ]
     }

+ 2 - 2
src/components/Widgets/TestSet/AdminTestSetIndex/AdminTestSetIndex.vue

@@ -96,11 +96,11 @@ export default {
             field: row => row.title
           },
           {
-            name: 'test_set_questions.length',
+            name: 'test_questions.length',
             required: true,
             label: 'تعداد سوالات',
             align: 'left',
-            field: row => row.test_set_questions.length
+            field: row => row.test_questions.length
           },
           {
             name: 'level',

+ 1 - 1
src/components/Widgets/TestSet/AdminTestSetShow/AdminTestSetShow.vue

@@ -55,7 +55,7 @@ export default {
         { type: 'inputEditor', name: 'description', responseKey: 'description', label: 'توضیحات آزمون', col: 'col-md-12 col-12' },
         { type: 'hidden', name: 'id', responseKey: 'id' },
         { type: 'hidden', name: 'unit', responseKey: 'unit' },
-        { type: QuestionsSelectorComp, name: 'test_set_questions', responseKey: 'test_set_questions', unitId, col: 'col-md-12 col-12' },
+        { type: QuestionsSelectorComp, name: 'test_questions', responseKey: 'test_questions', unitId, col: 'col-md-12 col-12' },
         { type: BtnControlComp, name: 'btn', responseKey: 'btn', label: 'تایید نهایی', placeholder: ' ', atClick: () => {}, col: 'col-12 flex justify-end' }
       ]
     }

+ 2 - 2
src/models/AnswerSheet.js

@@ -8,9 +8,9 @@ class AnswerSheet extends Model {
       { key: 'answer_text' },
       { key: 'answer_attachment' },
       { key: 'score' },
-      { key: 'test_set_question' },
+      { key: 'test_question' },
       {
-        key: 'test_set_question_info',
+        key: 'test_question_info',
         relatedModel: TestSetQuestion
       }
     ])

+ 1 - 1
src/models/TestSet.js

@@ -9,7 +9,7 @@ class TestSet extends Model {
       { key: 'level' },
       { key: 'unit' },
       {
-        key: 'test_set_questions',
+        key: 'test_questions',
         default: []
       }
     ], {

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

@@ -648,7 +648,7 @@ export default {
             required: true,
             label: 'تعداد سوالات',
             align: 'left',
-            field: row => row.test_info?.test_set_questions_length
+            field: row => row.test_info?.test_questions_length
           },
           {
             name: 'grade',