@@ -76,10 +67,9 @@
-
+
+ [moduleName]="module.name" [moduleId]="module.id" [showCompletionConditions]="showCompletionConditions">
diff --git a/src/core/features/course/components/module/module.scss b/src/core/features/course/components/module/module.scss
index 9048f93d7..cce3cd2aa 100644
--- a/src/core/features/course/components/module/module.scss
+++ b/src/core/features/course/components/module/module.scss
@@ -38,10 +38,6 @@
}
.core-course-module-info {
- ion-badge {
- text-align: start;
- }
-
.core-module-availabilityinfo {
font-size: 90%;
ul {
diff --git a/src/core/features/course/components/module/module.ts b/src/core/features/course/components/module/module.ts
index fa25f2e50..d3964f732 100644
--- a/src/core/features/course/components/module/module.ts
+++ b/src/core/features/course/components/module/module.ts
@@ -20,7 +20,7 @@ import {
CoreCourseModuleCompletionData,
CoreCourseSection,
} from '@features/course/services/course-helper';
-import { CoreCourse, CoreCourseModuleCompletionStatus, CoreCourseModuleCompletionTracking } from '@features/course/services/course';
+import { CoreCourse } from '@features/course/services/course';
import { CoreCourseModuleDelegate, CoreCourseModuleHandlerButton } from '@features/course/services/module-delegate';
/**
@@ -47,7 +47,6 @@ export class CoreCourseModuleComponent implements OnInit, OnDestroy {
hasInfo = false;
showLegacyCompletion = false; // Whether to show module completion in the old format.
showManualCompletion = false; // Whether to show manual completion when completion conditions are disabled.
- completionStatus?: CoreCourseModuleCompletionStatus;
/**
* Component being initialized.
@@ -62,19 +61,11 @@ export class CoreCourseModuleComponent implements OnInit, OnDestroy {
}
this.module.handlerData.a11yTitle = this.module.handlerData.a11yTitle ?? this.module.handlerData.title;
- this.completionStatus = this.module.completiondata === undefined ||
- !this.module.completiondata?.istrackeduser ||
- this.module.completiondata.tracking == CoreCourseModuleCompletionTracking.COMPLETION_TRACKING_NONE
- ? undefined
- : this.module.completiondata.state;
this.hasInfo = !!(
this.module.description ||
(this.showActivityDates && this.module.dates && this.module.dates.length) ||
- (this.module.completiondata &&
- ((this.showManualCompletion && !this.module.completiondata.isautomatic) ||
- (this.showCompletionConditions && this.module.completiondata.isautomatic))
- ) ||
+ (this.module.completiondata && this.showCompletionConditions && this.module.completiondata.isautomatic) ||
this.module.completiondata?.offline ||
(this.module.visible === 0 && (!this.section || this.section.visible)) ||
(this.module.visible !== 0 && this.module.isStealth) ||
diff --git a/src/core/features/course/services/course.ts b/src/core/features/course/services/course.ts
index fa30f2991..565198a71 100644
--- a/src/core/features/course/services/course.ts
+++ b/src/core/features/course/services/course.ts
@@ -76,6 +76,11 @@ export enum CoreCourseCompletionType {
AUTO = 1,
}
+export enum CoreCourseCompletionMode {
+ FULL = 'full',
+ BASIC = 'basic',
+}
+
/**
* Completion tracking valid values.
*/
diff --git a/src/theme/theme.base.scss b/src/theme/theme.base.scss
index 1a92c7795..0100acc6b 100644
--- a/src/theme/theme.base.scss
+++ b/src/theme/theme.base.scss
@@ -184,44 +184,6 @@ ion-app.ios ion-header ion-title {
white-space: normal !important;
}
-ion-button core-format-text .core-format-text-content {
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- display: block;
- line-height: 1.2;
-}
-
-ion-button > * {
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
-}
-
-ion-button.ion-text-wrap {
- white-space: normal;
- core-format-text .core-format-text-content {
- white-space: normal;
- display: contents;
- }
-
- & > * {
- white-space: normal;
- }
-}
-
-ion-button.button-outline {
- --background: var(--contrast-background);
-}
-
-ion-button ion-spinner {
- --color: inherit !important;
-}
-
-ion-button:not(.button-has-icon-only) > ion-icon {
- min-width: 20px;
-}
-
@each $color-name, $unused in $colors {
.text-#{$color-name},
p.text-#{$color-name} {
@@ -293,10 +255,6 @@ ion-icon {
}
}
-ion-button.button-small ion-icon.faicon[slot] {
- font-size: 1.5em !important;
-}
-
// Buttons.
ion-button,
ion-fab-button,
@@ -306,10 +264,58 @@ button,
min-width: var(--a11y-min-target-size);
}
+ion-button.button-outline {
+ --border-width: 1px;
+ --background: var(--contrast-background);
+}
+
+ion-button.button-solid {
+ --box-shadow: none;
+}
+
+ion-button core-format-text .core-format-text-content {
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ display: block;
+ line-height: 1.2;
+}
+
+ion-button > * {
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+}
+
+ion-button.ion-text-wrap {
+ white-space: normal;
+ core-format-text .core-format-text-content {
+ white-space: normal;
+ display: contents;
+ }
+
+ & > * {
+ white-space: normal;
+ }
+}
+
+ion-button ion-spinner {
+ --color: inherit !important;
+}
+
+ion-button:not(.button-has-icon-only):not(.button-small) > ion-icon {
+ min-width: 20px;
+}
+
ion-button.button.button-clear.button-has-icon-only {
--border-radius: var(--huge-radius);
}
+ion-button.button.button-solid,
+ion-button.button.button-outline {
+ --border-radius: var(--small-radius);
+}
+
// Clear buttons will be black.
ion-button.button-clear {
--primary: var(--primary);
@@ -877,12 +883,14 @@ ion-badge {
border-radius: var(--big-radius);
}
-ion-chip {
+ion-chip,
+ion-button.chip {
line-height: 1.1;
font-size: 12px;
- padding: 4px 8px;
min-height: 24px;
- height: auto;
+ text-transform: none;
+ margin: 4px;
+ font-weight: normal;
ion-icon {
font-size: 16px;
@@ -890,6 +898,18 @@ ion-chip {
@include margin(0, 8px, 0, 0);
}
+ ion-label {
+ white-space: normal !important;
+ }
+}
+
+ion-chip {
+ line-height: 1.1;
+ font-size: 12px;
+ padding: 4px 8px;
+ min-height: 24px;
+ height: auto;
+
&.ion-color {
background: var(--ion-color-tint);
&.chip-outline {
@@ -899,9 +919,7 @@ ion-chip {
}
}
- ion-label {
- white-space: normal !important;
- }
+
}
ion-searchbar {