We've found that AICC API data storing not working at all.
Error in file /mod/scorm/datamodels/aicc.js.php
scoid and attempt params aren't passed to http request in function StoreData, so request returns 404 error
function StoreData(data,storetotaltime) {
if (storetotaltime) {
if (cmi.core.lesson_mode == 'normal') {
if (cmi.core.credit == 'credit') {
cmi.core.lesson_status = 'completed';
if (cmi.student_data.mastery_score != '') {
if (cmi.core.score.raw >= cmi.student_data.mastery_score)
else
{ cmi.core.lesson_status = 'failed'; } }
}
}
if (cmi.core.lesson_mode == 'browse') {
if (datamodel['cmi.core.lesson_status'].defaultvalue == '')
}
datastring = CollectData(data,'cmi');
datastring += TotalTime();
} else
+ datastring += '&attempt=<?php echo $attempt ?>';
+ datastring += '&scoid=<?php echo $scoid ?>';
//popupwin(datastring);
var myRequest = NewHttpReq();
result = DoRequest(myRequest,"<?php p($CFG->wwwroot) ?>/mod/scorm/datamodel.php","id=<?php p($id) ?>&sesskey=<?php p($USER->sesskey) ?>"+datastring);
- results = String(result).split('\n');
errorCode = results[1];
return results[0];
}
Strings started with "+" should be added
String started with "*" should be updated