MOBILE-3711 quiz: Add classes to some quiz messages on index

main
Pau Ferrer Ocaña 2021-08-03 09:44:14 +02:00
parent 98a8feb2ea
commit 23a5b5b8a4
1 changed files with 24 additions and 17 deletions

View File

@ -45,13 +45,13 @@
</ion-item>
<ion-item class="ion-text-wrap" *ngIf="gradeMethodReadable">
<ion-label>
<h3>{{ 'addon.mod_quiz.grademethod' | translate }}</h3>
<p class="item-heading">{{ 'addon.mod_quiz.grademethod' | translate }}</p>
<p>{{ gradeMethodReadable }}</p>
</ion-label>
</ion-item>
<ion-item class="ion-text-wrap" *ngIf="bestGrade && bestGrade.gradetopass && quiz && quiz.gradeFormatted">
<ion-label>
<h3>{{ 'core.grades.gradepass' | translate }}</h3>
<p class="item-heading">{{ 'core.grades.gradepass' | translate }}</p>
<p>{{ 'addon.mod_quiz.outof' | translate: { $a: {
grade: bestGrade.gradetopass,
maxgrade: quiz.gradeFormatted
@ -60,7 +60,7 @@
</ion-item>
<ion-item class="ion-text-wrap" *ngIf="syncTime">
<ion-label>
<h3>{{ 'core.lastsync' | translate }}</h3>
<p class="item-heading">{{ 'core.lastsync' | translate }}</p>
<p>{{ syncTime }}</p>
</ion-label>
</ion-item>
@ -141,7 +141,7 @@
</ion-item>
<ion-item class="ion-text-wrap" *ngIf="gradebookFeedback">
<ion-label>
<h3 class="item-heading">{{ 'addon.mod_quiz.comment' | translate }}</h3>
<p class="item-heading">{{ 'addon.mod_quiz.comment' | translate }}</p>
<p><core-format-text [component]="component" [componentId]="componentId" [text]="gradebookFeedback"
contextLevel="module" [contextInstanceId]="module.id" [courseId]="courseId">
</core-format-text></p>
@ -149,7 +149,7 @@
</ion-item>
<ion-item class="ion-text-wrap" *ngIf="quiz.showFeedbackColumn && overallFeedback">
<ion-label>
<h3 class="item-heading">{{ 'addon.mod_quiz.overallfeedback' | translate }}</h3>
<p class="item-heading">{{ 'addon.mod_quiz.overallfeedback' | translate }}</p>
<p><core-format-text [component]="component" [componentId]="componentId" [text]="overallFeedback"
contextLevel="module" [contextInstanceId]="module.id" [courseId]="courseId">
</core-format-text></p>
@ -162,28 +162,35 @@
<ion-card *ngIf="quiz">
<ion-list>
<!-- Error messages. -->
<ion-item class="ion-text-wrap core-danger-item" *ngFor="let message of preventMessages">
<ion-item class="ion-text-wrap core-danger-item addon-mod_quiz-prevent-messages" *ngFor="let message of preventMessages">
<ion-label><p>{{ message }}</p></ion-label>
</ion-item>
<ion-item class="ion-text-wrap core-danger-item" *ngIf="quiz.hasquestions === 0">
<ion-item class="ion-text-wrap core-danger-item addon-mod_quiz-no-questions" *ngIf="quiz.hasquestions === 0">
<ion-label><p>{{ 'addon.mod_quiz.noquestions' | translate }}</p></ion-label>
</ion-item>
<ion-item class="ion-text-wrap core-danger-item" *ngIf="!hasSupportedQuestions && unsupportedQuestions.length">
<ion-item class="ion-text-wrap core-danger-item addon-mod_quiz-unsupported-questions"
*ngIf="!hasSupportedQuestions && unsupportedQuestions.length">
<ion-label>
<p>{{ 'addon.mod_quiz.errorquestionsnotsupported' | translate }}</p>
<p *ngFor="let type of unsupportedQuestions">{{ type }}</p>
<p class="item-heading">{{ 'addon.mod_quiz.errorquestionsnotsupported' | translate }}</p>
<p *ngFor="let type of unsupportedQuestions"
class="addon-mod_quiz-unsupported-question addon-mod_quiz-unsupported-question-{{type}}">
{{ type }}
</p>
</ion-label>
</ion-item>
<ion-item class="ion-text-wrap core-danger-item" *ngIf="unsupportedRules.length">
<ion-item class="ion-text-wrap core-danger-item addon-mod_quiz-unsupported-rules" *ngIf="unsupportedRules.length">
<ion-label>
<p>{{ 'addon.mod_quiz.errorrulesnotsupported' | translate }}</p>
<p *ngFor="let name of unsupportedRules">{{ name }}</p>
<p class="item-heading">{{ 'addon.mod_quiz.errorrulesnotsupported' | translate }}</p>
<p *ngFor="let name of unsupportedRules"
class="addon-mod_quiz-unsupported-rule addon-mod_quiz-unsupported-rule-{{name}}">
{{ name }}
</p>
</ion-label>
</ion-item>
<ion-item class="ion-text-wrap core-danger-item" *ngIf="behaviourSupported === false">
<ion-item class="ion-text-wrap core-danger-item addon-mod_quiz-unsupported-behaviours" *ngIf="behaviourSupported === false">
<ion-label>
<p>{{ 'addon.mod_quiz.errorbehaviournotsupported' | translate }}</p>
<p>{{ quiz.preferredbehaviour }}</p>
<p class="item-heading">{{ 'addon.mod_quiz.errorbehaviournotsupported' | translate }}</p>
<p class="addon-mod_quiz-unsupported-behaviour">{{ quiz.preferredbehaviour }}</p>
</ion-label>
</ion-item>
@ -198,7 +205,7 @@
<!-- Other warnings. -->
<ion-item class="core-warning-item ion-text-wrap" *ngIf="hasSupportedQuestions && unsupportedQuestions.length">
<ion-label>
<p>{{ 'addon.mod_quiz.canattemptbutnotsubmit' | translate }}</p>
<p class="item-heading">{{ 'addon.mod_quiz.canattemptbutnotsubmit' | translate }}</p>
<p>{{ 'addon.mod_quiz.warningquestionsnotsupported' | translate }}</p>
<p *ngFor="let type of unsupportedQuestions">{{ type }}</p>
</ion-label>