|
|
@ -29,10 +29,9 @@ const generateQuestions = () => { |
|
|
|
examScheme.forEach( (elem) => { |
|
|
|
let currentSection = allQuestions[elem.section] |
|
|
|
for(let i=0; i<elem.questions; i++) { |
|
|
|
const currentIndex = Math.floor(Math.random() * elem.questions) |
|
|
|
//currentSection[currentIndex].question = elem.section + currentSection[currentIndex].question
|
|
|
|
tmpQuestions.push(currentSection[currentIndex]) |
|
|
|
const currentIndex = Math.floor(Math.random() * currentSection.length) |
|
|
|
currentSection = currentSection.filter( (item, index) => index != currentIndex) |
|
|
|
tmpQuestions.push(currentSection[currentIndex]) |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|