Skip to content

Commit

Permalink
Typo in scorm/scorm2004_library.php
Browse files Browse the repository at this point in the history
 - %LANGUAGE was replaced instead of %LANGUAGE%
 - This caused scorm 2004 3rd packages to fail
  • Loading branch information
torinfo committed Jul 12, 2022
1 parent 4c6fb70 commit 1b4558e
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 10 deletions.
12 changes: 9 additions & 3 deletions modules/decision/player_html5/rloObject.htm
Expand Up @@ -67,12 +67,18 @@
var x_templateLocation = "%TEMPLATEPATH%";
var themePath = "%THEMEPATH%";
var projectXML = "%XMLFILE%"; //this is the file to read, not the xml
var localeoptions = { weekday: undefined, year: 'numeric', month: 'short', day: 'numeric' };
var x_lastUpdated = new Date("%LASTUPDATED%");
var x_dateCreated = new Date("%DATECREATED%");
var x_numPlays = String("%NUMPLAYS%");
var x_lastUpdatedLocale = x_lastUpdated.toLocaleDateString("%LANGUAGE%", localeoptions);
var x_dateCreatedLocale = x_dateCreated.toLocaleDateString("%LANGUAGE%", localeoptions);
var localeoptions = { year: 'numeric', month: 'short', day: 'numeric' };
try {
var x_lastUpdatedLocale = x_lastUpdated.toLocaleDateString("%LANGUAGE%", localeoptions);
var x_dateCreatedLocale = x_dateCreated.toLocaleDateString("%LANGUAGE%", localeoptions);
}
catch(e) {
var x_lastUpdatedLocale = x_lastUpdated.toLocaleDateString();
var x_dateCreatedLocale = x_dateCreated.toLocaleDateString();
}
%USE_URL%

var globalVars = {
Expand Down
13 changes: 10 additions & 3 deletions modules/site/player_html5/rloObject.htm
Expand Up @@ -78,12 +78,19 @@
var x_youtube_api_key = "%YOUTUBEAPIKEY%";
var x_Version = "%VERSION%";
var projectXML = "%XMLFILE%"; //this is the file to read, not the xml
var localeoptions = { weekday: undefined, year: 'numeric', month: 'short', day: 'numeric' };
var x_lastUpdated = new Date("%LASTUPDATED%");
var x_dateCreated = new Date("%DATECREATED%");
var x_numPlays = String("%NUMPLAYS%");
var x_lastUpdatedLocale = x_lastUpdated.toLocaleDateString("%LANGUAGE%", localeoptions);
var x_dateCreatedLocale = x_dateCreated.toLocaleDateString("%LANGUAGE%", localeoptions);
var localeoptions = { year: 'numeric', month: 'short', day: 'numeric' };
try {
var x_lastUpdatedLocale = x_lastUpdated.toLocaleDateString("%LANGUAGE%", localeoptions);
var x_dateCreatedLocale = x_dateCreated.toLocaleDateString("%LANGUAGE%", localeoptions);
}
catch(e) {
var x_lastUpdatedLocale = x_lastUpdated.toLocaleDateString();
var x_dateCreatedLocale = x_dateCreated.toLocaleDateString();
}

var globalhidesocial="%GLOBALHIDESOCIAL%";
var globalsocialauth="%GLOBALSOCIALAUTH%";
%USE_URL%
Expand Down
12 changes: 9 additions & 3 deletions modules/xerte/player_html5/rloObject.htm
Expand Up @@ -129,12 +129,18 @@ <h2 aria-live="assertive"> </h2>
var x_TemplateId = "%TEMPLATEID%";
var x_youtube_api_key = "%YOUTUBEAPIKEY%";
var x_Version = "%VERSION%";
var localeoptions = { weekday: undefined, year: 'numeric', month: 'short', day: 'numeric' };
var x_lastUpdated = new Date("%LASTUPDATED%");
var x_dateCreated = new Date("%DATECREATED%");
var x_numPlays = String("%NUMPLAYS%");
var x_lastUpdatedLocale = x_lastUpdated.toLocaleDateString("%LANGUAGE%", localeoptions);
var x_dateCreatedLocale = x_dateCreated.toLocaleDateString("%LANGUAGE%", localeoptions);
var localeoptions = { year: 'numeric', month: 'short', day: 'numeric' };
try {
var x_lastUpdatedLocale = x_lastUpdated.toLocaleDateString("%LANGUAGE%", localeoptions);
var x_dateCreatedLocale = x_dateCreated.toLocaleDateString("%LANGUAGE%", localeoptions);
}
catch(e) {
var x_lastUpdatedLocale = x_lastUpdated.toLocaleDateString();
var x_dateCreatedLocale = x_dateCreated.toLocaleDateString();
}
%USE_URL%

var globalVars = {
Expand Down
2 changes: 1 addition & 1 deletion website_code/php/scorm/scorm2004_library.php
Expand Up @@ -217,7 +217,7 @@ function scorm2004_html5_page_create($id, $type, $parent_name, $lo_name, $langua

$scorm_html_page_content = file_get_contents($xerte_toolkits_site->basic_template_path . $type . "/player_html5/rloObject.htm");

$scorm_html_page_content = str_replace("%LANGUAGE", $language_ISO639_1code, $scorm_html_page_content);
$scorm_html_page_content = str_replace("%LANGUAGE%", $language_ISO639_1code, $scorm_html_page_content);
$scorm_html_page_content = str_replace("%VERSION%", $version , $scorm_html_page_content);
$scorm_html_page_content = str_replace("%TWITTERCARD%", "",$scorm_html_page_content);
$scorm_html_page_content = str_replace("%VERSION_PARAM%", "" , $scorm_html_page_content);
Expand Down

0 comments on commit 1b4558e

Please sign in to comment.