Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

SCORM MDL-18392 MDL-26282 - Fixed calls to add/strip slashes

  • Loading branch information...
commit 74a2ee73ed8a5d7637f5b1f5408d6dc2cde6bf5c 1 parent eb9d692
@scara scara authored danmarsden committed
Showing with 2 additions and 3 deletions.
  1. +2 −3 mod/scorm/locallib.php
View
5 mod/scorm/locallib.php
@@ -387,7 +387,7 @@ function scorm_insert_track($userid,$scormid,$scoid,$attempt,$element,$value,$fo
if ($track = $DB->get_record('scorm_scoes_track',array('userid'=>$userid, 'scormid'=>$scormid, 'scoid'=>$scoid, 'attempt'=>$attempt, 'element'=>$element))) {
if ($element != 'x.start.time' ) { //don't update x.start.time - keep the original value.
- $track->value = addslashes_js($value);
+ $track->value = $value;
$track->timemodified = time();
$DB->update_record('scorm_scoes_track',$track);
$id = $track->id;
@@ -398,7 +398,7 @@ function scorm_insert_track($userid,$scormid,$scoid,$attempt,$element,$value,$fo
$track->scoid = $scoid;
$track->attempt = $attempt;
$track->element = $element;
- $track->value = addslashes_js($value);
+ $track->value = $value;
$track->timemodified = time();
$id = $DB->insert_record('scorm_scoes_track',$track);
}
@@ -436,7 +436,6 @@ function scorm_get_tracks($scoid,$userid,$attempt='') {
$usertrack->timemodified = 0;
foreach ($tracks as $track) {
$element = $track->element;
- $track->value = stripslashes($track->value); // TODO: this is probably wrong, the stripslashes() has undefined meaning now; was this related to JS quoting or magic quotes?
$usertrack->{$element} = $track->value;
switch ($element) {
case 'cmi.core.lesson_status':
Please sign in to comment.
Something went wrong with that request. Please try again.