MOBILE-3113 course formats: Give the user the option to reload if format plugins fail to initialise
parent
f8bd1359dc
commit
88db3d5816
|
@ -981,7 +981,12 @@ export class CoreCourseProvider {
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
// The site plugin failed to load. The user needs to restart the app to try loading it again.
|
// The site plugin failed to load. The user needs to restart the app to try loading it again.
|
||||||
this.domUtils.showErrorModal('core.courses.errorloadplugins', true);
|
const message = this.translate.instant('core.courses.errorloadplugins');
|
||||||
|
const reload = this.translate.instant('core.courses.reload');
|
||||||
|
const ignore = this.translate.instant('core.courses.ignore');
|
||||||
|
this.domUtils.showConfirm(message, '', reload, ignore).then(() => {
|
||||||
|
window.location.reload();
|
||||||
|
});
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
// No custom format plugin. We don't need to wait for anything.
|
// No custom format plugin. We don't need to wait for anything.
|
||||||
|
|
|
@ -11,11 +11,12 @@
|
||||||
"enrolme": "Enrol me",
|
"enrolme": "Enrol me",
|
||||||
"errorloadcategories": "An error occurred while loading categories.",
|
"errorloadcategories": "An error occurred while loading categories.",
|
||||||
"errorloadcourses": "An error occurred while loading courses.",
|
"errorloadcourses": "An error occurred while loading courses.",
|
||||||
"errorloadplugins": "The plugins required by this course could not be loaded correctly. Please restart the app to try again.",
|
"errorloadplugins": "The plugins required by this course could not be loaded correctly. Please reload the app to try again.",
|
||||||
"errorsearching": "An error occurred while searching.",
|
"errorsearching": "An error occurred while searching.",
|
||||||
"errorselfenrol": "An error occurred while self enrolling.",
|
"errorselfenrol": "An error occurred while self enrolling.",
|
||||||
"filtermycourses": "Filter my courses",
|
"filtermycourses": "Filter my courses",
|
||||||
"frontpage": "Front page",
|
"frontpage": "Front page",
|
||||||
|
"ignore": "Ignore",
|
||||||
"hidecourse": "Hide from view",
|
"hidecourse": "Hide from view",
|
||||||
"mycourses": "My courses",
|
"mycourses": "My courses",
|
||||||
"nocourses": "No course information to show.",
|
"nocourses": "No course information to show.",
|
||||||
|
@ -26,6 +27,7 @@
|
||||||
"password": "Enrolment key",
|
"password": "Enrolment key",
|
||||||
"paymentrequired": "This course requires a payment for entry.",
|
"paymentrequired": "This course requires a payment for entry.",
|
||||||
"paypalaccepted": "PayPal payments accepted",
|
"paypalaccepted": "PayPal payments accepted",
|
||||||
|
"reload": "Reload",
|
||||||
"removefromfavourites": "Unstar this course",
|
"removefromfavourites": "Unstar this course",
|
||||||
"search": "Search",
|
"search": "Search",
|
||||||
"searchcourses": "Search courses",
|
"searchcourses": "Search courses",
|
||||||
|
|
Loading…
Reference in New Issue