garemoko / StoryCanJS

Modified Storyline files to use TinCanJS
Apache License 2.0
0 stars 1 forks source link

204 no content #1

Open shankartechnik opened 10 years ago

shankartechnik commented 10 years ago

hi andrews it return 204 no content, i have alerted in xapi.js but it seems to be error at var tincanresource = strUrl.substring(tincanJS.recordStores[0].endpoint.length,strUrl.indexOf("?")); var tincanmethod = getParameterByName('method',strUrl); if ( tincanresource == "statements" && tincanmethod == "PUT"){ tincanJS.sendStatement(

where on alerting tincanresource gives statements with trailing slash like "statements/"

garemoko commented 10 years ago

That's weird. It was working for the package I was testing with. Not sure why it would be adding a slash.

204 is the normal error code though - means success. Where are you seeing that error?

shankartechnik commented 10 years ago

andrew tyying this code in xapi.js if ( tincanresource == "statements/" && tincanmethod == "PUT"){ var statement = JSON.parse( getParameterByName( 'content', '?' + decodeURIComponent(strData) ) ); alert(statement.toSource()); //alert(statement); /*tincanJS.sendStatement( JSON.parse( getParameterByName( 'content', '?' + decodeURIComponent(strData) ) ),

        tinCanPutStatementCallback
    );*/
    return true;
} 

alerts but do not pass the statement to LRS gives out

shankartechnik commented 10 years ago

but 204 returns no content

shankartechnik commented 10 years ago

means process is success but no data problem with tincanJS.sendStatement

shankartechnik commented 10 years ago

scn1

garemoko commented 10 years ago

No, 204 means it worked. No content means its not a GET

shankartechnik commented 10 years ago

k i got that but to make the record of the statements is there a fix if i try it throws an 400 error , i was trying to remove the trailing slash, inverse it another way all the try is vain, those method were posted earlier.................

manojmilani123 commented 10 years ago

I get none of the errors but when I debug the xapi.js, callbacks are not working where I am checking the storyline course created by articulate which stucks on spinner. Any ideas?