Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added addslashes_js() to make the javascript code work properly

  • Loading branch information...
commit c00bb02c52fa649a2b53d0d6fda636c05568ad5d 1 parent afccfe8
csantossaenz authored
Showing with 8 additions and 2 deletions.
  1. +8 −2 mod/scorm/mod.html
View
10 mod/scorm/mod.html
@@ -97,6 +97,10 @@
$strmenubar = get_string('menubar', 'scorm');
$strtoolbar = get_string('toolbar', 'scorm');
$strstatus = get_string('statusbar', 'scorm');
+ $strerrorlog = get_string('errorlogs','scorm');
+ $strvalidation = print_string('validation','scorm');
+ $strerrorlog = addslashes_js($strerrorlog);
+ $strvalidation = addslashes_js($strvalidation);
?>
<script type="text/javascript" src="<?php p($CFG->wwwroot) ?>/mod/scorm/request.js" ></script>
@@ -158,9 +162,11 @@
return false;
}
} else {
- result = '<?php print_string('validation','scorm') ?>: '+ result + '\n';
+ //result = '<?php print_string('validation','scorm') ?>: '+ result + '\n';
+ result = '<?php echo $strvalidation ?>: '+ result + '\n';
if (errorlogs != '') {
- result.concat('<?php print_string('errorlogs','scorm') ?>:\n'+errorlogs);
+ result = '<?php echo $strerrorlog ?>: '+ result + '\n';
+ //result.concat('<?php print_string('errorlogs','scorm') ?>:\n'+errorlogs);
}
alert(result);
return false;
Please sign in to comment.
Something went wrong with that request. Please try again.