Commit 3cf91d0d by Иван Кубота

category pass through

parent 30cec291
Pipeline #536 canceled with stage
......@@ -67,6 +67,7 @@ data = {tags, connections, more:[]};
postProcess: (a) => {
a.answers = [];
a.multiple = a.multiple === 'checkbox';
a.category = 2;
},
index: 'qID'
});
......@@ -148,7 +149,7 @@ data = {tags, connections, more:[]};
title: String,
image: String,
multiple: String,
category: String,
category: Number,
answer_type: String
},
postProcess: (a) => {
......
......@@ -63,9 +63,10 @@ const standardGenerator = function(random) {
q.answers.forEach(
a =>
log.push((a.correct?'+':' ')+` > ${a.title}`));
return {
type: q.multiple ? 'checkbox': 'radio',
categoryId: 2,
categoryId: q.category,
productId: q.cardInfoID,
question: textFormat(q.title),
answers: shuffle(q.answers.map(a =>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment