WeBWorK Main Forum

Canvas LTI with individual assignments versus general

Canvas LTI with individual assignments versus general

by Karl-Dieter Crisman -
Number of replies: 8

Thanks to help from these forums, I've gotten LTI Auth to work from Canvas to our local WeBWorK server.  However, some points still remain before it's ready for prime time.  Here's one.

When I am in Canvas, as directed in various locations, I am sure to put the Launch URL in the form http://ourserver.com/webwork2/MAT123-456   When I use that as the URL in an actual Canvas assignment, this works fine.  (Well, fine enough - I'm having lots of problems with nonces or something, and passback doesn't work, but ...)

However, when I change the URL in the Canvas assignment for the External Tool to http://webwork.math.gordon.edu/webwork2/MAT134-2020SP/Orientation, then I get the famous "couldn't find valid settings for this link" e.g. https://webwork.maa.org/moodle/mod/forum/discuss.php?d=4050

Any ideas as to why that would be?  Obviously I'm not going to set up a separate WW app in Canvas for each separate assignment.  That would REALLY be overkill.

Notice that this isn't about setting the "homework" versus "course" setting - I'm just trying to get it to recognize this first.  (Or *is* is about that?  But passback isn't working anyway yet.)

Thanks for any thoughts!

In reply to Karl-Dieter Crisman

Re: Canvas LTI with individual assignments versus general

by Lars Jensen -

Hi Karl,

Our launch URL is similar to yours, pointing to the specific course. That works as-is for  "course" grade mode where you only have one Canvas "assignment" containing the webwork homework average score. if you want to use the "homework" grade mode, then when you set up the canvas assignments using the external tool, you will need to append the URL with the webwork assignment name at the back. I don't think an url which points to an assignment will work properly if your grade mode is set to "Course."

Lars.

In reply to Lars Jensen

Re: Canvas LTI with individual assignments versus general

by Karl-Dieter Crisman -

Thanks. I think that the problem right now is that I don't even get to the point that WeBWorK is involved; Canvas just gets annoyed.

I used the URL with the assignment appended for the individual assignment.  But would I have to set up the External Tool app (in Canvas course Settings) with the assignment name appended as well?  I don't see that anywhere in the doc, but it refused to let me put the overall URL in the "Launch URL" but then put the individual assignment link in the actual Canvas assignment.  It works fine once I put the same URL as the "Launch URL" in the settings.  Sorry if I didn't make that clear.

In reply to Karl-Dieter Crisman

Re: Canvas LTI with individual assignments versus general

by Lars Jensen -

Hi Karl,

First you must sure you have added the webwork app to the course, as described here. The Launch URL should point to the course (not the assignment), and set "Privacy" to "Public".

Once that is in place, in canvas, create an assignment, and as you do so, use the External tool in the assignment setup. The external tool URL should point to the specific webwork assignment.

Sincerely,

Lars.

In reply to Lars Jensen

Re: Canvas LTI with individual assignments versus general

by Karl-Dieter Crisman -

Thank you, Lars.  That is actually exactly what I have already (successfully) done.  For whatever reason (possibly a problem with my local Canvas? but I have no control over that), those instructions do not work when I use them with a specific WeBWorK assignment.

That is what the original post was about - wondering whether there were any other WW or Canvas settings I may have missed.  Apparently I didn't miss any obvious ones, so maybe it's a problem with some setting my Canvas admins have set.

In reply to Karl-Dieter Crisman

Re: Canvas LTI with individual assignments versus general

by Lars Jensen -

Hi Karl,

Yes, LTI is complicated to configure, and not well documented. The configuration issues are all on the webwork side. If you have the "course" grade mode working as expected and syncing correctly, then everything on the canvas side is likely correctly configured, and should work for the for the "homework" mode too. So I don't think you missed any canvas settings.

I have had my own issues and come to the conclusion that a global LTI configuration does not make sense  - some instructors will want  the "course" grade mode, and some will want "homework." So I think course.conf is where LTI should be configured, as suggested by Danny Glin here. So we're going to keep ldap authentication as the default, and then configure LTI course by course, in each course.conf.

It would be nice to have the webwork LTI configuration be part of the "Course configuration" link in the webwork course, so instructors can set it up themselves. Just like individual instructors can set up LTI sync between Pearson Mylab and the LMS from a simple gui interface. Most instructors now are familiar with, and capable of, handling such configuration from a gui interface, as it has become commonplace during these covid times.

Sincerely,
Lars.

In reply to Karl-Dieter Crisman

Re: Canvas LTI with individual assignments versus general

by Danny Glin -

I don't have access to a Canvas instance, but based on the WW documentation here's my understanding of the config on the Canvas side:

When you create the External Tool app, if you fill in the Launch URL, then the app will only respond to that exact URL.  If  you leave the Launch URL blank and instead fill in the Domain, then any link that you create to an address on that domain will use the app.  If I'm reading this right, then you should just put the domain name in that field (i.e. no http://).

The one downside of this is that you are creating an app for your entire WW server, and not just the one WW course.  This can be mitigated two ways: 1. Only instructors in your Canvas course can create LTI links using this app, so you just need to be careful that you're not creating links to other WW courses. 2. You can enable/disable LTI authentication on a course-by-course basis in WW by including the appropriate config in course.conf.

In reply to Danny Glin

Re: Canvas LTI with individual assignments versus general

by Glenn Rice -
That isn't quite true. If you add a Launch URL that is "https://your.server.edu/webwork2/", then it will limit you to sites on the server that start with "https://your.server.edu/webwork2/". So you couldn't open "https://your.server.edu/another_place".  Note that the forward slash at the end is neccessary.

I believe that in any case you need to also fill in the Domain with "https://your.server.edu".
In reply to Danny Glin

Re: Canvas LTI with individual assignments versus general

by Lars Jensen -

Hi Danny,

My experience, having worked with Canvas, is that when the app is first defined according to these instruction, then whatever you enter in the "Launch url" slot will be entered anytime an instructor sets up an assignment as described here. Because the app is generally used for more than one webwork course, we only enter https://server.domain/webwork2/ as the launch domain. Then each instructor only needs to append to this url the "coursename/setname" or "coursename," depending whether they use the "homework" mode or the "course" mode, respectively.

The point of the "Launch URL" is to save each instructor from having to write the full webwork server URL every time they set up an assignment.

I don't use http or https in the domain. just server.domain.edu

Anyway, as posted in the last paragraph here, we need a better setup for instructors.

Sincerely,
Lars