Skip to content

MOBILE-5013 h5pactivity: Ignore error when post state & statements#4731

Open
alfonso-salces wants to merge 1 commit intomoodlehq:mainfrom
alfonso-salces:MOBILE-5013
Open

MOBILE-5013 h5pactivity: Ignore error when post state & statements#4731
alfonso-salces wants to merge 1 commit intomoodlehq:mainfrom
alfonso-salces:MOBILE-5013

Conversation

@alfonso-salces
Copy link
Member

No description provided.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR (MOBILE-5013) updates the H5P activity index component to stop surfacing user-facing alerts when xAPI tracking “post state” / “post statements” fails, and instead silently ignores those failures.

Changes:

  • Add a logger instance to the H5P activity index component.
  • Replace CoreAlerts.showError(...) calls with logger.error(...) in postStatements and postState error paths.

protected messageListenerFunction: (event: MessageEvent) => Promise<void>;
protected checkCompletionAfterLog = false; // It's called later, when the user plays the package.
protected offlineErrorAlert: HTMLIonAlertElement | null = null;
protected activityLogger: CoreLogger;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As mentioned by a Copilot comment, a logger is already created in the super class (CoreCourseModuleMainResourceComponent). There is no need to create a new logger, you can use the existing one by using "this.logger".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants