Add quotes filter to suspend_data, lesson_location and launch_data to avoid issues with SCORM strings, as suggested by Stéphane Poinsart - refs #398 refs BT#8897

1.9.x
Yannick Warnier 11 years ago
parent 4c08495063
commit 008e7ffa3e
  1. 6
      main/newscorm/scorm_api.php

@ -152,11 +152,11 @@ olms.max='<?php echo $oItem->get_max();?>';
olms.min='<?php echo $oItem->get_min();?>';
olms.lesson_status='<?php echo $oItem->get_status();?>';
olms.session_time='<?php echo $oItem->get_scorm_time('js');?>';
olms.suspend_data = '<?php echo $oItem->get_suspend_data();?>';
olms.lesson_location = '<?php echo $oItem->get_lesson_location();?>';
olms.suspend_data = '<?php echo str_replace("'", "\\'", $oItem->get_suspend_data());?>';
olms.lesson_location = '<?php echo str_replace("'", "\\'", $oItem->get_lesson_location());?>';
olms.total_time = '<?php echo $oItem->get_scorm_time('js');?>';
olms.mastery_score = '<?php echo $oItem->get_mastery_score();?>';
olms.launch_data = '<?php echo addslashes($oItem->get_launch_data()); ?>';
olms.launch_data = '<?php echo str_replace("'", "\\'", $oItem->get_launch_data()); ?>';
olms.max_time_allowed = '<?php echo $oItem->get_max_time_allowed();?>';
olms.interactions = new Array(<?php echo $oItem->get_interactions_js_array();?>);
olms.item_objectives = new Array();

Loading…
Cancel
Save