This is not to ask a question to resolve an issue but to report something similar that happened with our new install of Webwork.
Thank you for sharing the modified version of SubmitGrade.pm above. That was very helpful because we had the following message when submitting answers in the Webwork and the grade not being passed back to Blackboard:
"Can't use string ("Can't connect to bbhosted.cuny.e"...) as a HASH ref while "strict refs" in use at /opt/webwork/webwork2/lib/WeBWorK/Authen/LTIAdvanced/SubmitGrade.pm line 193."
With the modified file we started to see the following:
"Unable to retrieve prior grade from LMS. Error: Can't connect to bbhosted.cuny.edu:443 (SSL connect attempt failed error:141A318A:SSL routines:tls_process_ske_dhe:dh key too small) at /opt/webwork/webwork2/lib/WeBWorK/Authen/LTIAdvanced/SubmitGrade.pm line 344."
That was a more informative type of error. After researching the issue, our IT noticed that our school's Blackboard was using a weak key than was accepted by our SSL connection in ourWebwork.