Permalink
Browse files

Added function addslashes_js() to make the javacript receive the stri…

…ngs correctly
  • Loading branch information...
1 parent 470be26 commit 555bfa16d03df34a40b477667cfde4d4b83afc61 csantossaenz committed May 11, 2007
Showing with 8 additions and 2 deletions.
  1. +8 −2 mod/scorm/mod.html
View
@@ -100,6 +100,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>
@@ -161,9 +165,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.concat('<?php print_string('errorlogs','scorm') ?>:\n'+errorlogs);
+ result = '<?php echo $strerrorlog ?>: '+ result + '\n';
}
alert(result);
return false;

0 comments on commit 555bfa1

Please sign in to comment.