Fixing suspend_data, launch_data and lesson_location see BT#8898

1.9.x
Julio Montoya 11 years ago
parent 05b31a4037
commit c0dc2ab869
  1. 20
      main/newscorm/learnpathItem.class.php

@ -695,15 +695,19 @@ class learnpathItem
error_log('learnpathItem::get_launch_data()', 0); error_log('learnpathItem::get_launch_data()', 0);
} }
if (!empty($this->launch_data)) { if (!empty($this->launch_data)) {
return $this->launch_data; return str_replace(
array("\r", "\n", "'"),
array('\r', '\n', "\\'"),
$this->launch_data
);
} }
return ''; return '';
} }
/** /**
* Gets the lesson location * Gets the lesson location
* @return string lesson location as recorded by the SCORM and AICC * @return string lesson location as recorded by the SCORM and AICC
* elements. Defaults to '' * elements. Defaults to ''
*/ */
public function get_lesson_location() public function get_lesson_location()
{ {
@ -711,7 +715,11 @@ class learnpathItem
error_log('learnpathItem::get_lesson_location()', 0); error_log('learnpathItem::get_lesson_location()', 0);
} }
if (!empty($this->lesson_location)) { if (!empty($this->lesson_location)) {
return $this->lesson_location; return str_replace(
array("\r", "\n", "'"),
array('\r', '\n', "\\'"),
$this->lesson_location
);
} else { } else {
return ''; return '';
} }
@ -1749,8 +1757,8 @@ class learnpathItem
// a beautiful way to do it ? // a beautiful way to do it ?
if (!empty($this->current_data)) { if (!empty($this->current_data)) {
return str_replace( return str_replace(
array("\r", "\n"), array("\r", "\n", "'"),
array('\r', '\n'), array('\r', '\n', "\\'"),
$this->current_data $this->current_data
); );
} else { } else {

Loading…
Cancel
Save