Commit a98f97f6 by Иван Кубота

change unprobable questions to radioPhoto

parent d4c30fea
Pipeline #555 failed with stage
...@@ -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},
......
...@@ -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'+
......
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