@@ -531,6 +531,14 @@ export class AddonModQuizPlayerPage implements OnInit, OnDestroy, CanLeave {
531531 return ;
532532 }
533533
534+ // @todo MOBILE-4350: This is called before getting the attempt data in sequential quizzes as a workaround for a bug
535+ // in the LMS. Once the bug has been fixed, this should be reverted.
536+ if ( this . isSequential ) {
537+ await CoreUtils . ignoreErrors (
538+ AddonModQuiz . logViewAttempt ( this . attempt . id , page , this . preflightData , this . offline , this . quiz ) ,
539+ ) ;
540+ }
541+
534542 const data = await AddonModQuiz . getAttemptData ( this . attempt . id , page , this . preflightData , {
535543 cmId : this . quiz . coursemodule ,
536544 readingStrategy : this . offline ? CoreSitesReadingStrategy . PREFER_CACHE : CoreSitesReadingStrategy . ONLY_NETWORK ,
@@ -559,9 +567,12 @@ export class AddonModQuizPlayerPage implements OnInit, OnDestroy, CanLeave {
559567 } ) ;
560568
561569 // Mark the page as viewed.
562- CoreUtils . ignoreErrors (
563- AddonModQuiz . logViewAttempt ( this . attempt . id , page , this . preflightData , this . offline , this . quiz ) ,
564- ) ;
570+ if ( ! this . isSequential ) {
571+ // @todo MOBILE-4350: Undo workaround.
572+ CoreUtils . ignoreErrors (
573+ AddonModQuiz . logViewAttempt ( this . attempt . id , page , this . preflightData , this . offline , this . quiz ) ,
574+ ) ;
575+ }
565576
566577 // Start looking for changes.
567578 this . autoSave . startCheckChangesProcess ( this . quiz , this . attempt , this . preflightData , this . offline ) ;
0 commit comments