WeBWorK Problems

Grades are not being updated in Canvas using the Advanced LTI

Grades are not being updated in Canvas using the Advanced LTI

by Randal Dalhoff -
Number of replies: 6

Grades are not being updated in Canvas using the Advanced LTI

The apache error_log has this entry every 5 minutes:
[Fri Jan 19 09:17:45 2018] [error] [client 129.186.6.15] An error occurred while trying to update grades via LTI: Can't call method "getSettingValue" on an undefined value at /opt/webwork/webwork2/lib/WeBWorK/Authen/LTIAdvanced/SubmitGrade.pm line 297.

Line 297 in /opt/webwork/webwork2/lib/WeBWorK/Authen/LTIAdvanced/SubmitGrade.pm is
my $lastUpdate = $db->getSettingValue('LTILastUpdate') // 0;

We are running version $WW_VERSION = 'WeBWorK-2.13';

Is there some setting that I forgot to do to make this work?

I am using this setting in the authen_LTI.conf file:
$LTIGradeMode
= "homework";

In reply to Randal Dalhoff

Re: Grades are not being updated in Canvas using the Advanced LTI

by Randal Dalhoff -
I am also seeing random instances of this error in the ssl_error_log when I assume Canvas tries to do a grade update.

[Fri Jan 19 08:18:29 2018] [error] [client 69.54.121.147] An error occurred while trying to update grades via LTI: Global $r object is not available. Set:\n\tPerlOptions +GlobalRequest\nin httpd.conf at /usr/share/perl5/CGI.pm line 346.\n\n, referer: https://canvas.iastate.edu/courses/48849/assignments/530225

In reply to Randal Dalhoff

Re: Grades are not being updated in Canvas using the Advanced LTI

by Randal Dalhoff -
It appears that the $db variable is not set or defined in the routine.

sub mass_update {
my $self = shift;
my $r = $self->{r};
my $ce = $r->{ce};
my $db = $self->{r}->{db};

my $lastUpdate = $db->getSettingValue('LTILastUpdate') // 0;

In reply to Randal Dalhoff

Re: Grades are not being updated in Canvas using the Advanced LTI

by Michael Fraboni -
I'm seeing this same error. Oddly enough about 1/3 of the students' grades are updated, and the other 2/3 are not due to this error.

Does anyone have any idea how to fix? I've looked at that $db variable a bit myself, but cannot seem to find why it is undefined.
In reply to Randal Dalhoff

Re: Grades are not being updated in Canvas using the Advanced LTI

by Michael Fraboni -
Randal, quick question, do you have webwork set to load in a new tab from the Canvas shell?

I ask because I have two links to webwork assignments from my Canvas shell, one opens a new tab, one does not. Since I'm having intermittent trouble with student grades updating I'm wondering if the way they access webwork influences the ability to pass the grades back.

(This seems a long-shot to me since in either case it authenticates the student correctly, but still, I'm trying to eliminate as many variables as I can)

Mike
In reply to Randal Dalhoff

Re: Grades are not being updated in Canvas using the Advanced LTI

by Michael Scott -
We are getting the exact same issue using Moodle using the Advanced LTI

[Wed Feb 20 09:03:15.351130 2019] [perl:error] [pid 7860] [client 205.155.53.1:18019] An error occurred while trying to update grades via LTI: Can't call method "getSettingValue" on an undefined value at /opt/webwork/webwork2/lib/WeBWorK/Authen/LTIAdvanced/SubmitGrade.pm line 297.\

We are also running version $WW_VERSION = 'WeBWorK-2.13';

Also, we are using this setting $LTIGradeMode = "homework";