diff --git a/src/addons/mod/quiz/components/components.module.ts b/src/addons/mod/quiz/components/components.module.ts
index 5eade44a0..364eabad8 100644
--- a/src/addons/mod/quiz/components/components.module.ts
+++ b/src/addons/mod/quiz/components/components.module.ts
@@ -22,6 +22,7 @@ import { AddonModQuizNavigationModalComponent } from './navigation-modal/navigat
import { AddonModQuizPreflightModalComponent } from './preflight-modal/preflight-modal';
import { AddonModQuizAttemptInfoComponent } from './attempt-info/attempt-info';
import { AddonModQuizAttemptStateComponent } from './attempt-state/attempt-state';
+import { AddonModQuizQuestionCardComponent } from './question-card/question-card';
@NgModule({
declarations: [
@@ -31,13 +32,12 @@ import { AddonModQuizAttemptStateComponent } from './attempt-state/attempt-state
AddonModQuizConnectionErrorComponent,
AddonModQuizNavigationModalComponent,
AddonModQuizPreflightModalComponent,
+ AddonModQuizQuestionCardComponent,
],
imports: [
CoreSharedModule,
CoreCourseComponentsModule,
],
- providers: [
- ],
exports: [
AddonModQuizAttemptInfoComponent,
AddonModQuizAttemptStateComponent,
@@ -45,6 +45,8 @@ import { AddonModQuizAttemptStateComponent } from './attempt-state/attempt-state
AddonModQuizConnectionErrorComponent,
AddonModQuizNavigationModalComponent,
AddonModQuizPreflightModalComponent,
+ AddonModQuizQuestionCardComponent,
+
],
})
export class AddonModQuizComponentsModule {}
diff --git a/src/addons/mod/quiz/components/question-card/question-card.html b/src/addons/mod/quiz/components/question-card/question-card.html
new file mode 100644
index 000000000..b06d7e103
--- /dev/null
+++ b/src/addons/mod/quiz/components/question-card/question-card.html
@@ -0,0 +1,19 @@
+
+
+
+
+ {{ 'core.question.questionno' | translate:{$a: question.questionnumber} }}
+
+
+ {{ 'core.question.information' | translate }}
+
+
+
+
{{question.status}}
+
+
+
+
+
+
diff --git a/src/addons/mod/quiz/components/question-card/question-card.scss b/src/addons/mod/quiz/components/question-card/question-card.scss
new file mode 100644
index 000000000..fcb3949b1
--- /dev/null
+++ b/src/addons/mod/quiz/components/question-card/question-card.scss
@@ -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);
+}
diff --git a/src/addons/mod/quiz/components/question-card/question-card.ts b/src/addons/mod/quiz/components/question-card/question-card.ts
new file mode 100644
index 000000000..0f6c4c87a
--- /dev/null
+++ b/src/addons/mod/quiz/components/question-card/question-card.ts
@@ -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;
+
+}
diff --git a/src/addons/mod/quiz/pages/player/player.html b/src/addons/mod/quiz/pages/player/player.html
index 78c954671..1d06bd917 100644
--- a/src/addons/mod/quiz/pages/player/player.html
+++ b/src/addons/mod/quiz/pages/player/player.html
@@ -34,32 +34,14 @@
diff --git a/src/addons/mod/quiz/pages/player/player.scss b/src/addons/mod/quiz/pages/player/player.scss
index 3242512cc..920a9a2b9 100644
--- a/src/addons/mod/quiz/pages/player/player.scss
+++ b/src/addons/mod/quiz/pages/player/player.scss
@@ -5,14 +5,6 @@ $quiz-timer-warn-color: $red !default;
$quiz-timer-iterations: 15 !default;
:host {
- .addon-mod_quiz-question-note p {
- font-weight: normal;
- font-size: var(--mdl-typography-fontSize-md);
- margin-top: 2px;
- margin-bottom: 2px;
- text-align: end;
- }
-
core-timer {
// Make the timer go red when it's reaching 0.
@for $i from 0 through $quiz-timer-iterations {
diff --git a/src/addons/mod/quiz/pages/player/player.ts b/src/addons/mod/quiz/pages/player/player.ts
index b2b0a39e9..6dd4dced4 100644
--- a/src/addons/mod/quiz/pages/player/player.ts
+++ b/src/addons/mod/quiz/pages/player/player.ts
@@ -18,7 +18,11 @@ import { Subscription } from 'rxjs';
import { CoreIonLoadingElement } from '@classes/ion-loading';
import { CoreQuestionComponent } from '@features/question/components/question/question';
-import { CoreQuestionQuestionParsed, CoreQuestionsAnswers } from '@features/question/services/question';
+import {
+ CoreQuestionQuestionForView,
+ CoreQuestionQuestionParsed,
+ CoreQuestionsAnswers,
+} from '@features/question/services/question';
import { CoreQuestionBehaviourButton, CoreQuestionHelper } from '@features/question/services/question-helper';
import { CoreNavigator } from '@services/navigator';
import { CoreSites, CoreSitesReadingStrategy } from '@services/sites';
@@ -73,7 +77,7 @@ export class AddonModQuizPlayerPage implements OnInit, OnDestroy, CanLeave {
quizAborted = false; // Whether the quiz was aborted due to an error.
offline = false; // Whether the quiz is being attempted in offline mode.
navigation: AddonModQuizNavigationQuestion[] = []; // List of questions to navigate them.
- questions: QuizQuestion[] = []; // Questions of the current page.
+ questions: CoreQuestionQuestionForView[] = []; // Questions of the current page.
nextPage = -2; // Next page.
previousPage = -1; // Previous page.
showSummary = false; // Whether the attempt summary should be displayed.
@@ -936,13 +940,6 @@ export class AddonModQuizPlayerPage implements OnInit, OnDestroy, CanLeave {
}
-/**
- * Question with some calculated data for the view.
- */
-type QuizQuestion = CoreQuestionQuestionParsed & {
- readableMark?: string;
-};
-
/**
* Attempt with some calculated data for the view.
*/
diff --git a/src/addons/mod/quiz/pages/review/review.html b/src/addons/mod/quiz/pages/review/review.html
index 217705533..37390dc62 100644
--- a/src/addons/mod/quiz/pages/review/review.html
+++ b/src/addons/mod/quiz/pages/review/review.html
@@ -29,35 +29,17 @@
-
+
-
-
-
-
-
-
- {{ 'core.question.questionno' | translate:{$a: question.questionnumber} }}
-
-
- {{ 'core.question.information' | translate }}
-
-
-
-
{{question.status}}
-
-
-
-
-
+
+
-
-
-
+
+
+
1" slot="fixed">
diff --git a/src/addons/mod/quiz/pages/review/review.scss b/src/addons/mod/quiz/pages/review/review.scss
deleted file mode 100644
index 506efd71b..000000000
--- a/src/addons/mod/quiz/pages/review/review.scss
+++ /dev/null
@@ -1,6 +0,0 @@
-:host {
- .addon-mod_quiz-question-note p {
- margin-top: 2px;
- margin-bottom: 2px;
- }
-}
diff --git a/src/addons/mod/quiz/pages/review/review.ts b/src/addons/mod/quiz/pages/review/review.ts
index 66b2291df..524ebed9e 100644
--- a/src/addons/mod/quiz/pages/review/review.ts
+++ b/src/addons/mod/quiz/pages/review/review.ts
@@ -13,7 +13,7 @@
// limitations under the License.
import { Component, ElementRef, OnInit, ViewChild } from '@angular/core';
-import { CoreQuestionQuestionParsed } from '@features/question/services/question';
+import { CoreQuestionQuestionForView } from '@features/question/services/question';
import { CoreQuestionHelper } from '@features/question/services/question-helper';
import { IonContent } from '@ionic/angular';
import { CoreNavigator } from '@services/navigator';
@@ -43,7 +43,6 @@ import { ADDON_MOD_QUIZ_COMPONENT } from '../../constants';
@Component({
selector: 'page-addon-mod-quiz-review',
templateUrl: 'review.html',
- styleUrls: ['review.scss'],
})
export class AddonModQuizReviewPage implements OnInit {
@@ -57,11 +56,10 @@ export class AddonModQuizReviewPage implements OnInit {
additionalData?: AddonModQuizWSAdditionalData[]; // Additional data to display for the attempt.
loaded = false; // Whether data has been loaded.
navigation: AddonModQuizNavigationQuestion[] = []; // List of questions to navigate them.
- questions: QuizQuestion[] = []; // Questions of the current page.
+ questions: CoreQuestionQuestionForView[] = []; // Questions of the current page.
nextPage = -2; // Next page.
previousPage = -2; // Previous page.
readableGrade?: string;
- readableMark?: string;
timeTaken?: string;
gradeItemMarks: { name: string; grade: string }[] = [];
overTime?: string;
@@ -320,13 +318,6 @@ export class AddonModQuizReviewPage implements OnInit {
}
-/**
- * Question with some calculated data for the view.
- */
-type QuizQuestion = CoreQuestionQuestionParsed & {
- readableMark?: string;
-};
-
type LogViewOptions = {
page?: number; // Page being viewed (if viewing pages);
showAllDisabled?: boolean; // Whether the showAll option has just been disabled.
diff --git a/src/addons/mod/quiz/tests/behat/snapshots/attempt-a-quiz-in-app-submit-a-quiz--review-a-quiz-attempt_40.png b/src/addons/mod/quiz/tests/behat/snapshots/attempt-a-quiz-in-app-submit-a-quiz--review-a-quiz-attempt_40.png
index 74d4c6b57..5b1e00e7f 100644
Binary files a/src/addons/mod/quiz/tests/behat/snapshots/attempt-a-quiz-in-app-submit-a-quiz--review-a-quiz-attempt_40.png and b/src/addons/mod/quiz/tests/behat/snapshots/attempt-a-quiz-in-app-submit-a-quiz--review-a-quiz-attempt_40.png differ
diff --git a/src/addons/storagemanager/pages/course-storage/course-storage.html b/src/addons/storagemanager/pages/course-storage/course-storage.html
index 5eab17ef1..d8f72ede1 100644
--- a/src/addons/storagemanager/pages/course-storage/course-storage.html
+++ b/src/addons/storagemanager/pages/course-storage/course-storage.html
@@ -69,7 +69,7 @@
-
+
{{ module.totalSize | coreBytesToSize }}
-
+
{{ 'core.calculating' | translate }}
diff --git a/src/addons/storagemanager/pages/course-storage/course-storage.scss b/src/addons/storagemanager/pages/course-storage/course-storage.scss
index eeb737ace..8f8356527 100644
--- a/src/addons/storagemanager/pages/course-storage/course-storage.scss
+++ b/src/addons/storagemanager/pages/course-storage/course-storage.scss
@@ -10,12 +10,16 @@
ion-card.section {
ion-card-header {
padding: 0;
+
+ .item-heading {
+ font: var(--mdl-typography-heading4-font);
+ }
}
ion-card-content {
padding: 0;
.core-course-storage-activity ion-label {
- h3 {
+ p.item-heading {
position: relative;
max-height: var(--course-storage-max-activity-height);
overflow: hidden;
@@ -35,15 +39,10 @@
}
}
}
- .item-heading {
- font-weight: bold;
- font-size: 1.2rem;
- }
}
}
ion-badge {
- margin-top: 8px;
ion-icon {
@include margin-horizontal(null, 8px);
}
diff --git a/src/core/features/question/services/question.ts b/src/core/features/question/services/question.ts
index 54ab8e5f9..7fc1571ca 100644
--- a/src/core/features/question/services/question.ts
+++ b/src/core/features/question/services/question.ts
@@ -653,6 +653,13 @@ export type CoreQuestionQuestionParsed = CoreQuestionQuestionWSData & {
parsedSettings?: Record | null;
};
+/**
+ * Question with some calculated data for the view.
+ */
+export type CoreQuestionQuestionForView = CoreQuestionQuestionParsed & {
+ readableMark?: string;
+};
+
/**
* List of answers to a set of questions.
*/
diff --git a/src/theme/components/ion-checkbox.scss b/src/theme/components/ion-checkbox.scss
index f43b45807..1105a5550 100644
--- a/src/theme/components/ion-checkbox.scss
+++ b/src/theme/components/ion-checkbox.scss
@@ -16,7 +16,8 @@ input[type=checkbox] {
}
ion-checkbox {
- &.checkbox-disabled::part(label) {
+ &.md.checkbox-disabled::part(label),
+ &.ios.checkbox-disabled {
opacity: var(--mdl-input-disabled-opacity);
}
}
diff --git a/src/theme/components/ion-radio.scss b/src/theme/components/ion-radio.scss
index d29c8a9f1..92b3ca081 100644
--- a/src/theme/components/ion-radio.scss
+++ b/src/theme/components/ion-radio.scss
@@ -57,7 +57,8 @@ input[type=radio],
}
ion-radio {
- &.radio-disabled::part(label) {
+ &.md.radio-disabled::part(label),
+ &.ios.radio-disabled {
opacity: var(--mdl-input-disabled-opacity);
}
}