forked from EVOgeek/Vmeda.Online
		
	Merge pull request #3795 from NoelDeMartin/MOBILE-4383
MOBILE-4383 quiz: Disable offline sequential quiz
This commit is contained in:
		
						commit
						64be18b27a
					
				| @ -231,7 +231,7 @@ export class AddonModQuizPrefetchHandlerService extends CoreCourseActivityPrefet | ||||
| 
 | ||||
|         const quiz = await AddonModQuiz.getQuiz(courseId, module.id, { siteId }); | ||||
| 
 | ||||
|         if (quiz.allowofflineattempts !== 1 || quiz.hasquestions === 0) { | ||||
|         if (!AddonModQuiz.isQuizOffline(quiz) || quiz.hasquestions === 0) { | ||||
|             return false; | ||||
|         } | ||||
| 
 | ||||
|  | ||||
| @ -1524,7 +1524,9 @@ export class AddonModQuizProvider { | ||||
|      */ | ||||
|     isQuizOffline(quiz: AddonModQuizQuizWSData): boolean { | ||||
|         // Don't allow downloading the quiz if offline is disabled to prevent wasting a lot of data when opening it.
 | ||||
|         return !!quiz.allowofflineattempts && !CoreSites.getCurrentSite()?.isOfflineDisabled(); | ||||
|         return !!quiz.allowofflineattempts | ||||
|             && !this.isNavigationSequential(quiz) | ||||
|             && !CoreSites.getCurrentSite()?.isOfflineDisabled(); | ||||
|     } | ||||
| 
 | ||||
|     /** | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user