|
|
@@ -127,7 +127,7 @@ export default {
|
|
|
},
|
|
|
|
|
|
async handleAckButtonClick() {
|
|
|
- if(this.checkFormCompletion()){
|
|
|
+ if (this.checkFormCompletion()) {
|
|
|
let questionVO = this.formatQuestionVO2backend();
|
|
|
let res = await this.$api.createQuestion(questionVO);
|
|
|
console.log(res);
|
|
|
@@ -289,6 +289,10 @@ export default {
|
|
|
for (let option of this.form.options) {
|
|
|
options[option.label] = option.content;
|
|
|
}
|
|
|
+ let multi_answer;
|
|
|
+ if (this.form.type === 2) {
|
|
|
+ multi_answer = this.form.multi_answer.sort().join("");
|
|
|
+ }
|
|
|
let knowledgeId = [];
|
|
|
for (let knowledgeIdElement of this.form.knowledgeId) {
|
|
|
knowledgeId.push(knowledgeIdElement[knowledgeIdElement.length - 1]);
|
|
|
@@ -296,12 +300,10 @@ export default {
|
|
|
let tags = [this.form.tags];
|
|
|
|
|
|
return {
|
|
|
- ...this.form,
|
|
|
stem: this.form.stem,
|
|
|
type,
|
|
|
options,
|
|
|
- answer: this.form.answer,
|
|
|
- multi_answer: this.form.multi_answer,
|
|
|
+ answer: (this.form.type !== 2) ? this.form.answer : multi_answer,
|
|
|
analysis: this.form.analysis,
|
|
|
difficulty: this.form.difficulty,
|
|
|
knowledgeId,
|