This fix DT#4444

skala
Julio Montoya 16 years ago
parent c5b80f610c
commit d81b50adda
  1. 5
      main/newscorm/lp_ajax_save_item.php
  2. 4
      main/newscorm/scorm_api.php

@ -109,7 +109,10 @@ function save_item($lp_id,$user_id,$view_id,$item_id,$score=-1,$max=-1,$min=-1,$
//id(0), type(1), time(2), weighting(3),correct_responses(4),student_response(5),result(6),latency(7)
if(is_array($interactions) && count($interactions)>0){
foreach($interactions as $index=>$interaction){
$mylpi->add_interaction($index,$interactions[$index]);
//$mylpi->add_interaction($index,$interactions[$index]);
//fix DT#4444
$clean_interaction = str_replace('@@',',',$interactions[$index]);
$mylpi->add_interaction($index,$clean_interaction);
}
}
$mylpi->set_core_exit($core_exit);

@ -1466,11 +1466,11 @@ function xajax_save_item_scorm(lms_lp_id, lms_user_id, lms_view_id, lms_item_id,
for (j in interactions[i]) {
temp = interactions[i][j];
temp = ''+temp; // if temp == 1 there are problems with indexOf and an integer number
//this fix when an interaction have ',' i.e:
//this fix when an interaction have ',' i.e: {a,b,c,d} is replace to {a@@b@@c@@d} see DT#4444
while(temp.indexOf(',') >= 0){
temp = temp.replace(',','@@');
};
interact_temp +=temp+',';
interact_temp +=temp+',';
}
interact_temp = interact_temp.substr(0,(interact_temp.length-2)) + ']';
// interact_string += encodeURIComponent(interact_temp);

Loading…
Cancel
Save