You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When calling send_read_result() for a student that doesn't have any grade yet, some LMS (specifically Moodle) send back a XML response with a body value of "".
Here's an extract of the received XML sent back by a Moodle instance where the student did not have any grade for the activity :
I would expect a different behavior between a case where there is no grade yet and a case when the LMS sends back an actual invalid value.
I previously thought about returning a 0 value when there is no grade yet. But it might be confusing with the case where the student has received an actual 0 grade ? Dunno.
The text was updated successfully, but these errors were encountered:
Tazaf
changed the title
Reading the grade when there is none yet results in an error.
Reading a student grade when she has none yet results in an error.
Jul 6, 2018
When calling
send_read_result()
for a student that doesn't have any grade yet, some LMS (specifically Moodle) send back a XML response with a body value of""
.Here's an extract of the received XML sent back by a Moodle instance where the student did not have any grade for the activity :
As you can see, the value of
textString
is""
.This causes the lib to raise an error.
Having followed the chain of method, I've pinpointed the line that, according to me, causes the issue :
ims-lti/src/extensions/outcomes.coffee
Line 138 in 4df2936
The combination of
parseFloat
andnavigateXml
in the same line yield ascore
value ofNaN
(which is normal).But the following check of
isNan(score)
returns an error as if this was an error case (which is not):ims-lti/src/extensions/outcomes.coffee
Line 141 in 4df2936
I would expect a different behavior between a case where there is no grade yet and a case when the LMS sends back an actual invalid value.
I previously thought about returning a 0 value when there is no grade yet. But it might be confusing with the case where the student has received an actual 0 grade ? Dunno.
The text was updated successfully, but these errors were encountered: