diff --git a/src/addon/mod/forum/components/post/post.scss b/src/addon/mod/forum/components/post/post.scss index 995dc2f13..96f1b39dd 100644 --- a/src/addon/mod/forum/components/post/post.scss +++ b/src/addon/mod/forum/components/post/post.scss @@ -2,6 +2,10 @@ ion-app.app-root addon-mod-forum-post .addon-mod_forum-post { background-color: $white; border-bottom: 1px solid $list-md-border-color; + @include darkmode() { + background-color: $core-dark-item-bg-color; + } + .addon-forum-star { color: $core-star-color; } diff --git a/src/addon/mod/forum/pages/discussion/discussion.scss b/src/addon/mod/forum/pages/discussion/discussion.scss index 54d9b1f0c..fcc1213fd 100644 --- a/src/addon/mod/forum/pages/discussion/discussion.scss +++ b/src/addon/mod/forum/pages/discussion/discussion.scss @@ -2,7 +2,7 @@ ion-app.app-root page-addon-mod-forum-discussion { .highlight .card-header .item { background-color: $gray-lighter; @include darkmode() { - background-color: $black; + background-color: $gray-dark; } } diff --git a/src/addon/mod/forum/pages/discussion/discussion.ts b/src/addon/mod/forum/pages/discussion/discussion.ts index e49b8684d..48fa5d18a 100644 --- a/src/addon/mod/forum/pages/discussion/discussion.ts +++ b/src/addon/mod/forum/pages/discussion/discussion.ts @@ -22,6 +22,7 @@ import { CoreSitesProvider } from '@providers/sites'; import { CoreDomUtilsProvider } from '@providers/utils/dom'; import { CoreUtilsProvider } from '@providers/utils/utils'; import { CoreFileUploaderProvider } from '@core/fileuploader/providers/fileuploader'; +import { CoreUserProvider } from '@core/user/providers/user'; import { CoreSplitViewComponent } from '@components/split-view/split-view'; import { CoreRatingProvider, CoreRatingInfo } from '@core/rating/providers/rating'; import { CoreRatingOfflineProvider } from '@core/rating/providers/offline'; @@ -57,7 +58,7 @@ export class AddonModForumDiscussionPage implements OnDestroy { isOnline: boolean; isSplitViewOn: boolean; postHasOffline: boolean; - sort: SortType = 'flat-oldest'; + sort: SortType = 'nested'; trackPosts: boolean; replyData = { replyingTo: 0, @@ -96,19 +97,20 @@ export class AddonModForumDiscussionPage implements OnDestroy { constructor(navParams: NavParams, network: Network, zone: NgZone, - private appProvider: CoreAppProvider, - private eventsProvider: CoreEventsProvider, - private sitesProvider: CoreSitesProvider, - private domUtils: CoreDomUtilsProvider, - private utils: CoreUtilsProvider, - private translate: TranslateService, - private uploaderProvider: CoreFileUploaderProvider, - private forumProvider: AddonModForumProvider, - private forumOffline: AddonModForumOfflineProvider, - private forumHelper: AddonModForumHelperProvider, - private forumSync: AddonModForumSyncProvider, - private ratingOffline: CoreRatingOfflineProvider, - @Optional() private svComponent: CoreSplitViewComponent, + protected appProvider: CoreAppProvider, + protected eventsProvider: CoreEventsProvider, + protected sitesProvider: CoreSitesProvider, + protected domUtils: CoreDomUtilsProvider, + protected utils: CoreUtilsProvider, + protected translate: TranslateService, + protected uploaderProvider: CoreFileUploaderProvider, + protected forumProvider: AddonModForumProvider, + protected forumOffline: AddonModForumOfflineProvider, + protected forumHelper: AddonModForumHelperProvider, + protected forumSync: AddonModForumSyncProvider, + protected ratingOffline: CoreRatingOfflineProvider, + protected userProvider: CoreUserProvider, + @Optional() protected svComponent: CoreSplitViewComponent, protected navCtrl: NavController) { this.courseId = navParams.get('courseId'); this.cmId = navParams.get('cmId'); @@ -134,7 +136,29 @@ export class AddonModForumDiscussionPage implements OnDestroy { * View loaded. */ ionViewDidLoad(): void { - this.sitesProvider.getCurrentSite().getLocalSiteConfig('AddonModForumDiscussionSort', this.sort).then((value) => { + this.sitesProvider.getCurrentSite().getLocalSiteConfig('AddonModForumDiscussionSort').catch(() => { + this.userProvider.getUserPreference('forum_displaymode').catch(() => { + // Ignore errors. + }).then((value) => { + const sortValue = value && parseInt(value, 10); + + switch (sortValue) { + case 1: + this.sort = 'flat-oldest'; + break; + case -1: + this.sort = 'flat-newest'; + break; + case 3: + this.sort = 'nested'; + break; + case 2: // Threaded not implemented. + default: + // Not set, use default sort. + // @TODO add fallback to $CFG->forum_displaymode. + } + }); + }).then((value) => { this.sort = value; }).finally(() => { this.fetchPosts(true, false, true).then(() => { diff --git a/src/addon/mod/scorm/components/index/addon-mod-scorm-index.html b/src/addon/mod/scorm/components/index/addon-mod-scorm-index.html index 265323472..c7f421705 100644 --- a/src/addon/mod/scorm/components/index/addon-mod-scorm-index.html +++ b/src/addon/mod/scorm/components/index/addon-mod-scorm-index.html @@ -51,8 +51,8 @@

{{ 'addon.mod_scorm.gradeforattempt' | translate }} {{attempt.number}}

{{ attempt.grade }}

{{ 'addon.mod_scorm.cannotcalculategrade' | translate }}

-

{{ 'addon.mod_scorm.offlineattemptnote' | translate }}

-

{{ 'addon.mod_scorm.offlineattemptovermax' | translate }}

+

{{ 'addon.mod_scorm.offlineattemptnote' | translate }}

+

{{ 'addon.mod_scorm.offlineattemptovermax' | translate }}

{{ 'addon.mod_scorm.grademethod' | translate }}

@@ -95,9 +95,9 @@

{{ 'addon.mod_scorm.dataattemptshown' | translate:{number: attemptToContinue} }}

{{ currentOrganization.title }}

-
+

- + ({{ 'addon.mod_scorm.score' | translate }}: {{sco.score_raw}}) diff --git a/src/addon/mod/scorm/components/index/index.scss b/src/addon/mod/scorm/components/index/index.scss index 67f01dcb6..763ae6067 100644 --- a/src/addon/mod/scorm/components/index/index.scss +++ b/src/addon/mod/scorm/components/index/index.scss @@ -1,9 +1,13 @@ -ion-app.app-root addon-mod-scorm-index { - +ion-app.app-root addon-mod-scorm-index, +ion-app.app-root page-addon-mod-scorm-toc { .addon-mod_scorm-toc { - img { - width: auto; - display: inline; + // Hide all non sco icons using css to maintain padding. + ion-icon { + opacity: 0; + } + + .addon-mod_scorm-type-sco ion-icon { + opacity: 1 } } } diff --git a/src/addon/mod/scorm/pages/toc/toc.html b/src/addon/mod/scorm/pages/toc/toc.html index 0cff8c294..0ce9163f0 100644 --- a/src/addon/mod/scorm/pages/toc/toc.html +++ b/src/addon/mod/scorm/pages/toc/toc.html @@ -10,7 +10,7 @@