Issue Details (XML | Word | Printable)

Key: MDL-19392
Type: Bug Bug
Status: Open Open
Priority: Critical Critical
Assignee: Dan Marsden
Reporter: CPS User
Votes: 0
Watchers: 0
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
Moodle

AICC API data storing failure

Created: 04/Jun/09 09:14 PM   Updated: 05/Jun/09 05:49 AM
Return to search
Component/s: SCORM
Affects Version/s: 1.9.5
Fix Version/s: None

Participants: CPS User and Dan Marsden
Security Level: None
Difficulty: Easy
Affected Branches: MOODLE_19_STABLE


 Description  « Hide
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) {
                            cmi.core.lesson_status = 'passed';
                        } else {
                            cmi.core.lesson_status = 'failed';
                        }
                    }
                }
            }
            if (cmi.core.lesson_mode == 'browse') {
                if (datamodel['cmi.core.lesson_status'].defaultvalue == '') {
                    cmi.core.lesson_status = 'browsed';
                }
            }
            datastring = CollectData(data,'cmi');
            datastring += TotalTime();
        } else {
            datastring = CollectData(data,'cmi');
        }
+ 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




 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
Dan Marsden added a comment - 05/Jun/09 05:49 AM
adding Martin Holden to this - Martin - any chance you could confirm this as an issue? - any other comments?

thanks!