-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #21 from piuswalter/development
implemented multiple choice questions
- Loading branch information
Showing
15 changed files
with
331 additions
and
109 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
<mat-card class="flashcard"> | ||
<mat-card-header class="title"> | ||
<mat-card-title>Frage</mat-card-title> | ||
</mat-card-header> | ||
<mat-card-actions class="controls"> | ||
<button (click)="switchCard.emit(-1)" mat-mini-fab color="primary"> | ||
<mat-icon aria-hidden="false">chevron_left</mat-icon> | ||
</button> | ||
<button | ||
(click)="hideAnswer = !hideAnswer" | ||
mat-raised-button | ||
color="primary" | ||
> | ||
{{ hideAnswer ? "Show" : "Hide" }} answer | ||
</button> | ||
<button (click)="switchCard.emit(1)" mat-mini-fab color="primary"> | ||
<mat-icon aria-hidden="false" aria-label="Chevron right icon" | ||
>chevron_right</mat-icon | ||
> | ||
</button> | ||
</mat-card-actions> | ||
<mat-card-content class="center"> | ||
<div [innerHTML]="question" class="flashcard-text"></div> | ||
<hr class="halfwidth" /> | ||
<div | ||
*ngIf="!isMultipleChoice" | ||
[innerHTML]="answer" | ||
[hidden]="hideAnswer" | ||
class="flashcard-text" | ||
></div> | ||
<div | ||
*ngIf="isMultipleChoice && !hideAnswer" | ||
class="multiple-choice-feedback" | ||
> | ||
<span *ngIf="isAnswerCorrect">Correct 🥳</span> | ||
<span *ngIf="!isAnswerCorrect" | ||
>That was probably not quite tivial 😨</span | ||
> | ||
</div> | ||
<div | ||
*ngIf="isMultipleChoice" | ||
fxLayout="row wrap" | ||
fxLayout.lt-sm="column" | ||
fxLayoutAlign="center center" | ||
> | ||
<div | ||
fxFlex="calc(50% - 10px)" | ||
fxFill | ||
*ngFor="let answer of answers; let idx = index" | ||
> | ||
<div | ||
class="multiple-choice-button" | ||
(click)="onCardClicked(idx)" | ||
[class.show-solution]="!hideAnswer" | ||
[class.correct]="answer.isCorrect" | ||
[class.selected]="answer.isSelected" | ||
[innerHTML]="answer.safeHtml" | ||
></div> | ||
</div> | ||
</div> | ||
</mat-card-content> | ||
</mat-card> |
Oops, something went wrong.