WeBWorK Main Forum

LTIAdvanced grade passback to Canvas error

Re: LTIAdvanced grade passback to Canvas error

by Sarunas Burdulis -
Number of replies: 0
Thanks, Nathan. Yes, I'm aware of the other thread and your version of SubmitGrade.pm.

For now we were using $LTIGradeOnSubmit = 0 and relied on mass update.

Today I went back to testing grade passback on submit with the intention to use your improved nonce generation. I started with the original method and tried to submit some answers in a test course as a student. Everything worked as expected, no "Duplicate nonce detected" errors, grades appeared instantly on Canvas. Tried to submit about 130 times and no errors. I have also tried SubmitGrade.pm with the change to nonce generated by your method, the diff:

> use UUID::Tiny  ':std';
>   # Generate a better nonce, first a portion unique for the sourcedid
>   # which should be dependent on the student + the assignment if a
>   # "homework" level sourcedid.
>   my $uuid_p1 = create_uuid_as_string(UUID_SHA1, UUID_NS_URL, $sourcedid);
>   # Next create a time dependent portion
>   my $uuid_p2 = create_uuid_as_string(UUID_TIME);
<                 nonce => int(rand( 2**32)),
>                 nonce => "${uuid_p1}__${uuid_p2}",

Grade passback worked normally as well, submitted about 100 times.

There were no changes on our server since our first initial and successful LTI/Canvas testing in August.

That is, for now, grade passback works perfectly again without any change on WeBWorK side...