From 6a11ea5d5576a4fe29220e553efbf0fdc7de5975 Mon Sep 17 00:00:00 2001 From: Dani Palou Date: Mon, 12 Dec 2022 11:52:56 +0100 Subject: [PATCH 1/4] MOBILE-4081 config: Add Albanian language --- moodle.config.json | 1 + 1 file changed, 1 insertion(+) diff --git a/moodle.config.json b/moodle.config.json index 8ffef01a4..d345c5ec3 100644 --- a/moodle.config.json +++ b/moodle.config.json @@ -53,6 +53,7 @@ "ro": "Română", "ru": "Русский", "sl": "Slovenščina", + "sq": "Shqip", "sr-cr": "Српски", "sr-lt": "Srpski", "sv": "Svenska", From efca5aa61c1cd2d4850b6d8f3fe8388e131ae16c Mon Sep 17 00:00:00 2001 From: Dani Palou Date: Tue, 13 Dec 2022 08:09:20 +0100 Subject: [PATCH 2/4] MOBILE-4081 user: Fix offline preference not synchronized --- src/core/features/user/services/user-offline.ts | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/core/features/user/services/user-offline.ts b/src/core/features/user/services/user-offline.ts index 8d10efa46..09d060685 100644 --- a/src/core/features/user/services/user-offline.ts +++ b/src/core/features/user/services/user-offline.ts @@ -15,6 +15,7 @@ import { Injectable } from '@angular/core'; import { CoreSites } from '@services/sites'; +import { CoreUtils } from '@services/utils/utils'; import { makeSingleton } from '@singletons'; import { PREFERENCES_TABLE_NAME, CoreUserPreferenceDBRecord } from './database/user'; @@ -33,7 +34,10 @@ export class CoreUserOfflineProvider { async getChangedPreferences(siteId?: string): Promise { const site = await CoreSites.getSite(siteId); - return site.getDb().getRecordsSelect(PREFERENCES_TABLE_NAME, 'value != onlineValue'); + return site.getDb().getRecordsSelect( + PREFERENCES_TABLE_NAME, + 'value != onlinevalue OR onlinevalue IS NULL', + ); } /** @@ -64,8 +68,19 @@ export class CoreUserOfflineProvider { const record: Partial = { name, value, + onlinevalue: onlineValue, }; + if (onlineValue === undefined) { + // Keep online value already stored (if any). + const entry = await CoreUtils.ignoreErrors( + site.getDb().getRecord(PREFERENCES_TABLE_NAME, { name }), + null, + ); + + record.onlinevalue = entry?.onlinevalue; + } + await site.getDb().insertRecord(PREFERENCES_TABLE_NAME, record); } From f5fcaecf48fb8cb43ddf3bfced0e00a3b62ef3b3 Mon Sep 17 00:00:00 2001 From: Dani Palou Date: Tue, 13 Dec 2022 09:48:22 +0100 Subject: [PATCH 3/4] MOBILE-4081 assign: Fix buttons display in big screens --- .../components/submission/addon-mod-assign-submission.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/addons/mod/assign/components/submission/addon-mod-assign-submission.html b/src/addons/mod/assign/components/submission/addon-mod-assign-submission.html index a3e2145f0..2d8ec7e07 100644 --- a/src/addons/mod/assign/components/submission/addon-mod-assign-submission.html +++ b/src/addons/mod/assign/components/submission/addon-mod-assign-submission.html @@ -166,7 +166,7 @@
-
+
From 5d5e436a8d57a707d2ea9e8c243deb6897c433f2 Mon Sep 17 00:00:00 2001 From: Dani Palou Date: Tue, 13 Dec 2022 12:23:55 +0100 Subject: [PATCH 4/4] MOBILE-4081 calendar: Fix site home event not displayed --- src/addons/calendar/services/calendar-helper.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/addons/calendar/services/calendar-helper.ts b/src/addons/calendar/services/calendar-helper.ts index bfe8f04df..024d099aa 100644 --- a/src/addons/calendar/services/calendar-helper.ts +++ b/src/addons/calendar/services/calendar-helper.ts @@ -617,7 +617,7 @@ export class AddonCalendarHelperProvider { const eventCourse = (event.course && event.course.id) || event.courseid; // Show the event if it is from site home or if it matches the selected course. - return !!eventCourse && (eventCourse == CoreSites.getCurrentSiteHomeId() || eventCourse == courseId); + return !eventCourse || (eventCourse === CoreSites.getCurrentSiteHomeId() || eventCourse === courseId); } /**