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
4f3a860c
Commit
4f3a860c
authored
Mar 06, 2020
by
Иван Кубота
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
0299c626
Pipeline
#567
failed with stage
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
generateRandom.js
src/api/generateRandom.js
+10
-2
No files found.
src/api/generateRandom.js
View file @
4f3a860c
...
@@ -528,7 +528,13 @@ module.exports = {
...
@@ -528,7 +528,13 @@ module.exports = {
if
(
(
args
.
type
!==
void
0
?
args
.
type
===
2
:
seeded
()
>
0.5
)
){
if
(
(
args
.
type
!==
void
0
?
args
.
type
===
2
:
seeded
()
>
0.5
)
){
result
=
ctx
.
standardGenerator
(
()
=>
rand
(
1
,
countStdQ
)
)
result
=
ctx
.
standardGenerator
(
()
=>
rand
(
1
,
countStdQ
)
)
}
else
{
}
else
{
result
=
ctx
.
quizGenerator
(
multiple
?
'checkbox'
:
'radio'
,
args
.
photo
!==
void
0
?
args
.
photo
:
photo
);
result
=
ctx
.
quizGenerator
(
multiple
?
'checkbox'
:
'radio'
,
args
.
photo
!==
void
0
?
args
.
photo
:
photo
,
(
p
)
=>
{
return
p
.
use
||
p
.
is_test
}
);
}
}
if
(
result
&&
args
.
exclude
){
if
(
result
&&
args
.
exclude
){
if
(
args
.
exclude
.
filter
((
a
)
=>
a
.
categoryId
===
result
.
categoryId
&&
a
.
productId
===
result
.
productId
).
length
){
if
(
args
.
exclude
.
filter
((
a
)
=>
a
.
categoryId
===
result
.
categoryId
&&
a
.
productId
===
result
.
productId
).
length
){
...
@@ -667,7 +673,9 @@ module.exports = {
...
@@ -667,7 +673,9 @@ module.exports = {
);
);
}
}
if
(
result
){
if
(
result
&&
!
(
result
.
categoryId
+
'.'
+
result
.
productId
in
used
)){
used
[
result
.
categoryId
+
'.'
+
result
.
productId
]
=
true
;
list
.
push
(
result
);
list
.
push
(
result
);
generated
++
;
generated
++
;
}
}
...
...
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