Skip to content

Commit

Permalink
Merge pull request #10 from alizarazot/lesson-v2
Browse files Browse the repository at this point in the history
Lessons v2
  • Loading branch information
alizarazot authored May 27, 2024
2 parents 91349ba + 7af86d2 commit f133ce7
Show file tree
Hide file tree
Showing 12 changed files with 167 additions and 422 deletions.
55 changes: 0 additions & 55 deletions public/lesson/diagnostic-test/index.json

This file was deleted.

23 changes: 1 addition & 22 deletions public/lesson/index.json
Original file line number Diff line number Diff line change
@@ -1,22 +1 @@
[
{
"id": "diagnostic-test",
"name": "Prueba diagnóstica",
"require": []
},
{
"id": "lesson-1",
"name": "Lección 1",
"require": ["diagnostic-test"]
},
{
"id": "lesson-2",
"name": "Lección 2",
"require": ["lesson-1"]
},
{
"id": "lesson-3",
"name": "Lección 3",
"require": ["lesson-2"]
}
]
["lesson-1"]
44 changes: 44 additions & 0 deletions public/lesson/lesson-1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"name": "Prueba diagnóstica",
"description": "¡Pon a prueba tus conocimientos de Lengua de Señas Colombiana!",
"questions": {
"q-1": {
"information": [
{
"type": "title",
"content": "Prueba diagnóstica de Lengua de Señas Colombiana (LSC)"
},
{
"type": "image",
"content": "s/hola.png"
},
{
"type": "paragraph",
"content": "La prueba diagnóstica de Lengua de Señas Colombiana (LSC) se utiliza para evaluar el nivel de competencia y fluidez en la Lengua de Señas Colombiana. Esta prueba es crucial para determinar el grado de habilidad y comprensión en la comunicación a través de la LSC."
}
],
"question": "¿Qué parte del cuerpo se utiliza principalmente para expresar emociones en Lengua de Señas Colombiana?",
"answers": ["Manos", "Pies", "Brazos", "Rostro"],
"correct": 3
},
"q-2": {
"information": [
{
"type": "title",
"content": "Prueba diagnóstica de Lengua de Señas Colombiana (LSC)"
},
{
"type": "image",
"content": "s/hola.png"
},
{
"type": "paragraph",
"content": "La prueba diagnóstica de Lengua de Señas Colombiana (LSC) se utiliza para evaluar el nivel de competencia y fluidez en la Lengua de Señas Colombiana. Esta prueba es crucial para determinar el grado de habilidad y comprensión en la comunicación a través de la LSC."
}
],
"question": "¿Qué parte del cuerpo se utiliza principalmente para expresar emociones en Lengua de Señas Colombiana?",
"answers": ["Manos", "Pies", "Brazos", "Rostro"],
"correct": 3
}
}
}
69 changes: 0 additions & 69 deletions public/lesson/lesson-1/index.json

This file was deleted.

80 changes: 0 additions & 80 deletions public/lesson/lesson-2/index.json

This file was deleted.

7 changes: 0 additions & 7 deletions public/lesson/lesson-3/index.json

This file was deleted.

14 changes: 4 additions & 10 deletions src/component/single-choice-question.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
defineComponents,
} from "igniteui-webcomponents";

import { SingleChoiceQuestion } from "lesson";
import { Question } from "lesson";

@customElement("component-single-choice-question")
export class ComponentSingleChoiceQuestion extends LitElement {
Expand All @@ -26,7 +26,7 @@ export class ComponentSingleChoiceQuestion extends LitElement {
}
`;

constructor(question: SingleChoiceQuestion) {
constructor(question: Question) {
super();

this.question = question;
Expand All @@ -39,7 +39,7 @@ export class ComponentSingleChoiceQuestion extends LitElement {
}

@property({ attribute: false })
question: SingleChoiceQuestion;
question: Question;

@state()
private _lastRadio = -1;
Expand Down Expand Up @@ -80,13 +80,7 @@ export class ComponentSingleChoiceQuestion extends LitElement {
return false;
}

if (
(
this.shadowRoot?.querySelectorAll("igc-radio")[
this._lastRadio
] as IgcRadioComponent
).innerText === this.question.correct
) {
if (this._lastRadio === this.question.correct) {
return true;
}

Expand Down
Loading

0 comments on commit f133ce7

Please sign in to comment.