|
|
@@ -13,7 +13,7 @@ export class QuizPage implements OnInit { |
|
|
|
questions: Array<{ |
|
|
|
type: 'MCQ' | 'CARD', |
|
|
|
question: string, |
|
|
|
choice?: Array<{ |
|
|
|
choices?: Array<{ |
|
|
|
value: string, |
|
|
|
text: string, |
|
|
|
}>, |
|
|
@@ -36,15 +36,15 @@ export class QuizPage implements OnInit { |
|
|
|
this.questions = [{ |
|
|
|
type: 'MCQ', |
|
|
|
question: faker.lorem.sentence(), |
|
|
|
choice: [{ |
|
|
|
choices: [{ |
|
|
|
value: 'A', |
|
|
|
text: 'Choice 1' |
|
|
|
}, { |
|
|
|
value: 'B', |
|
|
|
text: 'Choice 1' |
|
|
|
text: 'Choice 2' |
|
|
|
}, { |
|
|
|
value: 'B', |
|
|
|
text: 'Choice 1' |
|
|
|
value: 'C', |
|
|
|
text: 'Choice 3' |
|
|
|
}], |
|
|
|
correctAnswer: 'A', |
|
|
|
secondsAllotted: 50 |
|
|
@@ -56,4 +56,11 @@ export class QuizPage implements OnInit { |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
nextQuestion() { |
|
|
|
if (this.selectedQuestion < this.questions.length - 1) { |
|
|
|
this.selectedQuestion += 1; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |