-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MOBILE-4470 quiz: Unify question card to solve status text size in iOS
- Loading branch information
1 parent
bc26951
commit 369fd71
Showing
12 changed files
with
85 additions
and
82 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
19 changes: 19 additions & 0 deletions
19
src/addons/mod/quiz/components/question-card/question-card.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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<ion-card id="addon-mod_quiz-question-{{question.slot}}"> | ||
<ion-item-divider> | ||
<ion-label class="ion-text-wrap"> | ||
<h2 *ngIf="question.type !== 'description' && question.questionnumber" class="inline"> | ||
{{ 'core.question.questionno' | translate:{$a: question.questionnumber} }} | ||
</h2> | ||
<h2 *ngIf="question.type === 'description' || !question.questionnumber" class="inline"> | ||
{{ 'core.question.information' | translate }} | ||
</h2> | ||
</ion-label> | ||
<div class="ion-text-wrap ion-margin-start addon-mod_quiz-question-note" slot="end" | ||
*ngIf="question.status || question.readableMark"> | ||
<p *ngIf="question.status">{{question.status}}</p> | ||
<p *ngIf="question.readableMark" [innerHTML]="question.readableMark"></p> | ||
</div> | ||
</ion-item-divider> | ||
|
||
<ng-content /> | ||
</ion-card> |
7 changes: 7 additions & 0 deletions
7
src/addons/mod/quiz/components/question-card/question-card.scss
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,7 @@ | ||
.addon-mod_quiz-question-note p { | ||
margin-top: 2px; | ||
margin-bottom: 2px; | ||
text-align: end; | ||
font-weight: normal; | ||
font-size: var(--mdl-typography-fontSize-md); | ||
} |
30 changes: 30 additions & 0 deletions
30
src/addons/mod/quiz/components/question-card/question-card.ts
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,30 @@ | ||
// (C) Copyright 2015 Moodle Pty Ltd. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
import { Component, Input } from '@angular/core'; | ||
import { CoreQuestionQuestionForView } from '@features/question/services/question'; | ||
|
||
/** | ||
* Component that displays a question card. | ||
*/ | ||
@Component({ | ||
selector: 'addon-mod-quiz-question-card', | ||
templateUrl: 'question-card.html', | ||
styleUrl: 'question-card.scss', | ||
}) | ||
export class AddonModQuizQuestionCardComponent { | ||
|
||
@Input() question!: CoreQuestionQuestionForView; | ||
|
||
} |
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 was deleted.
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
Binary file modified
BIN
-8 Bytes
(100%)
...hat/snapshots/attempt-a-quiz-in-app-submit-a-quiz--review-a-quiz-attempt_40.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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