diff --git a/src/app/tabs/courses/course-details/course-details.component.html b/src/app/tabs/courses/course-details/course-details.component.html index a5d7f8b..63406f9 100644 --- a/src/app/tabs/courses/course-details/course-details.component.html +++ b/src/app/tabs/courses/course-details/course-details.component.html @@ -56,7 +56,7 @@ Notes: - Notes: + Quiz: {{ topic.heading }} - {{ topic.description }}

diff --git a/src/app/tabs/courses/quiz/quiz.component.html b/src/app/tabs/courses/quiz/quiz.component.html index 60872ad..e8d8c83 100644 --- a/src/app/tabs/courses/quiz/quiz.component.html +++ b/src/app/tabs/courses/quiz/quiz.component.html @@ -11,99 +11,23 @@
-
+
- - - -
-
- - - - -
-
- - - - -
-
- - - - -
-
- - - - -
-
- - - - -
-
- - - - -
- -
- - - - -
- -
- - - - -
- -
- - - - -
- - -
- - - - -
- - -
- - - - -
- -
- - - + + +
- +

- Architecto obcaecati perferendis suscipit consequuntur labore voluptatibus vitae totam minima, tempore excepturi, cum at qui voluptas rerum nostrum odio minus, voluptatem dolores. ? + {{ question.question }}

@@ -120,67 +44,18 @@
    -
  1. - -
    - -
    -
  2. -
  3. - -
    - -
    -
  4. -
  5. - -
    - -
    -
  6. -
  7. - -
    - -
    -
  8. -
- - - - -

- dis suscipit consequuntur labore voluptatibus vitae totam minima, tempore excepturi, cum at qui voluptas rerum nostrum odio minus, voluptatem dolores. ? -

- -
-
- 00:40 - - - - -
-
- - - -
    -
  1. - +
  2. +
    - -
    -
  3. -
  4. - -
    - + +
-
diff --git a/src/app/tabs/courses/quiz/quiz.component.scss b/src/app/tabs/courses/quiz/quiz.component.scss index 900e35f..ed2233f 100644 --- a/src/app/tabs/courses/quiz/quiz.component.scss +++ b/src/app/tabs/courses/quiz/quiz.component.scss @@ -47,18 +47,19 @@ .question-status { background-color: var(--ash-black); - padding: 10px 0% 5px; + padding: 10px 0; display: block; width: 100%; overflow: auto; - margin-bottom: -10px; position: relative; .container { width: 100%; padding: 0 5%; white-space: nowrap; - display: inline-block; + display: flex; + flex-wrap: wrap; + align-items: center; overflow: auto; } @@ -91,10 +92,7 @@ height: 17px; background-color: var(--dark-grey); color: white; - align-items: center; - justify-content: center; - display: inline-block; - margin-right: 10px; + margin-right: 7px; border-radius: 50%; overflow: hidden; border: 1px solid var(--dark-grey); @@ -123,20 +121,25 @@ border-color: var(--light-grey); background-color: var(--black); - &.wrong { - background-color: var(--danger-dark); - .icon { - fill: var(--black) !important; + &.correct { + background-color: var(--green); + + .correct-icon { + fill: var(--black); } } - &.correct { - background-color: var(--green); + &.wrong { + background-color: var(--danger-dark); - .icon { - fill: var(--black) !important; + .wrong-icon { + fill: var(--black); } } + + .icon { + fill: white; + } } &.correct { @@ -147,7 +150,7 @@ display: none; } - .icon { + .correct-icon { fill: var(--green); display: block; } @@ -155,16 +158,14 @@ &.wrong { border-color: var(--danger-dark); - background-color: var(--danger-dark); + background-color: white; label { display: none; } - .icon { - fill: white; - width: 7px; - height: 7px; + .wrong-icon { + fill: var(--danger-dark); display: block; } } @@ -179,7 +180,7 @@ ngx-siema-slide { color: white; font-size: 13px; background-color: var(--ash-black); - padding: 15px 5%; + padding: 0 5% 15px 5%; } .timer-holder { @@ -270,7 +271,7 @@ ngx-siema-slide { } } - &.correct { + &.correct, &.show-correct { box-shadow: 0px 0px 5px var(--green); border-color: var(--green); @@ -282,7 +283,7 @@ ngx-siema-slide { border-color: var(--green); background-color: white; - .icon { + .correct-icon { fill: var(--green); display: block; } @@ -299,12 +300,10 @@ ngx-siema-slide { .icon-holder { border-color: var(--danger-dark); - background-color: var(--danger-dark); + background-color: white; - .icon { - fill: white; - width: 10px; - height: 10px; + .wrong-icon { + fill: var(--danger-dark); display: block; } } diff --git a/src/app/tabs/courses/quiz/quiz.component.ts b/src/app/tabs/courses/quiz/quiz.component.ts index 35be0f5..46392af 100644 --- a/src/app/tabs/courses/quiz/quiz.component.ts +++ b/src/app/tabs/courses/quiz/quiz.component.ts @@ -25,16 +25,96 @@ export class QuizComponent implements OnInit { }, }; + selectedQuestionId: number; + + questionList = [{ + id: 1, + question: 'Which sentence is corrent? "1. Ramu went to School \n 2. School went Ramu"', + userAnswer: 0, + correctAnswer: 1, + options: [{ + id: 1, + text: '1 is correct', + }, { + id: 2, + text: '2 is correct', + }, { + id: 3, + text: 'Both are correct', + }, { + id: 4, + text: 'Both are wrong', + }] + }, { + id: 2, + question: 'How much is 16x16 ?', + userAnswer: 0, + correctAnswer: 4, + options: [{ + id: 1, + text: '30000', + }, { + id: 2, + text: '540', + }, { + id: 3, + text: '156', + }, { + id: 4, + text: '256', + }] + }, { + id: 3, + question: 'Who is Jackie Chan ?', + userAnswer: 0, + correctAnswer: 2, + options: [{ + id: 1, + text: 'Dancer', + }, { + id: 2, + text: 'Actor', + }, { + id: 3, + text: 'Singer', + }, { + id: 4, + text: 'Gambler', + }] + }, { + id: 4, + question: 'Who is Newton ?', + userAnswer: 0, + correctAnswer: 3, + options: [{ + id: 1, + text: 'Dancer', + }, { + id: 2, + text: 'Actor', + }, { + id: 3, + text: 'Scientist', + }, { + id: 4, + text: 'Gambler', + }] + }]; + constructor( private location: Location, private ngxSiemaService: NgxSiemaService ) { } ngOnInit(): void { + this.selectedQuestionId = this.questionList[0].id; } next() { this.ngxSiemaService.next(1); + this.ngxSiemaService.currentSlide().subscribe((index) => { + this.selectedQuestionId = this.questionList[index.currentSlide].id; + }).unsubscribe(); } back() {