-
Notifications
You must be signed in to change notification settings - Fork 31
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 #329 from sunbird-cb/dev-portal
quiz related UI updated #6
- Loading branch information
Showing
8 changed files
with
89 additions
and
47 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
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
50 changes: 25 additions & 25 deletions
50
...ect/ws/viewer/src/lib/plugins/practice/components/question/mcq-sca/mcq-sca.component.html
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 |
---|---|---|
@@ -1,44 +1,44 @@ | ||
<mat-radio-group class="flex flex-1 flex-column quiz-radio-group"> | ||
<div *ngFor="let option of question?.options"> | ||
<mat-radio-button #btn class="flex flex-1 padding-s quiz-radio-button margin-top-s b-r" [ngClass]="{ | ||
<mat-radio-button #btn class="flex flex-1 padding-s quiz-radio-button margin-top-s b-r" [ngClass]="{ | ||
'correct-answer': | ||
(viewState === 'review' && option?.isCorrect && isSelected(option)) || | ||
(viewState === 'answer' && option?.isCorrect), | ||
'incorrect-answer': viewState === 'review' && !option?.isCorrect && isSelected(option), | ||
'ws-mat-accent-border': !(btn.checked), | ||
'ws-mat-accent-border-active ': (btn.checked) | ||
}" [value]="option.optionId" (change)="updateParent(option.optionId)" [checked]="isSelected(option)"> | ||
<span class="wrap-mat-radio-label"> | ||
<mat-error *ngIf="viewState === 'review' && !option?.isCorrect && isSelected(option)"> | ||
{{ option?.text }} | ||
</mat-error> | ||
<div [ngClass]="{ | ||
<span class="wrap-mat-radio-label"> | ||
<mat-error *ngIf="viewState === 'review' && !option?.isCorrect && isSelected(option)"> | ||
{{ option?.text }} | ||
</mat-error> | ||
<div [ngClass]="{ | ||
'correct-option': | ||
(viewState === 'review' && option?.isCorrect && isSelected(option)) || | ||
(viewState === 'answer' && option?.isCorrect) | ||
}" [hidden]="viewState === 'review' && !option?.isCorrect && isSelected(option)"> | ||
<span class="mat-body-2"></span> {{ option?.text }} | ||
</div> | ||
</span> | ||
</mat-radio-button> | ||
<div class="background-well padding-left-m padding-xs" | ||
*ngIf="viewState === 'review' && isSelected(option) && option?.hint"> | ||
<mat-error *ngIf="viewState === 'review' && !option?.isCorrect && isSelected(option)"> | ||
<p class="margin-remove mat-body-2" i18n="option explanation label"> | ||
Explanation: | ||
</p> | ||
<p class="margin-remove mat-body-1" [innerHTML]="option?.hint"></p> | ||
</mat-error> | ||
<div [ngClass]="{ | ||
<span class="mat-body-2"></span> {{ option?.text }} | ||
</div> | ||
</span> | ||
</mat-radio-button> | ||
<div class="background-well padding-left-m padding-xs" | ||
*ngIf="viewState === 'review' && isSelected(option) && option?.hint"> | ||
<mat-error *ngIf="viewState === 'review' && !option?.isCorrect && isSelected(option)"> | ||
<p class="margin-remove mat-body-2" i18n="option explanation label"> | ||
Explanation: | ||
</p> | ||
<p class="margin-remove mat-body-1" [innerHTML]="option?.hint"></p> | ||
</mat-error> | ||
<div [ngClass]="{ | ||
'correct-option': | ||
(viewState === 'review' && option?.isCorrect && isSelected(option)) || | ||
(viewState === 'answer' && option?.isCorrect) | ||
}" [hidden]="viewState === 'review' && !option?.isCorrect && isSelected(option)"> | ||
<p class="margin-remove mat-body-2" i18n="option explanation label"> | ||
Explanation : | ||
</p> | ||
<p class="margin-remove mat-body-1" [innerHTML]="option?.hint"></p> | ||
<p class="margin-remove mat-body-2" i18n="option explanation label"> | ||
Explanation : | ||
</p> | ||
<p class="margin-remove mat-body-1" [innerHTML]="option?.hint"></p> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</mat-radio-group> | ||
</mat-radio-group> |
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