Skip to content

Commit

Permalink
Merge pull request #158 from maxrosenblattl/reportingIsEnabled
Browse files Browse the repository at this point in the history
Transfer `reportingIsEnabled` to H5PIntegration
  • Loading branch information
Murage authored Dec 4, 2024
2 parents 9149d65 + 3d83db2 commit a5a0591
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/h5p-standalone.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ interface Options {
contentUserData?: H5PContent['contentUserData'];
saveFreq?: number | false;
postUserStatistics?: boolean;
reportingIsEnabled?: boolean;

ajax?: {
setFinishedUrl?: string;
Expand Down Expand Up @@ -255,7 +256,8 @@ export class H5PStandalone {

H5PIntegration.url = contentId;
H5PIntegration.urlLibraries = librariesPath;
H5PIntegration.postUserStatistics = !!options.postUserStatistics
H5PIntegration.postUserStatistics = !!options.postUserStatistics;
H5PIntegration.reportingIsEnabled = !!options.reportingIsEnabled;

//since the default is false, only set if it's a number?
if (options.saveFreq && typeof options.saveFreq === 'number') {
Expand Down

0 comments on commit a5a0591

Please sign in to comment.