New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LTI Changes #608
LTI Changes #608
Conversation
- It looks for a ful urn for the role and removes the "path" portion of it. I.E it changes urn:lti:role:ims/lis/Learner to Learner - It now uses the url of the page request as the url for verifying the authentication token. This means that you can use any valid url in your blackboard course. This allows you to link directly to homeworks.
- Added a flag which strips the username off of the email. This is useful for systems, like Blackboard, which doen't provide the username, but you don't want the whole email. - Added ability for $LTIBasicToThisSiteURL to override the path used to validate the request
BTW: The best way to test this would be with warn statements.
|
I'd be happy to test this. We use blackboard on campus. Do you have some setup instructions that you use for this? |
First you need to set up webwork as an LTI through blackboard. I'm not entirely sure how this is done, since I had a blackboard administrator do it for me. I imagine these will help: https://help.blackboard.com/en-us/Learn/9.1_SP_10_and_SP_11/Administrator/120_System_Integration/LTI_Tool_Providers Next you have to uncomment out the LTI authen line from localOverrides, and copy the LTI authen file from the dist version. For this branch the only thing you need to set is Next you create a link in a blackboard course to a particular homework set. You should also click the "This link is to a Tool Provider" box. When you click the link it should log you into WeBWorK automatically, and even create student users if they don't exist. |
I'm trying to help our admin person set up blackboard LTI. I sent along the link to http://webwork.maa.org/wiki/LTI-Basic_Authentication Does the admin person just need the info in in the bottom (the example connecting to the IU site)? What is the URL that they need to add in? |
Above that there is the url for our webwork site and the consumer secret. |
Is the URL just to /webwork2 or is it to a subdirectory? |
I'm pretty sure its just the full url to the webwork2 server. To be fair, I didn't set ours up either. In particular the official instructions are
So it looks like its just the webwork2 server domain. You don't even need the /webwork2. You can use the global key option if you want your key to be for the whole server, or you can set the key per course using course.conf. |
# if you enable this flag and have $preferred_source_of_username set to | ||
# lis_person_contact_email_primary, then webwork will strip off the address | ||
# portion of the email and just use the username. | ||
$strip_address_from_email = 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is odd. This line and the comment above it don't appear in authen_LTI.conf.dist when I pull this request. ?????
-- OK. I fixed it. Something weird I was doing with git I guess.
# lis_person_contact_email_primary, then webwork will strip off the address | ||
# portion of the email and just use the username. | ||
|
||
# $strip_address_from_email = 1; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No idea. I commented out this variable by default. (it probably should be). Maybe the new commit will trigger something.
$self->{user_id} = $self -> {email}; | ||
|
||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Geoff. Did you mean to leave the if clause above in the code? There is no parameter get_username_from_email in any of the config files that I can find. And this causes somewhat confusing logic. For example if you set
get_username_from_email=1 then you get the full email address for the user_id (no matter what userid LTI provided).
If you set strip_address_from_email =1 then you still get the full address.
If you now set $preferred_source_of_username = "lis_person_contact_email_primary"; you get the stripped address,
My guess is that you want to leave out the get_username_from_email flag and the above snippet out entirely.
Comments?
Good catch. I think that was left over from when I was implementing the ability to get the username from the email before I decided to use the existing flags. |
Mike added some extra debug statements. I've tested them and they help out. The various LTI setups are substantially different in terms of what parameters they are passing and what the call the various roles users can have. This should help individual administrators untangle that mess. Peter, could you try setting up the LTI stuff again. If you add
to the autthen_LTI.conf file it will print out a bunch of debug info. |
These error messages are aimed at making it easier to set up the initial communication between WeBWorK and the LMS calling WeBWorK via LTI. Also commented out some preliminary code to be used at Rochester for deducing sections from the Blackboard course_label at UR. A lot of the authentication procedure is as described in the comments and specific to the needs of IU. A future update should breakout the process of assigning recitations and sections into a callback subroutine so that it is easier to program in different behaviors for handling this task. This will do for now.
Clean up error messages.
I think this is a reasonable pausing point for now. I can see further improvements that will make installing LTI easier and perhaps increase it's utilities. I think those major improvements should wait until after the 2.11 release. |
These are some changes I made to get LTI working with the Blackboard server at WCU. In particular
$preferred_source_of_username
tolis_person_contact_email_primary
and$strip_address_from_email = 1
. Then when a user is created it will use the username from the email and not the whole email.$LTIBasicToThisSiteURL
is not set then the system will try to get the url from the path given in the LTI request. (It will try both the http and https versions.) This can be tested by removing the$LTIBasicToThisSiteURL
variable as long as the path in the LTI request and your server address match.It works on our LTI setup but it would be nice if this could be tested on a few others.