MOBILE-2345 lesson: Fix issues with prefetch and offline
parent
b1469987e2
commit
b350c7a52e
|
@ -462,7 +462,9 @@ export class AddonModLessonProvider {
|
|||
return;
|
||||
}
|
||||
|
||||
if (typeof data.answer == 'object') {
|
||||
if (typeof data['answer[text]'] != 'undefined') {
|
||||
studentAnswer = data['answer[text]'];
|
||||
} else if (typeof data.answer == 'object') {
|
||||
studentAnswer = data.answer.text;
|
||||
} else {
|
||||
studentAnswer = data.answer;
|
||||
|
|
|
@ -139,7 +139,7 @@ export class CoreCourseModuleComponent implements OnInit, OnDestroy {
|
|||
this.spinner = true;
|
||||
|
||||
// Get download size to ask for confirm if it's high.
|
||||
this.prefetchHandler.getDownloadSize(this.module, this.courseId).then((size) => {
|
||||
this.prefetchHandler.getDownloadSize(this.module, this.courseId, true).then((size) => {
|
||||
return this.courseHelper.prefetchModule(this.prefetchHandler, this.module, size, this.courseId, refresh);
|
||||
}).catch((error) => {
|
||||
// Error, hide spinner.
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
"disableall": "Disable notifications",
|
||||
"disabled": "Disabled",
|
||||
"displayformat": "Display format",
|
||||
"enabledownloadsection": "Enable download sections",
|
||||
"enablerichtexteditor": "Enable text editor",
|
||||
"enablerichtexteditordescription": "If enabled, a text editor will be available when entering content.",
|
||||
"enablesyncwifi": "Allow sync only when on Wi-Fi",
|
||||
|
|
|
@ -131,6 +131,10 @@ export class CoreTextUtilsProvider {
|
|||
* @return {string} Clean text.
|
||||
*/
|
||||
cleanTags(text: string, singleLine?: boolean): string {
|
||||
if (typeof text == 'number') {
|
||||
return text;
|
||||
}
|
||||
|
||||
if (!text) {
|
||||
return '';
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue