lsc 1 year ago
parent
commit
e919741375

+ 78 - 23
src/components/pages/aiAddCourse/addCourse.vue

@@ -393,7 +393,7 @@
                     <div class="add_info_box" style="margin: 0 0 0 auto">
                     <div class="add_info_box" style="margin: 0 0 0 auto">
                       <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
                       <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
                         上传补充资料
                         上传补充资料
-                        <input type="file" accept="*" style="display: none" v-if="inputShow" @change="
+                        <input type="file" accept=".docx,.doc,.ppt,.pptx,.md,.txt" style="display: none" v-if="inputShow" @change="
                           beforeUploadInfo2(
                           beforeUploadInfo2(
                             $event,
                             $event,
                             13
                             13
@@ -677,13 +677,18 @@
                 <div class="task_outline">
                 <div class="task_outline">
                   <div class="outline_detail" v-loading="cpoteLoading.cpote1">
                   <div class="outline_detail" v-loading="cpoteLoading.cpote1">
                     <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols placeholder="请输入概念群"
                     <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols placeholder="请输入概念群"
-                      v-model="cpote.cpote1"></textarea>
+                      v-model="cpote.cpote1" v-if="cpote.cpote1s"></textarea>
+                    <div class="markBox" v-html="MarkdownT(cpote.cpote1)" v-else></div>
                     <div class="op_box">
                     <div class="op_box">
                       <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
                       <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
-                      <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
-                        <div class="r_pub_button_op" @contextmenu.prevent="openAiDialog(1, 'aiCpote1')"
+                      <div style="display: flex;">
+                          <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
+                            <div class="r_pub_button_op" @contextmenu.prevent="openAiDialog(1, 'aiCpote1')"
                             @click="openAiDialog(2, 'aiCpote1')">智能优化</div>
                             @click="openAiDialog(2, 'aiCpote1')">智能优化</div>
-                      </el-tooltip>
+                          </el-tooltip>
+                          <div class="r_pub_button_edit" style="margin-left:10px" @click="editCpote('cpote1s')">{{
+                            cpote.cpote1s ? '确定' : '编辑'}}</div>
+                      </div>
                     </div>
                     </div>
                   </div>
                   </div>
                 </div>
                 </div>
@@ -697,13 +702,18 @@
                 <div class="task_outline">
                 <div class="task_outline">
                   <div class="outline_detail" v-loading="cpoteLoading.cpote2">
                   <div class="outline_detail" v-loading="cpoteLoading.cpote2">
                     <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols placeholder="请输入问题链"
                     <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols placeholder="请输入问题链"
-                      v-model="cpote.cpote2"></textarea>
+                      v-model="cpote.cpote2" v-if="cpote.cpote2s"></textarea>
+                    <div class="markBox" v-html="MarkdownT(cpote.cpote2)" v-else></div>
                     <div class="op_box">
                     <div class="op_box">
                       <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
                       <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
-                      <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
-                        <div class="r_pub_button_op" @contextmenu.prevent="openAiDialog(1, 'aiCpote2')"
-                            @click="openAiDialog(2, 'aiCpote2')">智能优化</div>
-                      </el-tooltip>
+                      <div style="display: flex;">
+                          <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
+                            <div class="r_pub_button_op" @contextmenu.prevent="openAiDialog(1, 'aiCpote2')"
+                            @click="openAiDialog(2, 'aiCpote1')">智能优化</div>
+                          </el-tooltip>
+                          <div class="r_pub_button_edit" style="margin-left:10px" @click="editCpote('cpote2s')">{{
+                            cpote.cpote2s ? '确定' : '编辑'}}</div>
+                      </div>
                     </div>
                     </div>
                   </div>
                   </div>
                 </div>
                 </div>
@@ -717,13 +727,18 @@
                 <div class="task_outline">
                 <div class="task_outline">
                   <div class="outline_detail" v-loading="cpoteLoading.cpote3">
                   <div class="outline_detail" v-loading="cpoteLoading.cpote3">
                     <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols placeholder="请输入目标层"
                     <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols placeholder="请输入目标层"
-                      v-model="cpote.cpote3"></textarea>
+                      v-model="cpote.cpote3" v-if="cpote.cpote3s"></textarea>
+                    <div class="markBox" v-html="MarkdownT(cpote.cpote3)" v-else></div>
                     <div class="op_box">
                     <div class="op_box">
                       <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
                       <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
-                      <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
-                        <div class="r_pub_button_op" @contextmenu.prevent="openAiDialog(1, 'aiCpote3')"
+                      <div style="display: flex;">
+                          <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
+                            <div class="r_pub_button_op" @contextmenu.prevent="openAiDialog(1, 'aiCpote3')"
                             @click="openAiDialog(2, 'aiCpote3')">智能优化</div>
                             @click="openAiDialog(2, 'aiCpote3')">智能优化</div>
-                      </el-tooltip>
+                          </el-tooltip>
+                          <div class="r_pub_button_edit" style="margin-left:10px" @click="editCpote('cpote3s')">{{
+                            cpote.cpote3s ? '确定' : '编辑'}}</div>
+                      </div>
                     </div>
                     </div>
                   </div>
                   </div>
                 </div>
                 </div>
@@ -737,13 +752,18 @@
                 <div class="task_outline">
                 <div class="task_outline">
                   <div class="outline_detail" v-loading="cpoteLoading.cpote4">
                   <div class="outline_detail" v-loading="cpoteLoading.cpote4">
                     <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols placeholder="请输入任务簇"
                     <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols placeholder="请输入任务簇"
-                      v-model="cpote.cpote4"></textarea>
+                      v-model="cpote.cpote4" v-if="cpote.cpote4s"></textarea>
+                      <div class="markBox" v-html="MarkdownT(cpote.cpote4)" v-else></div>
                     <div class="op_box">
                     <div class="op_box">
                       <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
                       <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
-                      <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
-                        <div class="r_pub_button_op" @contextmenu.prevent="openAiDialog(1, 'aiCpote4')"
+                      <div style="display: flex;">
+                          <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
+                            <div class="r_pub_button_op" @contextmenu.prevent="openAiDialog(1, 'aiCpote4')"
                             @click="openAiDialog(2, 'aiCpote4')">智能优化</div>
                             @click="openAiDialog(2, 'aiCpote4')">智能优化</div>
-                      </el-tooltip>
+                          </el-tooltip>
+                          <div class="r_pub_button_edit" style="margin-left:10px" @click="editCpote('cpote4s')">{{
+                            cpote.cpote4s ? '确定' : '编辑'}}</div>
+                      </div>
                     </div>
                     </div>
                   </div>
                   </div>
                 </div>
                 </div>
@@ -1498,9 +1518,9 @@
                         <button class="c_pub_button_add pub_btn_add_img" @click="createTeacherAn(0)">
                         <button class="c_pub_button_add pub_btn_add_img" @click="createTeacherAn(0)">
                           AI生成教案
                           AI生成教案
                         </button>
                         </button>
-                        <!-- <button class="c_pub_button_add pub_btn_add_img" @click="openAiCreateVideo(0)">
+                        <button class="c_pub_button_add pub_btn_add_img" @click="openAiCreateVideo(0)">
                           AI生成视频
                           AI生成视频
-                        </button> -->
+                        </button>
                       </div>
                       </div>
                       <div v-if="
                       <div v-if="
                         unitJson[unitIndex].chapterInfo[0].taskJson[
                         unitJson[unitIndex].chapterInfo[0].taskJson[
@@ -5219,7 +5239,7 @@
     <tipsDialog :dialogVisibleTips.sync="dialogVisibleTips" :tipsJson.sync="tipsJson" :aiJson="aiJson" :userid="userid"
     <tipsDialog :dialogVisibleTips.sync="dialogVisibleTips" :tipsJson.sync="tipsJson" :aiJson="aiJson" :userid="userid"
       @retrunCourse="retrunCourse" :templateid="templateid"></tipsDialog>
       @retrunCourse="retrunCourse" :templateid="templateid"></tipsDialog>
     <aiCreateDialog :dialogVisibleAiCreate.sync="dialogVisibleAiCreate" :courseName="courseName" @createAiPpt="createAiPpt" :infoData="infoData"></aiCreateDialog>
     <aiCreateDialog :dialogVisibleAiCreate.sync="dialogVisibleAiCreate" :courseName="courseName" @createAiPpt="createAiPpt" :infoData="infoData"></aiCreateDialog>
-    <aiCreateVideoDialog :dialogVisibleAiCreateVideo.sync="dialogVisibleAiCreateVideo" :courseName="courseName"></aiCreateVideoDialog>
+    <aiCreateVideoDialog :dialogVisibleAiCreateVideo.sync="dialogVisibleAiCreateVideo" :courseName="courseName" @createAiVideo="createAiVideo"></aiCreateVideoDialog>
   </div>
   </div>
 </template>
 </template>
 
 
@@ -6859,6 +6879,10 @@ export default {
     openAiCreateVideo(){
     openAiCreateVideo(){
       this.dialogVisibleAiCreateVideo = true;
       this.dialogVisibleAiCreateVideo = true;
     },
     },
+    createAiVideo(json){
+      this.unitJson[0].chapterInfo[0].taskJson[0].chapterData.push(json);
+      this.dialogVisibleAiCreateVideo = false;
+    },
     createTeacherAn(){
     createTeacherAn(){
       this.loading = true
       this.loading = true
       let md = new MarkdownIt();
       let md = new MarkdownIt();
@@ -7566,6 +7590,22 @@ export default {
 
 
       var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
       var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
       var _this = this;
       var _this = this;
+      var xianObj = ['DOCX','DOC','PPT','PPTX','MD','TXT']
+      if (
+        xianObj.indexOf(
+            file.name
+              .split(".")
+            [file.name.split(".").length - 1].toLocaleUpperCase()
+          ) == -1
+        ) {
+        this.$message.error("请上传.doc,.docx,.ppt,.pptx,.md,.txt文件!");
+        this.inputShow = true;
+        // var a = _this.$refs.upload1.uploadFiles;
+        // a.splice(a.length - 1, a.length);
+        // loading.close();
+        return;
+      }
+
       if (type == 3) {
       if (type == 3) {
         var b = [
         var b = [
           "DOC",
           "DOC",
@@ -7613,6 +7653,7 @@ export default {
           }
           }
         }
         }
       }
       }
+      
       this.inputShow = false;
       this.inputShow = false;
       _this.infoprogress = 0;
       _this.infoprogress = 0;
       _this.infoproVisible = true;
       _this.infoproVisible = true;
@@ -10964,11 +11005,17 @@ export default {
           .then((res) => {
           .then((res) => {
             let _unitJson = JSON.parse(res.data[0][0].chapters);
             let _unitJson = JSON.parse(res.data[0][0].chapters);
             let fileInfo = []
             let fileInfo = []
+            var xianObj = ['DOCX','DOC','PPT','PPTX','MD','TXT']
+
             for(var i = 0; i < _unitJson.length; i++){
             for(var i = 0; i < _unitJson.length; i++){
               let tasks = _unitJson[i].chapterInfo[0].taskJson
               let tasks = _unitJson[i].chapterInfo[0].taskJson
               for(var j = 0; j < tasks.length; j++){
               for(var j = 0; j < tasks.length; j++){
-                if(tasks[j].chapterData.length){
-                  fileInfo = [...fileInfo, ...tasks[j].chapterData] 
+                let _infoData = tasks[j].chapterData.filter(el => {
+                  return xianObj.indexOf(el.url.split(".")[el.url.split(".").length - 1].toLocaleUpperCase()) != -1
+                })
+
+                if(_infoData.length){
+                  fileInfo = [...fileInfo, ..._infoData] 
                 }
                 }
               }
               }
             }
             }
@@ -12890,6 +12937,14 @@ export default {
       }
       }
       this.$forceUpdate();
       this.$forceUpdate();
     },
     },
+    editCpote(index){
+      if(this.cpote[index]){
+        this.cpote[index] = false
+      }else {
+        this.cpote[index] = true
+      }
+      this.$forceUpdate();
+    },
     openAiDialog(clickType, type, callback, index, tindex) {
     openAiDialog(clickType, type, callback, index, tindex) {
       if (this.courseName == "") {
       if (this.courseName == "") {
         this.$message.error("请补充填写课程名称");
         this.$message.error("请补充填写课程名称");

+ 8 - 3
src/components/pages/aiAddCourse/aiCreateDialog.vue

@@ -267,9 +267,14 @@ Instruction: Based on the context, follow "Format example", write content.
                     } catch (e) {
                     } catch (e) {
                         console.log('error_________________'+e);
                         console.log('error_________________'+e);
                         // _this.$message.error(data.message)
                         // _this.$message.error(data.message)
-                        _this.$message.error('生成失败,正在重新生成')
-                        _this.aiGet()
-                        _this.loading = false
+                        try {
+                            let _data = JSON.parse(data.message.match(/(?<=```json).*?(?=```)/)[0])
+                            _this.createPpt(_data)
+                        } catch (error) {
+                            _this.$message.error('生成失败,正在重新生成')
+                            _this.aiGet()
+                            _this.loading = false   
+                        }
                     }
                     }
                 }
                 }
                 })
                 })

+ 48 - 8
src/components/pages/aiAddCourse/aiCreateVideoDialog.vue

@@ -14,12 +14,16 @@
                     <img :src="item.snippet.thumbnails.high.url" />
                     <img :src="item.snippet.thumbnails.high.url" />
                     <span class="name">{{ item.snippet.title }}</span> 
                     <span class="name">{{ item.snippet.title }}</span> 
                     <span class="detail">{{ item.snippet.description }}</span> 
                     <span class="detail">{{ item.snippet.description }}</span> 
+                    <div class="btn">
+                        <span @click="openUrl(item.id.videoId)">查看</span>
+                        <span @click="checkUrl(item.snippet.title,item.id.videoId)">选择</span>
+                    </div>
                 </div>
                 </div>
             </div>
             </div>
         </div>
         </div>
         <span slot="footer" class="dialog-footer">
         <span slot="footer" class="dialog-footer">
             <!-- <el-button @click="aiGet" type="primary">重新生成</el-button> -->
             <!-- <el-button @click="aiGet" type="primary">重新生成</el-button> -->
-            <el-button @click="confirm" type="primary">确 定</el-button>
+            <!-- <el-button @click="confirm" type="primary">确 定</el-button> -->
             <el-button @click="close">关 闭</el-button>
             <el-button @click="close">关 闭</el-button>
         </span>
         </span>
     </el-dialog>
     </el-dialog>
@@ -87,12 +91,18 @@ export default {
         close() {
         close() {
             this.$emit('update:dialogVisibleAiCreateVideo', false)
             this.$emit('update:dialogVisibleAiCreateVideo', false)
         },
         },
-        confirm() {
-            if (this.url) {
-                this.$emit('createAiPpt', this.uJson)
-            } else {
-                this.$message.error('请先生成ppt');
+        openUrl(url){
+            window.open('http://www.youtube.com/watch?v='+url)
+        },
+        checkUrl(name,id) {
+            let json = {
+                name: "链接",
+                title: name,
+                url: 'http://www.youtube.com/watch?v='+id,
+                type: 8,
+                name: "链接",
             }
             }
+            this.$emit('createAiVideo', json)
         },
         },
         changeRadio() {
         changeRadio() {
             if (this.radio == 0) {
             if (this.radio == 0) {
@@ -238,11 +248,11 @@ export default {
 }
 }
 .video_box {
 .video_box {
     width: calc(100% / 2 - 10px);
     width: calc(100% / 2 - 10px);
-    overflow: hidden;
+    /* overflow: hidden; */
     margin-right: 10px;
     margin-right: 10px;
     display: flex;
     display: flex;
     flex-direction: column;
     flex-direction: column;
-    margin-bottom: 10px;
+    margin-bottom: 15px;
     cursor: pointer;
     cursor: pointer;
 }
 }
 .video_box > img{
 .video_box > img{
@@ -256,5 +266,35 @@ export default {
 .video_box > .name{
 .video_box > .name{
     color: #000;
     color: #000;
     margin: 5px 0;
     margin: 5px 0;
+    height: 32px;
+}
+
+.btn{
+    width: 100%;
+    height: 35px;
+    display: flex;
+    align-items: center;
+    margin-top: auto;
+}
+
+.btn > span:hover{
+    background: #4087f1;
+}
+
+.btn > span{
+    width: 100%;
+    height: 100%;
+    background: #3681fc;
+    color: #fff;
+    border-radius: 5px;
+    margin-top: 10px;
+    cursor: pointer;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+}
+
+.btn > span + span{
+    margin-left: 10px;
 }
 }
 </style>
 </style>

+ 5 - 5
src/components/pages/test/check/index.vue

@@ -965,8 +965,8 @@ export default {
 					_result+=i1.array[_index].json.answer2
 					_result+=i1.array[_index].json.answer2
 					_sum+=1;
 					_sum+=1;
 				})
 				})
-				_result=(_result/_sum).toFixed(2)
-				return _result;
+				_result = _sum ? (_result/_sum).toFixed(2) : 0
+				return _result ? _result : 0;
 			}
 			}
 		}
 		}
   },
   },
@@ -1134,7 +1134,7 @@ export default {
                 let _json2 = _json[ja].json
                 let _json2 = _json[ja].json
                 if (_json[ja].type == 6) {
                 if (_json[ja].type == 6) {
                   let _cjson = await this.getCourse(_json2.answer2)
                   let _cjson = await this.getCourse(_json2.answer2)
-                  _json2.answer2 =  _cjson.title
+                  _json2.answer2 =  _cjson ? _cjson.title : ''
                 }
                 }
               }
               }
               array.push({
               array.push({
@@ -1182,7 +1182,7 @@ export default {
               topic.array = _answer
               topic.array = _answer
               topic.courseArray = [];
               topic.courseArray = [];
 							let params = {
 							let params = {
-								cid:topic.array.join(",")
+								cid:topic.array ? topic.array.join(",") : ''
 							}
 							}
 
 
 							let data = await this.ajax.get(this.$store.state.api + 'getCourseInfoTestAll',params);
 							let data = await this.ajax.get(this.$store.state.api + 'getCourseInfoTestAll',params);
@@ -1742,7 +1742,7 @@ export default {
           }
           }
         } else if (item.type == 6 && item.json.answer2) {
         } else if (item.type == 6 && item.json.answer2) {
             let _cjson = await this.getCourse(item.json.answer2)
             let _cjson = await this.getCourse(item.json.answer2)
-            let _option = `<div style='margin:10px 0 0 40px;'>打分课程:${_cjson.title}</div>`
+            let _option = `<div style='margin:10px 0 0 40px;'>打分课程:${ _cjson ? _cjson.title : ''}</div>`
             _test += _option
             _test += _option
         } else if (item.type == 7 && item.json.answer2 ) {
         } else if (item.type == 7 && item.json.answer2 ) {
             let _score = this.getScore2(item.json)
             let _score = this.getScore2(item.json)

+ 1 - 1
src/components/pages/test/shareBox/index.vue

@@ -95,7 +95,7 @@ export default {
             if (this.TeachingValue == '') {
             if (this.TeachingValue == '') {
                 return this.testJson.juriP ? this.testJson.juriP : '所有人'
                 return this.testJson.juriP ? this.testJson.juriP : '所有人'
             }else{
             }else{
-                return this.TeachName[0].name
+                return this.TeachName ? this.TeachName[0].name :'所有人'
             }
             }
         }
         }
     },
     },

+ 1 - 1
src/components/pages/testStudent/view/component/topic.vue

@@ -262,7 +262,7 @@ export default {
         let checkArray = _json.filter((item) => {
         let checkArray = _json.filter((item) => {
           if (item.array) {
           if (item.array) {
             item.array = item.array.filter((item2) => {
             item.array = item.array.filter((item2) => {
-              if (item2.ttype == 1 && item2.json && !item2.json.answer2 && item2.type != 6 && item.type != 7 && item.type != 8) {
+              if (item2.ttype == 1 && item2.json && !item2.json.answer2 && item2.type != 6 && item2.type != 7 && item2.type != 8) {
                 item2.json.answer2 = [];
                 item2.json.answer2 = [];
               } else if (item2.ttype == 1 && item2.json && !item2.json.answer2 && item2.type == 6) {
               } else if (item2.ttype == 1 && item2.json && !item2.json.answer2 && item2.type == 6) {
                 item2.json.answer2 = this.gcourseid ? this.gcourseid : item2.json.courses[0];
                 item2.json.answer2 = this.gcourseid ? this.gcourseid : item2.json.courses[0];

+ 6 - 6
src/components/pages/testStudent/view/preview.vue

@@ -407,20 +407,20 @@ export default {
       let checkArray = _json.filter((item) => {
       let checkArray = _json.filter((item) => {
         if (item.array) {
         if (item.array) {
           item.array = item.array.filter((item2) => {
           item.array = item.array.filter((item2) => {
-            if (item2.ttype == 1 && item2.json && !item2.json.answer2 && item2.type != 6 && item2.type != 7) {
+            if (item2.ttype == 1 && item2.json && !item2.json.answer2 && item2.type != 6 && item2.type != 7 && item2.type != 8) {
               item2.json.answer2 = [];
               item2.json.answer2 = [];
             }else if(item2.type == 6){
             }else if(item2.type == 6){
               item2.json.answer2 = this.courseid ? this.courseid : '';
               item2.json.answer2 = this.courseid ? this.courseid : '';
-            }else if(item2.type == 7){
+            }else if(item2.type == 7 || item2.type == 8){
               item2.json.answer2 = '';
               item2.json.answer2 = '';
             }
             }
             if (item2.array) {
             if (item2.array) {
               item2.array = item2.array.filter((item3) => {
               item2.array = item2.array.filter((item3) => {
-                if (item3.ttype == 1 && item3.json && !item3.json.answer2 && item3.type != 6 && item3.type != 7) {
+                if (item3.ttype == 1 && item3.json && !item3.json.answer2 && item3.type != 6 && item3.type != 7 && item3.type != 8) {
                   item3.json.answer2 = [];
                   item3.json.answer2 = [];
                 }else if(item3.type == 6){
                 }else if(item3.type == 6){
                   item3.json.answer2 = this.courseid ? this.courseid : '';
                   item3.json.answer2 = this.courseid ? this.courseid : '';
-                }else if(item3.type == 7){
+                }else if(item3.type == 7 || item3.type == 8){
                   item3.json.answer2 = '';
                   item3.json.answer2 = '';
                 }
                 }
                 return item3;
                 return item3;
@@ -431,11 +431,11 @@ export default {
             );
             );
           });
           });
         }
         }
-        if (item.ttype == 1 && item.json && !item.json.answer2 && item.type != 6 && item.type != 6 && item.type != 7) {
+        if (item.ttype == 1 && item.json && !item.json.answer2 && item.type != 6 && item.type != 6 && item.type != 7 && item.type != 8) {
           item.json.answer2 = [];
           item.json.answer2 = [];
         }else if(item.type == 6){
         }else if(item.type == 6){
           item.json.answer2 = this.courseid ? this.courseid : '';
           item.json.answer2 = this.courseid ? this.courseid : '';
-        }else if(item.type == 7){
+        }else if(item.type == 7 || item.type == 8){
           item.json.answer2 = '';
           item.json.answer2 = '';
         }
         }
         console.log(item.array);
         console.log(item.array);