Installation

LTI through Canvas (WeBWorK v2.12)

LTI through Canvas (WeBWorK v2.12)

by Walter Schwarz -
Number of replies: 6
Problem:
When attempting to create an assignment in Canvas with the submission type set to an external tool with a link to the WeBWorK course the assignment is created, but attempting to navigate to it yields a small red Canvas error box that reads "Couldn't find valid settings for this link".

This is a new installation of version 2.12 that appears to work well when accessed directly by the WeBWorK URL.  The Canvas integration appears to not be working even on a basic level: no log messages are seen in hosted_courses.log, timing.log, access_log, error_log, ssl_access_log, ssl_error_log, or ssl_request_log when the Canvas assignment connection is attempted.

We are using the following when creating the Canvas assignment in the External Tool URL field:
https://webwork.institution.edu/webwork2/MATH-111-11-SP11/

Our WeBWorK courses are available through URLs such as this:
https://webwork.institution.edu/webwork2/MATH-111-11-SP11/

The Canvas configuration page was configured with the following:
Name: WeBWorK
Consumer key: webwork
Shared Secret: TheSameAsInauthen_LTI.conf
Launch URL: <empty>
Domain: https://webwork.institution.edu/webwork2/
Privacy: Public
Custom Fields: <empty>
Description: <emtpy>

Network rules have been adjusted to allow connection from off-campus on ports 80 and 443.

In site.conf $server_root_url is set to 'https://webwork.institution.edu'
In authen_LTI.conf $external_auth is set to 0
In authen_LTI.conf $LTIBasicConsumerSecret is set to the same value as in Canvas configuration
In authen_LTI.conf $authen{user_module} is set to the default of [ { "*" => "WeBWorK::Authen::LTIAdvanced", }, { "*" => "WeBWorK::Authen::Basic_TheLastOption", } ]

I am out of ideas.  We would like to use WeBWorK at our institution but are currently unable to do so.  What can I try to get this working?
In reply to Walter Schwarz

Re: LTI through Canvas (WeBWorK v2.12)

by Danny Glin -
Try setting Domain to webwork.institution.edu (the domain name rather than a url). See if that gets things connected.
In reply to Walter Schwarz

Re: LTI through Canvas (WeBWorK v2.12)

by Walter Schwarz -
Making the changes below allowed it to start working, uncovering more errors I need to fix now.  But at least I have informative error messages to go off of!

Launch URL: https://webwork.institution.edu/webwork2/
Domain: <empty>

This is the opposite of what was in the documentation ( http://webwork.maa.org/wiki/LTI-Advanced_Authentication )
In reply to Walter Schwarz

Re: LTI through Canvas (WeBWorK v2.12)

by Miguel-Angel Manrique -
I, too, was having issues configuring WeBWorK with my institution's Canvas LMS. In particular, I kept getting the "Couldn't find valid settings for this link" when trying to set up grading in "Homework" mode. I wanted to share what worked for me here.

In Canvas' app settings:
-- "Launch URL" must be set to the course. For me, it had to read "..../webwork2
/MAT-24"
-- "Domain" does not need https:// or http://

My mistake (I believe) was leaving Domain blank. I hope this helps someone.
In reply to Walter Schwarz

Re: LTI through Canvas (WeBWorK v2.12)

by Walter Schwarz -
Stuck again!

Error message: The instructor account with user id instructor@institution.edu does not exist. Please create the account manually via WeBWorK. at /opt/webwork/webwork2/lib/WeBWorK.pm line 319.

I don't see any documentation on creating instructor accounts, and I don't see anything in webwork2/bin that seems to do the job.  Do I manually create it in MySQL?
In reply to Walter Schwarz

Re: LTI through Canvas (WeBWorK v2.12)

by Danny Glin -
By default WeBWorK will not automatically create instructor accounts based on an LTI login. This is for security reasons, as it prevents someone who obtains your LTI secret from being able to create themselves an instructor account.

There are two choices on how to handle your instructor accounts:
  1. Allow WeBWorK to create instructor accounts via LTI by changing $LTIAccountCreationCutoff in authen_LTI.conf to "professor". This is dangerous for the reason above.
  2. Manually create the instructor account in WeBWorK (which is what you asked about). The way to create an instructor is to add them as a student using the Classlist Editor, and then edit the newly created student and change their permission level to professor. Just make sure that the login name matches what Canvas is sending.