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
a98f97f6
Commit
a98f97f6
authored
Feb 17, 2020
by
Иван Кубота
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change unprobable questions to radioPhoto
parent
d4c30fea
Pipeline
#555
failed with stage
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
2 deletions
+9
-2
checkbox.js
public/js/controller/quizBits/checkbox.js
+1
-1
quizGenerator.js
public/js/controller/quizGenerator.js
+8
-1
No files found.
public/js/controller/quizBits/checkbox.js
View file @
a98f97f6
...
@@ -64,7 +64,7 @@ quizTypes.checkbox = [ ComponentsOfProduct = {
...
@@ -64,7 +64,7 @@ quizTypes.checkbox = [ ComponentsOfProduct = {
}
}
}),
}),
{
{
probability
:
10
,
//10,
probability
:
0
,
//
10,//10,
correct
:
{
min
:
2
,
max
:
4
},
correct
:
{
min
:
2
,
max
:
4
},
wrong
:
{
min
:
1
,
max
:
3
},
wrong
:
{
min
:
1
,
max
:
3
},
answers
:
{
min
:
4
,
max
:
6
},
answers
:
{
min
:
4
,
max
:
6
},
...
...
public/js/controller/quizGenerator.js
View file @
a98f97f6
...
@@ -91,7 +91,14 @@ const quizGenerator = function(type, photo, subType) {
...
@@ -91,7 +91,14 @@ const quizGenerator = function(type, photo, subType) {
if
(
attempt
===
0
){
if
(
attempt
===
0
){
const
types
=
quizTypes
[
type
+
(
photo
?
'Photo'
:
''
)];
const
types
=
quizTypes
[
type
+
(
photo
?
'Photo'
:
''
)];
subType
=
probabilityRand
(
types
);
subType
=
probabilityRand
(
types
);
log
=
quizGenerator
.
log
=
[
'Random seed: '
+
initialSeed
,
'Quiz generate '
+
type
+
(
photo
?
' with photo'
:
''
)
+
' '
+
(
subType
?
`
${
lapk
(
subType
.
type
)}
`
:
'. FAIL'
)];
if
(
subType
===
void
0
){
log
=
quizGenerator
.
log
=
[
'Random seed: '
+
initialSeed
,
'Quiz generate '
+
type
+
(
photo
?
' with photo'
:
''
)
+
' '
+
(
subType
?
`
${
lapk
(
subType
.
type
)}
`
:
'. FAIL'
)
];
photo
=
true
;
subType
=
probabilityRand
(
quizTypes
[
'radio'
+
(
photo
?
'Photo'
:
''
)
]);
log
=
quizGenerator
.
log
=
[
'Change type to radioPhoto'
];
}
else
{
log
=
quizGenerator
.
log
=
[
'Random seed: '
+
initialSeed
,
'Quiz generate '
+
type
+
(
photo
?
' with photo'
:
''
)
+
' '
+
(
subType
?
`
${
lapk
(
subType
.
type
)}
`
:
'. FAIL'
)
];
}
}
else
if
(
attempt
<
30
){
}
else
if
(
attempt
<
30
){
log
=
quizGenerator
.
log
;
log
=
quizGenerator
.
log
;
log
.
push
(
'
\
nATTEMPT FAILED!
\
n
\
n'
+
log
.
push
(
'
\
nATTEMPT FAILED!
\
n
\
n'
+
...
...
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