MOBILE-3163 core: Remove Classic app warning
parent
7471f54f9c
commit
45a05c261c
|
@ -1568,7 +1568,7 @@
|
|||
"core.login.changepasswordhelp": "If you have problems changing your password, please contact your site administrator. \"Site Administrators\" are the people who manages the Moodle at your school/university/company or learning organisation. If you don't know how to contact them, please contact your teachers/trainers.",
|
||||
"core.login.changepasswordlogoutinstructions": "If you prefer to change site or log out, please click the following button:",
|
||||
"core.login.changepasswordreconnectinstructions": "Click the following button to reconnect to the site. (Take into account that if you didn't change your password successfully, you would return to the previous screen).",
|
||||
"core.login.checksiteversion": "Check that your site uses Moodle 2.4 or later.",
|
||||
"core.login.checksiteversion": "Check that your site uses Moodle 3.1 or later.",
|
||||
"core.login.confirmdeletesite": "Are you sure you want to delete the site {{sitename}}?",
|
||||
"core.login.connect": "Connect!",
|
||||
"core.login.connecttomoodle": "Connect to Moodle",
|
||||
|
@ -1598,15 +1598,12 @@
|
|||
"core.login.invalidaccount": "Please check your login details or ask your site administrator to check the site configuration.",
|
||||
"core.login.invaliddate": "Invalid date",
|
||||
"core.login.invalidemail": "Invalid email address",
|
||||
"core.login.invalidmoodleversion": "Invalid Moodle version. The minimum version required is 2.4.",
|
||||
"core.login.invalidmoodleversion": "Invalid Moodle version. The minimum version required is 3.1.",
|
||||
"core.login.invalidsite": "The site URL is invalid.",
|
||||
"core.login.invalidtime": "Invalid time",
|
||||
"core.login.invalidurl": "Invalid URL specified",
|
||||
"core.login.invalidvaluemax": "The maximum value is {{$a}}",
|
||||
"core.login.invalidvaluemin": "The minimum value is {{$a}}",
|
||||
"core.login.legacymoodleversion": "You are trying to connect to an unsupported Moodle version. Please download the Moodle Classic app to access this Moodle site.",
|
||||
"core.login.legacymoodleversiondesktop": "You are trying to connect to <b>{{$a}}</b>.<br><br>This site is running an outdated unsupported version of Moodle which will not work with this Moodle Desktop App.<br><br>If this is your site please contact your local moodle partner to get assistance to update it.<br><br>See <a href=\"https://moodle.com/contact\">our contact page</a> to submit a request for assistance.",
|
||||
"core.login.legacymoodleversiondesktopdownloadold": "<br><br>Alternatively, you can still access this site using an unsupported version of the app that can be downloaded from here.",
|
||||
"core.login.localmobileunexpectedresponse": "Moodle Mobile Additional Features check returned an unexpected response. You will be authenticated using the standard mobile service.",
|
||||
"core.login.loggedoutssodescription": "You have to authenticate again. You need to log in to the site in a browser window.",
|
||||
"core.login.login": "Log in",
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
"auth_email": "Email-based self-registration",
|
||||
"authenticating": "Authenticating",
|
||||
"cancel": "Cancel",
|
||||
"checksiteversion": "Check that your site uses Moodle 2.4 or later.",
|
||||
"checksiteversion": "Check that your site uses Moodle 3.1 or later.",
|
||||
"changepassword": "Change password",
|
||||
"changepasswordbutton": "Open the change password page",
|
||||
"changepasswordhelp": "If you have problems changing your password, please contact your site administrator. \"Site Administrators\" are the people who manages the Moodle at your school/university/company or learning organisation. If you don't know how to contact them, please contact your teachers/trainers.",
|
||||
|
@ -38,15 +38,12 @@
|
|||
"invalidaccount": "Please check your login details or ask your site administrator to check the site configuration.",
|
||||
"invaliddate": "Invalid date",
|
||||
"invalidemail": "Invalid email address",
|
||||
"invalidmoodleversion": "Invalid Moodle version. The minimum version required is 2.4.",
|
||||
"invalidmoodleversion": "Invalid Moodle version. The minimum version required is 3.1.",
|
||||
"invalidsite": "The site URL is invalid.",
|
||||
"invalidtime": "Invalid time",
|
||||
"invalidurl": "Invalid URL specified",
|
||||
"invalidvaluemax": "The maximum value is {{$a}}",
|
||||
"invalidvaluemin": "The minimum value is {{$a}}",
|
||||
"legacymoodleversion": "You are trying to connect to an unsupported Moodle version. Please download the Moodle Classic app to access this Moodle site.",
|
||||
"legacymoodleversiondesktop": "You are trying to connect to <b>{{$a}}</b>.<br><br>This site is running an outdated unsupported version of Moodle which will not work with this Moodle Desktop App.<br><br>If this is your site please contact your local moodle partner to get assistance to update it.<br><br>See <a href=\"https://moodle.com/contact\">our contact page</a> to submit a request for assistance.",
|
||||
"legacymoodleversiondesktopdownloadold": "<br><br>Alternatively, you can still access this site using an unsupported version of the app that can be downloaded from here.",
|
||||
"localmobileunexpectedresponse": "Moodle Mobile Additional Features check returned an unexpected response. You will be authenticated using the standard mobile service.",
|
||||
"loggedoutssodescription": "You have to authenticate again. You need to log in to the site in a browser window.",
|
||||
"login": "Log in",
|
||||
|
|
|
@ -1055,28 +1055,6 @@ export class CoreLoginHelperProvider {
|
|||
(!CoreConfigConstants.skipssoconfirmation || String(CoreConfigConstants.skipssoconfirmation) === 'false');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show a modal warning the user that he should use the Classic app.
|
||||
*
|
||||
* @param message The warning message.
|
||||
*/
|
||||
protected showLegacyNoticeModal(message: string): void {
|
||||
let link;
|
||||
|
||||
if (this.appProvider.isWindows()) {
|
||||
link = 'https://download.moodle.org/desktop/download.php?platform=windows&version=342';
|
||||
} else if (this.appProvider.isLinux()) {
|
||||
link = 'https://download.moodle.org/desktop/download.php?platform=linux&version=342&arch=' +
|
||||
(this.appProvider.is64Bits() ? '64' : '32');
|
||||
} else if (this.platform.is('android')) {
|
||||
link = 'market://details?id=com.moodle.classic';
|
||||
} else if (this.platform.is('ios')) {
|
||||
link = 'itms-apps://itunes.apple.com/app/id1403448117';
|
||||
}
|
||||
|
||||
this.showDownloadAppNoticeModal(message, link);
|
||||
}
|
||||
|
||||
/**
|
||||
* Show a modal warning the user that he should use the Workplace app.
|
||||
*
|
||||
|
@ -1257,8 +1235,6 @@ export class CoreLoginHelperProvider {
|
|||
this.openChangePassword(siteUrl, this.textUtils.getErrorMessageFromError(error));
|
||||
} else if (error.errorcode == 'usernotconfirmed') {
|
||||
this.showNotConfirmedModal(siteUrl, undefined, username, password);
|
||||
} else if (error.errorcode == 'legacymoodleversion') {
|
||||
this.showLegacyNoticeModal(this.textUtils.getErrorMessageFromError(error));
|
||||
} else if (error.errorcode == 'connecttomoodleapp') {
|
||||
this.showMoodleAppNoticeModal(this.textUtils.getErrorMessageFromError(error));
|
||||
} else if (error.errorcode == 'connecttoworkplaceapp') {
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
"areyousure": "Are you sure?",
|
||||
"back": "Back",
|
||||
"cancel": "Cancel",
|
||||
"cannotconnect": "Cannot connect: Verify that you have correctly typed the URL and that your site uses Moodle 2.4 or later.",
|
||||
"cannotconnect": "Cannot connect: Verify that you have correctly typed the URL and that your site uses Moodle 3.1 or later.",
|
||||
"cannotdownloadfiles": "File downloading is disabled. Please contact your site administrator.",
|
||||
"captureaudio": "Record audio",
|
||||
"capturedimage": "Taken picture.",
|
||||
|
|
|
@ -232,7 +232,6 @@ export class CoreSitesProvider {
|
|||
protected WORKPLACE_APP = 3;
|
||||
protected MOODLE_APP = 2;
|
||||
protected VALID_VERSION = 1;
|
||||
protected LEGACY_APP_VERSION = 0;
|
||||
protected INVALID_VERSION = -1;
|
||||
|
||||
protected isWPApp: boolean;
|
||||
|
@ -675,25 +674,9 @@ export class CoreSitesProvider {
|
|||
*/
|
||||
protected treatInvalidAppVersion(result: number, siteUrl: string, siteId?: string): Promise<any> {
|
||||
let errorCode,
|
||||
errorKey,
|
||||
errorExtra = '',
|
||||
errorKeyParams;
|
||||
errorKey;
|
||||
|
||||
switch (result) {
|
||||
case this.LEGACY_APP_VERSION:
|
||||
errorKey = 'core.login.legacymoodleversion';
|
||||
errorCode = 'legacymoodleversion';
|
||||
|
||||
if (this.appProvider.isDesktop()) {
|
||||
errorKey += 'desktop';
|
||||
errorKeyParams = {$a: siteUrl};
|
||||
}
|
||||
|
||||
if (this.appProvider.isWindows() || this.appProvider.isLinux()) {
|
||||
errorExtra = this.translate.instant('core.login.legacymoodleversiondesktopdownloadold');
|
||||
}
|
||||
|
||||
break;
|
||||
case this.MOODLE_APP:
|
||||
errorKey = 'core.login.connecttomoodleapp';
|
||||
errorCode = 'connecttomoodleapp';
|
||||
|
@ -717,7 +700,7 @@ export class CoreSitesProvider {
|
|||
|
||||
return promise.then(() => {
|
||||
return Promise.reject({
|
||||
error: this.translate.instant(errorKey, errorKeyParams) + errorExtra,
|
||||
error: this.translate.instant(errorKey),
|
||||
errorcode: errorCode,
|
||||
loggedout: true
|
||||
});
|
||||
|
@ -764,16 +747,14 @@ export class CoreSitesProvider {
|
|||
* Check for the minimum required version.
|
||||
*
|
||||
* @param info Site info.
|
||||
* @return Either VALID_VERSION, LEGACY_APP_VERSION, WORKPLACE_APP, MOODLE_APP or INVALID_VERSION.
|
||||
* @return Either VALID_VERSION, WORKPLACE_APP, MOODLE_APP or INVALID_VERSION.
|
||||
*/
|
||||
protected isValidMoodleVersion(info: any): number {
|
||||
if (!info) {
|
||||
return this.INVALID_VERSION;
|
||||
}
|
||||
|
||||
const version24 = 2012120300, // Moodle 2.4 version.
|
||||
release24 = '2.4',
|
||||
version31 = 2016052300,
|
||||
const version31 = 2016052300,
|
||||
release31 = '3.1';
|
||||
|
||||
// Try to validate by version.
|
||||
|
@ -782,8 +763,6 @@ export class CoreSitesProvider {
|
|||
if (!isNaN(version)) {
|
||||
if (version >= version31) {
|
||||
return this.validateWorkplaceVersion(info);
|
||||
} else if (version >= version24) {
|
||||
return this.LEGACY_APP_VERSION;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -794,9 +773,6 @@ export class CoreSitesProvider {
|
|||
if (release >= release31) {
|
||||
return this.validateWorkplaceVersion(info);
|
||||
}
|
||||
if (release >= release24) {
|
||||
return this.LEGACY_APP_VERSION;
|
||||
}
|
||||
}
|
||||
|
||||
// Couldn't validate it.
|
||||
|
@ -1542,9 +1518,10 @@ export class CoreSitesProvider {
|
|||
*
|
||||
* @param info The site info.
|
||||
* @return Whether it's a legacy Moodle.
|
||||
* @deprecated since 3.7.1
|
||||
*/
|
||||
isLegacyMoodleByInfo(info: any): boolean {
|
||||
return this.isValidMoodleVersion(info) == this.LEGACY_APP_VERSION;
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue