From 8d540e6010ec7b01646f0b4a6268f366fc16dc87 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pau=20Ferrer=20Oca=C3=B1a?=
Date: Fri, 25 Feb 2022 09:25:35 +0100
Subject: [PATCH 01/10] MOBILE-3149 choice: Collapse list of users in results
---
.../index/addon-mod-choice-index.html | 22 ++++++++++++-------
.../mod/choice/components/index/index.ts | 10 +++++++++
2 files changed, 24 insertions(+), 8 deletions(-)
diff --git a/src/addons/mod/choice/components/index/addon-mod-choice-index.html b/src/addons/mod/choice/components/index/addon-mod-choice-index.html
index 6ef6a30cc..f5620647c 100644
--- a/src/addons/mod/choice/components/index/addon-mod-choice-index.html
+++ b/src/addons/mod/choice/components/index/addon-mod-choice-index.html
@@ -96,7 +96,11 @@
-
+ 0" class="divider ion-text-wrap" (click)="toggle(result)"
+ [attr.aria-label]="(result.expanded ? 'core.collapse' : 'core.expand') | translate" detail="false">
+ 0 ? 'fas-chevron-right' : ''" flip-rtl slot="start" aria-hidden="true"
+ class="expandable-status-icon" [class.expandable-status-icon-expanded]="result.expanded">
+
-
-
-
-
- {{user.fullname}}
-
+
+
+
+
+ {{user.fullname}}
+
+
+
diff --git a/src/addons/mod/choice/components/index/index.ts b/src/addons/mod/choice/components/index/index.ts
index 2597bde19..a43fc8c58 100644
--- a/src/addons/mod/choice/components/index/index.ts
+++ b/src/addons/mod/choice/components/index/index.ts
@@ -446,6 +446,15 @@ export class AddonModChoiceIndexComponent extends CoreCourseModuleMainActivityCo
}
}
+ /**
+ * Toggle list of users in a result visible.
+ *
+ * @param result Result to expand.
+ */
+ toggle(result: AddonModChoiceResultFormatted): void {
+ result.expanded = !result.expanded;
+ }
+
/**
* Performs the sync of the activity.
*
@@ -472,4 +481,5 @@ export class AddonModChoiceIndexComponent extends CoreCourseModuleMainActivityCo
*/
export type AddonModChoiceResultFormatted = AddonModChoiceResult & {
percentageamountfixed: string; // Percentage of users answers with fixed decimals.
+ expanded?: boolean;
};
From 9f7a0e303eef113dd88d24bcc62460a5a8465593 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pau=20Ferrer=20Oca=C3=B1a?=
Date: Fri, 25 Feb 2022 10:06:35 +0100
Subject: [PATCH 02/10] MOBILE-3149 quiz: Change quiz index page warning cards
---
.../index/addon-mod-quiz-index.html | 61 +++++++++++--------
1 file changed, 35 insertions(+), 26 deletions(-)
diff --git a/src/addons/mod/quiz/components/index/addon-mod-quiz-index.html b/src/addons/mod/quiz/components/index/addon-mod-quiz-index.html
index 5b80f4744..53daf6b16 100644
--- a/src/addons/mod/quiz/components/index/addon-mod-quiz-index.html
+++ b/src/addons/mod/quiz/components/index/addon-mod-quiz-index.html
@@ -10,7 +10,7 @@
+ [courseId]="courseId" [hasDataToSync]="buttonText && hasOffline">
@@ -134,22 +134,26 @@
-
-
-
-
-
+
+
+
+
+
{{ message }}
-
+
+
+
{{ 'addon.mod_quiz.noquestions' | translate }}
-
+
+
+
{{ 'addon.mod_quiz.errorquestionsnotsupported' | translate }}
-
+
+
+
{{ 'addon.mod_quiz.errorrulesnotsupported' | translate }}
-
+
+
+
{{ 'addon.mod_quiz.errorbehaviournotsupported' | translate }}
{{ quiz.preferredbehaviour }}
+
-
-
+
+
+
{{ 'addon.mod_quiz.canattemptbutnotsubmit' | translate }}
{{ 'addon.mod_quiz.warningquestionsnotsupported' | translate }}
{{ type }}
+
+
+
+
-
+
+
{{ buttonText | translate }}
@@ -195,17 +211,10 @@
{{ 'core.openinbrowser' | translate }}
+
-
-
-
-
-
-
-
-
+
+
+
+
-
-
-
From 540141bad55b2aa6f70094a1f50985611c99b4f9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pau=20Ferrer=20Oca=C3=B1a?=
Date: Fri, 25 Feb 2022 10:54:23 +0100
Subject: [PATCH 03/10] MOBILE-3149 scorm: Collapse grades on scorm page
---
.../index/addon-mod-scorm-index.html | 35 ++++++++++++-------
.../mod/scorm/components/index/index.ts | 8 +++++
2 files changed, 31 insertions(+), 12 deletions(-)
diff --git a/src/addons/mod/scorm/components/index/addon-mod-scorm-index.html b/src/addons/mod/scorm/components/index/addon-mod-scorm-index.html
index 49c22490a..f3dc13496 100644
--- a/src/addons/mod/scorm/components/index/addon-mod-scorm-index.html
+++ b/src/addons/mod/scorm/components/index/addon-mod-scorm-index.html
@@ -31,7 +31,7 @@
= 0">
- {{ 'addon.mod_scorm.noattemptsallowed' | translate }}
+ {{ 'addon.mod_scorm.noattemptsallowed' | translate }}
{{ 'core.unlimited' | translate }}
@@ -40,23 +40,34 @@
= 0">
- {{ 'addon.mod_scorm.noattemptsmade' | translate }}
+ {{ 'addon.mod_scorm.noattemptsmade' | translate }}
{{ numAttempts }}
-
+ 0" button class="divider ion-text-wrap" (click)="toggleGrades()"
+ [attr.aria-label]="(gradesExpanded ? 'core.collapse' : 'core.expand') | translate" detail="false">
+
+
- {{ 'addon.mod_scorm.gradeforattempt' | translate }} {{attempt.num}}
+ {{'core.grades.grades' | translate}}
-
- {{ attempt.gradeFormatted }}
- {{ 'addon.mod_scorm.cannotcalculategrade' | translate }}
-
+ 0">
+
+
+ {{ 'addon.mod_scorm.gradeforattempt' | translate }} {{attempt.num}}
+
+
+ {{ attempt.gradeFormatted }}
+ {{ 'addon.mod_scorm.cannotcalculategrade' | translate }}
+
+
+
- {{ 'addon.mod_scorm.gradeforattempt' | translate }} {{attempt.num}}
+ {{ 'addon.mod_scorm.gradeforattempt' | translate }} {{attempt.num}}
{{ 'addon.mod_scorm.offlineattemptnote' | translate }}
@@ -71,13 +82,13 @@
- {{ 'addon.mod_scorm.grademethod' | translate }}
+ {{ 'addon.mod_scorm.grademethod' | translate }}
{{ gradeMethodReadable }}
- {{ 'addon.mod_scorm.gradereported' | translate }}
+ {{ 'addon.mod_scorm.gradereported' | translate }}
{{ gradeFormatted }}
@@ -86,7 +97,7 @@
- {{ 'core.lastsync' | translate }}
+ {{ 'core.lastsync' | translate }}
{{ syncTime }}
diff --git a/src/addons/mod/scorm/components/index/index.ts b/src/addons/mod/scorm/components/index/index.ts
index 88dd7b2c8..fcfa22b41 100644
--- a/src/addons/mod/scorm/components/index/index.ts
+++ b/src/addons/mod/scorm/components/index/index.ts
@@ -81,6 +81,7 @@ export class AddonModScormIndexComponent extends CoreCourseModuleMainActivityCom
attemptsLeft = -1; // Number of attempts left.
onlineAttempts: AttemptGrade[] = []; // Grades for online attempts.
offlineAttempts: AttemptGrade[] = []; // Grades for offline attempts.
+ gradesExpanded = false;
protected fetchContentDefaultError = 'addon.mod_scorm.errorgetscorm'; // Default error to show when loading contents.
protected syncEventName = AddonModScormSyncProvider.AUTO_SYNCED;
@@ -523,6 +524,13 @@ export class AddonModScormIndexComponent extends CoreCourseModuleMainActivityCom
}
}
+ /**
+ * Toggle list of grades.
+ */
+ toggleGrades(): void {
+ this.gradesExpanded = !this.gradesExpanded;
+ }
+
/**
* Open a SCORM package.
*
From d4515ca74cee5029be65a0a2e1fce224b9c1bb59 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pau=20Ferrer=20Oca=C3=B1a?=
Date: Thu, 24 Feb 2022 16:44:24 +0100
Subject: [PATCH 04/10] MOBILE-3149 module: Add collapsible footer buttons on
module index pages
---
.../components/index/index.html | 29 ++--
.../index/addon-mod-book-index.html | 21 +--
.../index/addon-mod-chat-index.html | 26 +--
.../index/addon-mod-choice-index.html | 25 +--
.../index/addon-mod-feedback-index.html | 47 +++---
.../index/addon-mod-imscp-index.html | 16 +-
.../index/addon-mod-lesson-index.html | 152 +++++++++---------
.../components/index/addon-mod-lti-index.html | 19 +--
.../index/addon-mod-resource-index.html | 22 +--
.../index/addon-mod-scorm-index.html | 90 +++++------
.../index/addon-mod-survey-index.html | 32 ++--
.../components/index/addon-mod-url-index.html | 23 ++-
.../index/addon-mod-workshop-index.html | 39 ++---
src/theme/theme.base.scss | 14 +-
src/theme/theme.light.scss | 4 +-
15 files changed, 288 insertions(+), 271 deletions(-)
diff --git a/src/addons/mod/bigbluebuttonbn/components/index/index.html b/src/addons/mod/bigbluebuttonbn/components/index/index.html
index f17bc8bf5..1463c7c65 100644
--- a/src/addons/mod/bigbluebuttonbn/components/index/index.html
+++ b/src/addons/mod/bigbluebuttonbn/components/index/index.html
@@ -94,15 +94,6 @@
-
- {{ 'addon.mod_bigbluebuttonbn.view_conference_action_join' | translate }}
-
-
-
- {{ 'addon.mod_bigbluebuttonbn.view_conference_action_end' | translate }}
-
-
@@ -110,8 +101,20 @@
-
-
-
+
+
+
+ {{ 'addon.mod_bigbluebuttonbn.view_conference_action_end' | translate }}
+
+
+ {{ 'addon.mod_bigbluebuttonbn.view_conference_action_join' | translate }}
+
+
+
+
+
+
+
diff --git a/src/addons/mod/book/components/index/addon-mod-book-index.html b/src/addons/mod/book/components/index/addon-mod-book-index.html
index cdd809546..5e95da64d 100644
--- a/src/addons/mod/book/components/index/addon-mod-book-index.html
+++ b/src/addons/mod/book/components/index/addon-mod-book-index.html
@@ -31,16 +31,17 @@
-
-
- {{ 'core.start' | translate }}
- {{ 'core.resume' | translate }}
-
-
-
+
+
+
+ {{ 'core.start' | translate }}
+ {{ 'core.resume' | translate }}
+
+
-
-
+
+
+
+
diff --git a/src/addons/mod/chat/components/index/addon-mod-chat-index.html b/src/addons/mod/chat/components/index/addon-mod-chat-index.html
index 52c2a5cc4..764e01db2 100644
--- a/src/addons/mod/chat/components/index/addon-mod-chat-index.html
+++ b/src/addons/mod/chat/components/index/addon-mod-chat-index.html
@@ -20,16 +20,18 @@
-
-
- {{ 'addon.mod_chat.enterchat' | translate }}
-
-
- {{ 'addon.mod_chat.viewreport' | translate }}
-
-
-
+
+ {{ 'addon.mod_chat.viewreport' | translate }}
+
-
-
+
+
+
+ {{ 'addon.mod_chat.enterchat' | translate }}
+
+
+
+
+
+
+
diff --git a/src/addons/mod/choice/components/index/addon-mod-choice-index.html b/src/addons/mod/choice/components/index/addon-mod-choice-index.html
index f5620647c..be4e8eb0b 100644
--- a/src/addons/mod/choice/components/index/addon-mod-choice-index.html
+++ b/src/addons/mod/choice/components/index/addon-mod-choice-index.html
@@ -64,12 +64,6 @@
-
- {{ 'addon.mod_choice.savemychoice' | translate }}
-
-
- {{ 'addon.mod_choice.removemychoice' | translate }}
-
@@ -139,11 +133,24 @@
+
+
+
+
+
+ {{ 'addon.mod_choice.removemychoice' | translate }}
+
+
+ {{ 'addon.mod_choice.savemychoice' | translate }}
+
+
+
+
+
+
-
-
+
diff --git a/src/addons/mod/feedback/components/index/addon-mod-feedback-index.html b/src/addons/mod/feedback/components/index/addon-mod-feedback-index.html
index 4ffa61d9a..00bc860e7 100644
--- a/src/addons/mod/feedback/components/index/addon-mod-feedback-index.html
+++ b/src/addons/mod/feedback/components/index/addon-mod-feedback-index.html
@@ -33,11 +33,28 @@
-
-
-
+
+
+
+
+ {{ 'addon.mod_feedback.preview' | translate }}
+
+
+
+ {{ 'addon.mod_feedback.complete_the_form' | translate }}
+
+
+ {{ 'addon.mod_feedback.continue_the_form' | translate }}
+
+
+
+
+
+
+
+
@@ -133,28 +150,6 @@
{{ 'addon.mod_feedback.non_anonymous' | translate }}
-
-
-
-
-
- {{ 'addon.mod_feedback.preview' | translate }}
-
-
-
-
-
- {{ 'addon.mod_feedback.complete_the_form' | translate }}
-
-
- {{ 'addon.mod_feedback.continue_the_form' | translate }}
-
-
-
-
-
-
-
diff --git a/src/addons/mod/imscp/components/index/addon-mod-imscp-index.html b/src/addons/mod/imscp/components/index/addon-mod-imscp-index.html
index 608162e22..e4cfff579 100644
--- a/src/addons/mod/imscp/components/index/addon-mod-imscp-index.html
+++ b/src/addons/mod/imscp/components/index/addon-mod-imscp-index.html
@@ -26,12 +26,12 @@
-
-
- 1 && false" [items]="navigationItems"
- (action)="loadItem($event)">
-
-
-
+
+
+ 1" [items]="navigationItems" (action)="loadItem($event)">
+
+
+
+
+
diff --git a/src/addons/mod/lesson/components/index/addon-mod-lesson-index.html b/src/addons/mod/lesson/components/index/addon-mod-lesson-index.html
index 188c0ca97..c2f13b4e5 100644
--- a/src/addons/mod/lesson/components/index/addon-mod-lesson-index.html
+++ b/src/addons/mod/lesson/components/index/addon-mod-lesson-index.html
@@ -38,84 +38,15 @@
{{ 'addon.mod_lesson.continue' | translate }}
-
-
+
-
-
-
-
- {{ 'addon.mod_lesson.retakefinishedinsync' | translate }}
-
-
-
- {{ 'addon.mod_lesson.review' | translate }}
-
-
-
-
-
-
-
-
-
-
-
-
- {{ 'core.no' | translate }}
-
-
-
-
- {{ 'core.yes' | translate }}
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ 'addon.mod_lesson.continue' | translate }}
-
-
-
-
-
-
-
-
-
-
-
-
- {{ 'core.start' | translate }}
-
-
-
- {{ 'addon.mod_lesson.preview' | translate }}
-
-
-
-
-
-
- {{ 'addon.mod_lesson.continue' | translate }}
-
-
-
+
@@ -277,8 +208,81 @@
+
+
-
-
+
+
+
+
+
+
+ {{ 'addon.mod_lesson.retakefinishedinsync' | translate }}
+
+
+
+ {{ 'addon.mod_lesson.review' | translate }}
+
+
+
+
+
+
+
+
+
+
+
+ {{ 'core.no' | translate }}
+
+
+
+
+ {{ 'core.yes' | translate }}
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ 'addon.mod_lesson.continue' | translate }}
+
+
+
+
+
+
+
+
+
+
+
+ {{ 'core.start' | translate }}
+
+
+
+ {{ 'addon.mod_lesson.preview' | translate }}
+
+
+
+
+
+ {{ 'addon.mod_lesson.continue' | translate }}
+
+
+
diff --git a/src/addons/mod/lti/components/index/addon-mod-lti-index.html b/src/addons/mod/lti/components/index/addon-mod-lti-index.html
index 217ee88b2..a85613113 100644
--- a/src/addons/mod/lti/components/index/addon-mod-lti-index.html
+++ b/src/addons/mod/lti/components/index/addon-mod-lti-index.html
@@ -13,14 +13,15 @@
[componentId]="componentId" [courseId]="courseId">
-
-
-
- {{ 'addon.mod_lti.launchactivity' | translate }}
-
+
+
+
+ {{ 'addon.mod_lti.launchactivity' | translate }}
+
+
+
+
+
+
-
-
-
diff --git a/src/addons/mod/resource/components/index/addon-mod-resource-index.html b/src/addons/mod/resource/components/index/addon-mod-resource-index.html
index 0fd7713b7..cf24bdd04 100644
--- a/src/addons/mod/resource/components/index/addon-mod-resource-index.html
+++ b/src/addons/mod/resource/components/index/addon-mod-resource-index.html
@@ -6,7 +6,7 @@
-
+
+
+
-
+
+
+
{{ 'core.play' | translate }}
@@ -88,15 +92,13 @@
-
+
{{ 'core.openwith' | translate }}
-
-
+
+
+
+
-
-
-
diff --git a/src/addons/mod/scorm/components/index/addon-mod-scorm-index.html b/src/addons/mod/scorm/components/index/addon-mod-scorm-index.html
index f3dc13496..0c2f0ea6c 100644
--- a/src/addons/mod/scorm/components/index/addon-mod-scorm-index.html
+++ b/src/addons/mod/scorm/components/index/addon-mod-scorm-index.html
@@ -21,7 +21,7 @@
-
+
@@ -155,32 +155,34 @@
+
-
-
-
-
- {{ errorMessage | translate }}
-
-
-
- {{ 'core.openinbrowser' | translate }}
-
-
-
+
+
+
+
+
+
+ {{ errorMessage | translate }}
+
+
+
+ {{ 'core.openinbrowser' | translate }}
+
+
+
-
-
-
-
- {{ 'addon.mod_scorm.exceededmaxattempts' | translate }}
-
-
-
+
+
+
+
+ {{ 'addon.mod_scorm.exceededmaxattempts' | translate }}
+
+
+
-
-
0)">
-
+ 0)">
+
0 && !incomplete && attemptsLeft > 0">
@@ -189,29 +191,21 @@
-
-
+
+
{{ statusMessage | translate }}
-
-
-
-
- {{ 'addon.mod_scorm.browse' | translate }}
-
-
-
-
-
- {{ 'addon.mod_scorm.enter' | translate }}
-
-
-
-
-
+
+
+ {{ 'addon.mod_scorm.browse' | translate }}
+
+
+ {{ 'addon.mod_scorm.enter' | translate }}
+
@@ -223,11 +217,9 @@
-
-
-
+
+
+
+
+
-
-
-
diff --git a/src/addons/mod/survey/components/index/addon-mod-survey-index.html b/src/addons/mod/survey/components/index/addon-mod-survey-index.html
index 6fd4d8906..431d04f34 100644
--- a/src/addons/mod/survey/components/index/addon-mod-survey-index.html
+++ b/src/addons/mod/survey/components/index/addon-mod-survey-index.html
@@ -21,10 +21,6 @@
{{ 'addon.mod_survey.surveycompletednograph' | translate }}
-
-
- {{ 'addon.mod_survey.results' | translate }}
-
@@ -119,18 +115,22 @@
-
-
-
-
- {{ 'core.submit' | translate }}
-
-
-
-
+
+
+
+ {{ 'addon.mod_survey.results' | translate }}
+
+
-
-
+
+ {{ 'core.submit' | translate }}
+
+
+
+
+
+
+
diff --git a/src/addons/mod/url/components/index/addon-mod-url-index.html b/src/addons/mod/url/components/index/addon-mod-url-index.html
index 9bd9966eb..734fbbe7e 100644
--- a/src/addons/mod/url/components/index/addon-mod-url-index.html
+++ b/src/addons/mod/url/components/index/addon-mod-url-index.html
@@ -35,17 +35,16 @@
{{ url }}
-
-
-
-
- {{ 'addon.mod_url.accessurl' | translate }}
-
-
-
-
-
-
+
+
+
+
+ {{ 'addon.mod_url.accessurl' | translate }}
+
+
+
+
+
+
diff --git a/src/addons/mod/workshop/components/index/addon-mod-workshop-index.html b/src/addons/mod/workshop/components/index/addon-mod-workshop-index.html
index adc5c72e4..7ce927fb2 100644
--- a/src/addons/mod/workshop/components/index/addon-mod-workshop-index.html
+++ b/src/addons/mod/workshop/components/index/addon-mod-workshop-index.html
@@ -117,20 +117,6 @@
-
-
-
-
-
-
- {{ 'addon.mod_workshop.createsubmission' | translate }}
-
-
-
- {{ 'addon.mod_workshop.editsubmission' | translate }}
-
-
-
@@ -231,8 +217,25 @@
-
-
-
+
+
+
= PHASE_SUBMISSION && canSubmit && showSubmit &&
+ ((access.creatingsubmissionallowed && !submission) || (access.modifyingsubmissionallowed && submission))">
+
+
+
+ {{ 'addon.mod_workshop.createsubmission' | translate }}
+
+
+
+ {{ 'addon.mod_workshop.editsubmission' | translate }}
+
+
+
+
+
+
+
diff --git a/src/theme/theme.base.scss b/src/theme/theme.base.scss
index 8261707ae..f3d4ef15b 100644
--- a/src/theme/theme.base.scss
+++ b/src/theme/theme.base.scss
@@ -140,7 +140,7 @@ body {
@each $color-name, $unused in $colors {
.text-#{$color-name},
p.text-#{$color-name} {
- color: var(--ion-color-#{$color-name});
+ color: var(--ion-color-#{$color-name}) !important;
}
}
@@ -831,8 +831,8 @@ ion-list.core-course-module-list-wrapper,
.list-item-limited-width,
.core-course-module-list-wrapper {
max-width: var(--list-item--max-width);
- margin-left: auto;
- margin-right: auto;
+ margin-left: auto !important;
+ margin-right: auto !important;
}
ion-toolbar h1 img.core-bar-button-image,
@@ -1451,13 +1451,19 @@ ion-grid.core-no-grid > ion-row {
--core-collapsible-footer-height: auto;
}
+ .ion-margin {
+ margin-top: 8px;
+ margin-bottom: 8px;
+ }
+
+ filter: var(--scroll-shadow-top, none);
+ -webkit-filter: var(--scroll-shadow-top, none);
width: 100%;
bottom: 0;
z-index: 3;
height: var(--core-collapsible-footer-height, auto);
background-color: var(--core-collapsible-footer-background);
display: block;
- border-top: 1px solid var(--stroke);
@include core-transition(all, 200ms);
}
diff --git a/src/theme/theme.light.scss b/src/theme/theme.light.scss
index 34fa46c45..febfd5762 100644
--- a/src/theme/theme.light.scss
+++ b/src/theme/theme.light.scss
@@ -334,7 +334,9 @@
--addon-forum-border-color: var(--stroke);
--addon-forum-highlight-color: var(--light);
- --drop-shadow: 0, 0, 0, 0.18;
+ --drop-shadow: 0, 0, 0, 0.5;
+ --scroll-shadow-bottom: drop-shadow(0px 3px 3px rgba(var(--drop-shadow)));
+ --scroll-shadow-top: drop-shadow(0px 3px 3px rgba(var(--drop-shadow)));
--core-question-correct-color: var(--success-shade);
--core-question-correct-color-bg: var(--success-tint);
From 079d914de6daa96a2995ff205b49b3ac6f8e13df Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pau=20Ferrer=20Oca=C3=B1a?=
Date: Fri, 25 Feb 2022 11:37:31 +0100
Subject: [PATCH 05/10] MOBILE-3149 style: Fix collapsible items on tablet
---
src/core/directives/collapsible-item.ts | 6 +++++-
src/core/directives/format-text.ts | 7 +++++--
src/theme/globals.mixins.scss | 1 +
3 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/src/core/directives/collapsible-item.ts b/src/core/directives/collapsible-item.ts
index d572a0586..5556d8669 100644
--- a/src/core/directives/collapsible-item.ts
+++ b/src/core/directives/collapsible-item.ts
@@ -153,7 +153,11 @@ export class CoreCollapsibleItemDirective implements OnInit {
this.expanded = expand;
this.element.classList.toggle('collapsible-expanded', expand);
this.element.classList.toggle('collapsible-collapsed', !expand);
- this.element.style.maxHeight = expand ? '' : (this.maxHeight + buttonHeight) + 'px';
+ if (expand) {
+ this.element.style.setProperty('--max-height', this.maxHeight + buttonHeight + 'px');
+ } else {
+ this.element.style.removeProperty('--max-height');
+ }
const toggleButton = this.element.querySelector('ion-button.collapsible-toggle');
const toggleText = toggleButton?.querySelector('.collapsible-toggle-text');
diff --git a/src/core/directives/format-text.ts b/src/core/directives/format-text.ts
index cf080adea..959735eef 100644
--- a/src/core/directives/format-text.ts
+++ b/src/core/directives/format-text.ts
@@ -320,8 +320,11 @@ export class CoreFormatTextDirective implements OnChanges {
this.expanded = expand;
this.element.classList.toggle('collapsible-expanded', expand);
this.element.classList.toggle('collapsible-collapsed', !expand);
- this.element.style.maxHeight = expand ? '' : this.maxHeight + 'px';
-
+ if (expand) {
+ this.element.style.setProperty('--max-height', this.maxHeight + 'px');
+ } else {
+ this.element.style.removeProperty('--max-height');
+ }
const toggleButton = this.element.querySelector('ion-button.collapsible-toggle');
const toggleText = toggleButton?.querySelector('.collapsible-toggle-text');
if (!toggleButton || !toggleText) {
diff --git a/src/theme/globals.mixins.scss b/src/theme/globals.mixins.scss
index f9529da61..2199bf76b 100644
--- a/src/theme/globals.mixins.scss
+++ b/src/theme/globals.mixins.scss
@@ -270,6 +270,7 @@
&.collapsible-collapsed {
overflow: hidden;
min-height: calc(var(--collapsible-min-button-height) + 12px);
+ max-height: calc(var(--max-height), auto);
.collapsible-toggle-arrow {
transform: rotate(90deg);
From be1bacba0c05a244240c4091884ee35e1178048f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pau=20Ferrer=20Oca=C3=B1a?=
Date: Fri, 25 Feb 2022 12:01:09 +0100
Subject: [PATCH 06/10] MOBILE-3149 style: Remove hide-detail
---
.../assign/components/index/addon-mod-assign-index.html | 8 ++++----
.../components/index/addon-mod-feedback-index.html | 4 ++--
.../h5pactivity/pages/user-attempts/user-attempts.html | 2 +-
.../h5pactivity/pages/users-attempts/users-attempts.html | 2 +-
src/theme/theme.base.scss | 5 -----
5 files changed, 8 insertions(+), 13 deletions(-)
diff --git a/src/addons/mod/assign/components/index/addon-mod-assign-index.html b/src/addons/mod/assign/components/index/addon-mod-assign-index.html
index a11a4b319..4072066ff 100644
--- a/src/addons/mod/assign/components/index/addon-mod-assign-index.html
+++ b/src/addons/mod/assign/components/index/addon-mod-assign-index.html
@@ -65,7 +65,7 @@
{{ 'addon.mod_assign.numberofdraftsubmissions' | translate }}
@@ -80,8 +80,8 @@
-
{{ 'addon.mod_assign.numberofsubmittedassignments' | translate }}
@@ -97,7 +97,7 @@
{{ 'addon.mod_assign.numberofsubmissionsneedgrading' | translate }}
diff --git a/src/addons/mod/feedback/components/index/addon-mod-feedback-index.html b/src/addons/mod/feedback/components/index/addon-mod-feedback-index.html
index 00bc860e7..bf91cdaec 100644
--- a/src/addons/mod/feedback/components/index/addon-mod-feedback-index.html
+++ b/src/addons/mod/feedback/components/index/addon-mod-feedback-index.html
@@ -70,8 +70,8 @@
- 0)"
- detail="true" [button]="access.canviewreports && completedCount > 0">
+ 0"
+ [button]="access.canviewreports && completedCount > 0">
{{ 'addon.mod_feedback.completed_feedbacks' | translate }}
diff --git a/src/addons/mod/h5pactivity/pages/user-attempts/user-attempts.html b/src/addons/mod/h5pactivity/pages/user-attempts/user-attempts.html
index 5432ccb09..fe477e1e8 100644
--- a/src/addons/mod/h5pactivity/pages/user-attempts/user-attempts.html
+++ b/src/addons/mod/h5pactivity/pages/user-attempts/user-attempts.html
@@ -65,7 +65,7 @@
-