Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
kus-admin
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Кубота
kus-admin
Commits
3cf91d0d
Commit
3cf91d0d
authored
Jan 21, 2020
by
Иван Кубота
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
category pass through
parent
30cec291
Pipeline
#536
canceled with stage
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
db.js
db.js
+2
-1
quizGenerator.js
public/js/controller/quizGenerator.js
+2
-1
No files found.
db.js
View file @
3cf91d0d
...
...
@@ -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
)
=>
{
...
...
public/js/controller/quizGenerator.js
View file @
3cf91d0d
...
...
@@ -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
=>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment