Merge pull request #3159 from dpalou/MOBILE-3967

MOBILE-3967 course: Add config to always use legacy completion
main
Pau Ferrer Ocaña 2022-03-07 13:07:00 +01:00 committed by GitHub
commit 7f34da3462
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View File

@ -66,7 +66,9 @@ export class CoreCourseModuleComponent implements OnInit, OnDestroy {
*/ */
async ngOnInit(): Promise<void> { async ngOnInit(): Promise<void> {
this.modNameTranslated = CoreCourse.translateModuleName(this.module.modname) || ''; this.modNameTranslated = CoreCourse.translateModuleName(this.module.modname) || '';
this.showLegacyCompletion = this.showLegacyCompletion ?? !CoreSites.getCurrentSite()?.isVersionGreaterEqualThan('3.11'); this.showLegacyCompletion = this.showLegacyCompletion ??
CoreConstants.CONFIG.uselegacycompletion ??
!CoreSites.getCurrentSite()?.isVersionGreaterEqualThan('3.11');
this.checkShowManualCompletion(); this.checkShowManualCompletion();
if (!this.module.handlerData) { if (!this.module.handlerData) {

View File

@ -65,4 +65,5 @@ export interface EnvironmentConfig {
wsrequestqueuedelay: number; // Maximum number of miliseconds to wait before processing the queue. wsrequestqueuedelay: number; // Maximum number of miliseconds to wait before processing the queue.
calendarreminderdefaultvalue: number; // Initial value for default reminders (in seconds). User can change it later. calendarreminderdefaultvalue: number; // Initial value for default reminders (in seconds). User can change it later.
removeaccountonlogout?: boolean; // True to remove the account when the user clicks logout. Doesn't affect switch account. removeaccountonlogout?: boolean; // True to remove the account when the user clicks logout. Doesn't affect switch account.
uselegacycompletion?: boolean; // Whether to use legacy completion by default in all course formats.
} }