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
98907d9e
Commit
98907d9e
authored
Mar 05, 2020
by
Иван Кубота
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix do not contain generated
parent
15ad0f7f
Pipeline
#564
failed with stage
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
4 deletions
+15
-4
db.js
db.js
+10
-2
checkbox.js
public/js/controller/quizBits/checkbox.js
+5
-2
No files found.
db.js
View file @
98907d9e
...
...
@@ -443,7 +443,9 @@ data = {tags:[], connections:[], more:[], standardQuestions: {}, standardAnswers
data
.
more
=
data
.
more
||
[];
var
tid
=
1
,
cid
=
1
;
var
tagsHash
=
{};
/*data.more = data.more.concat([
{c: 'top-35-march-c.csv', q: 'top-35-march-q.csv', a: 'top-35-march-a.csv'}
])*/
data
.
more
=
data
.
more
.
concat
([
{
p
:
'1cards_2020_02_28.csv'
,
i
:
'1components.csv'
},
{
q
:
'2questions.csv'
,
a
:
'2answers.csv'
,
c
:
'2cards_2020_2_21.csv'
},
...
...
@@ -461,6 +463,11 @@ data = {tags:[], connections:[], more:[], standardQuestions: {}, standardAnswers
data
.
connections
=
[];
data
.
standardQuestions
=
{};
}
else
{
data
.
products
=
{};
data
.
components
=
{};
data
.
tags
=
[];
data
.
connections
=
[];
data
.
standardQuestions
=
{};
for
(
let
i
=
0
,
_i
=
data
.
more
.
length
;
i
<
_i
;
i
++
){
var
adishen
=
i
*
300
;
...
...
@@ -557,7 +564,6 @@ data = {tags:[], connections:[], more:[], standardQuestions: {}, standardAnswers
image
:
String
},
postProcess
:
(
a
,
inc
)
=>
{
if
(
a
.
description
.
trim
()
===
''
)
return
false
;
a
.
id
=
adishen
+
a
.
id
;
...
...
@@ -580,6 +586,8 @@ data = {tags:[], connections:[], more:[], standardQuestions: {}, standardAnswers
},
index
:
'id'
})
console
.
log
(
JSON
.
stringify
(
Object
.
values
(
was
),
null
,
2
));
}
if
(
moreElement
.
q
){
const
Q
=
await
readCSV
(
{
...
...
public/js/controller/quizBits/checkbox.js
View file @
98907d9e
...
...
@@ -53,14 +53,17 @@ quizTypes.checkbox = [ ComponentsOfProduct = {
log
.
push
(
'Generate Answers by `Select components of product` subroutine'
);
const
result
=
ComponentsOfProduct
.
answer
.
call
(
this
,
income
,
log
);
log
.
push
(
'Reversing'
);
const
reversed
=
result
.
map
(
a
=>
a
instanceof
Answer
.
Correct
?
new
Answer
.
Wrong
(
a
.
text
)
:
new
Answer
.
Correct
(
a
.
text
));
const
right
=
reversed
.
filter
(
a
=>
a
instanceof
Answer
.
Correct
),
wrong
=
reversed
.
filter
(
a
=>
a
instanceof
Answer
.
Wrong
);
return
shuffle
(
right
.
concat
(
wrong
.
slice
(
0
,
Math
.
min
(
this
.
wrong
.
max
,
this
.
realMaxAnswers
-
right
.
length
))));
const
out
=
shuffle
(
right
.
concat
(
wrong
.
slice
(
0
,
Math
.
min
(
this
.
wrong
.
max
,
this
.
realMaxAnswers
-
right
.
length
))));
if
(
right
.
length
===
0
)
return
false
;
return
out
;
}
}),
{
...
...
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