Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JI-5476 replace 10 or more consecutive underscores with 9 in getxAPID… #96

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion scripts/essay.js
Original file line number Diff line number Diff line change
Expand Up @@ -778,7 +778,8 @@ H5P.Essay = function ($, Question) {
definition.name['en-US'] = definition.name[this.languageTag];
// The H5P reporting module expects the "blanks" to be added to the description
definition.description = {};
definition.description[this.languageTag] = this.params.taskDescription + Essay.FILL_IN_PLACEHOLDER;
// The below replaceAll makes sure we don't get any unwanted XAPI_PLACEHOLDERs in the questions and description
definition.description[this.languageTag] = this.params.taskDescription.replaceAll(/_{10,}/gi, '_________'); + Essay.FILL_IN_PLACEHOLDER;
// Fallback for h5p-php-reporting, expects en-US
definition.description['en-US'] = definition.description[this.languageTag];
definition.type = 'http://id.tincanapi.com/activitytype/essay';
Expand Down
Loading