WeBWorK Main Forum

WeBWorK Warnings • Use of uninitialized value in hash element at .../Authen/LTIAdvanced.pm line 700

WeBWorK Warnings • Use of uninitialized value in hash element at .../Authen/LTIAdvanced.pm line 700

by L Ng -
Number of replies: 5

Hello folks.

We are using the latest WW version and we get this warning through LTI link from Moodle

What does this exactly mean and how do we "fix" it? I did turned off the ltiwarnings I think

WeBWorK Warnings

WeBWorK has encountered warnings while processing your request. If this occured when viewing a problem, it was likely caused by an error or ambiguity in that problem. Otherwise, it may indicate a problem with the WeBWorK system itself. If you are a student, report these warnings to your professor to have them corrected. If you are a professor, please consult the warning output below for more information.

Warning messages

  • Use of uninitialized value in hash element at /opt/webwork/webwork2/lib/WeBWorK/Authen/LTIAdvanced.pm line 700.
  • Use of uninitialized value in numeric gt (>) at /opt/webwork/webwork2/lib/WeBWorK/Authen/LTIAdvanced.pm line 700.

Request information

Time

Tue Sep 28 14:01:05 2021

Method

POST

URI

/webwork2/Our-Test-Course/


Thank you.




In reply to L Ng

Re: WeBWorK Warnings • Use of uninitialized value in hash element at .../Authen/LTIAdvanced.pm line 700

by Glenn Rice -

I am just guessing based on the information that you have provided, but you might check your localOverrides.conf file and see if your %userRoles values are all correctly defined as numeric values.  If you have a custom user role and the value for that is not numeric, then that would cause this issue.

Another possibility is that your $LTIAccountCreationCuttoff variable in authen_LTI.conf is not set to a valid user role.

This is quite the stab in the dark though.  Most likely more information will be needed.

In reply to Glenn Rice

Re: WeBWorK Warnings • Use of uninitialized value in hash element at .../Authen/LTIAdvanced.pm line 700

by L Ng -

we never touched nor added new roles and even if we did, we don't know where those settings are stored.

Where are they stored? maybe it is during the creation of the problem a user might have done to create the error?

%LMSrolesToWeBWorKroles = (

                           "librarian" => "guest",

                           "observer" => "guest",

                           "visitor" => "guest",

                           "Guest"  => "guest",

                           "Designer" => "professor",

                           "instructor" => "professor",

                           "Instructor" => "professor",

                           "Faculty" => "professor",

                           "Teacher" => "professor",

                           "Student" => "student",

                           "Learner" => "student",

                           "student" => "student",

                           "AI/TA" => "ta",

                           "TA" => "ta",

                           "Teaching Assistant" => "ta",

                           "Teaching Assistant (TA)" => "ta",

                           "Non-editing teacher" => "ta",

                           "Grader" => "ta",

    );

#$LTIAccountCreationCutoff = "ta";


In reply to L Ng

Re: WeBWorK Warnings • Use of uninitialized value in hash element at .../Authen/LTIAdvanced.pm line 700

by L Ng -
I have more information now... the error showed this...

Never seen this before and just started recently afaik... how do I even troubleshoot this?

Error messages

Can't locate object method "put" via package "WeBWorK::DB" at /opt/webwork/webwork2/lib/WeBWorK/Authen/LTIAdvanced.pm line 811.

Call stack
The following information can help locate the source of the problem.

in WeBWorK::Authen::LTIAdvanced::Nonce::ok called at line 428 of /opt/webwork/webwork2/lib/WeBWorK/Authen/LTIAdvanced.pm
in WeBWorK::Authen::LTIAdvanced::authenticate called at line 383 of /opt/webwork/webwork2/lib/WeBWorK/Authen/LTIAdvanced.pm
in WeBWorK::Authen::LTIAdvanced::verify_normal_user called at line 320 of /opt/webwork/webwork2/lib/WeBWorK/Authen.pm
in WeBWorK::Authen::do_verify called at line 217 of /opt/webwork/webwork2/lib/WeBWorK/Authen.pm
in WeBWorK::Authen::verify called at line 321 of /opt/webwork/webwork2/lib/WeBWorK.pm


In reply to L Ng

Re: WeBWorK Warnings • Use of uninitialized value in hash element at .../Authen/LTIAdvanced.pm line 700

by L Ng -

Still trying to figure this one out... any ideas? I am at a dead end and don't understand this LOL

In reply to L Ng

Re: WeBWorK Warnings • Use of uninitialized value in hash element at .../Authen/LTIAdvanced.pm line 700

by Danny Glin -
It looks like you have the $LTIAccountCreationCutoff definition commented out, which is likely causing the error. If you want the LTI connection to be able to create TA and instructor accounts, then you should set
$LTIAccountCreationCutoff = "admin";