I notice that there are controls to share or not share both the launcher's name and email. Is there a way to share the launcher's Username? Or is there a way to use the Custom Parameters to accomplish this? I have searched, but cannot find anything about the format of the Custom Parameters, how they would be entered?
May I ask why you're looking for this information? The user_id in the post uniquely identifies the user from moodle to the LTI provider.
Because I'm connecting to a non-LTI provider, sort of a translation layer. For the LMS's we've got working this way so far (Blackboard and D2L), the username has been one of the parameters. So maybe it's an optional LTI parameter that Moodle chooses not to expose? I was hoping to access it through the Custom Parameters, but no luck there. It's kind of a duct-tape approach until the non-LTI provider can properly add LTI support to their product.
This falls into an area I can't speak to. The spec (1.0 or 1.1) doesn't have a call-out for actually passing that particular piece of data along. That said, poking around in the 2.2 LTI PHP files, extending the functionality should be pretty straight forward for someone intimate with the guts of moodle. I would imagine that it would be similar for the pre 2.2 LTI modules as well.
I got to thinking about this a bit more, and if you are in control of the external tool, or can suggest modifications, you COULD write code that takes advange of web services and query the user data that way. look at core_user_get_users_by_id in the web services documentation.
I was wondering if you could post what the URL would look like for "hitting the service"
To me at least, I can't seem to actually ever "hit the api" externally.. it works just fine from the test harness.. but since there is literally 0 documentation on using the API in existance, I can't figure out the correct params like userIds=2&userIds=5 etc.. i'm amazed at how non-existant docs are.
I'm in the same situation as Mr. Ballard as I'm also looking for ways to obtain the username for my LTI external tool. My app tool will be used by different universities so I'm looking for a simple solution that can be used on any system. Like Mr. Ballard, I've also worked on other LMS like Blackboard and Canvas, and I've managed to find ways to insert the username in the parameters. But with Moodle, I'm at a lost.
I've looked into the web service proposal by Mr. Ellis but I'm somewhat cold to the idea. For one thing, I'd like to minimize the amount of extra services we'd have to run to make our LTI tool work. The other thing is that I feel that it somewhat defeats the purpose of having the LTI since it should be providing us with the basic information that we need.
So, basically, are there any other ways to get the username for an LTI external tool? Any hint would be appreciated! Thank you.
Have any of you got how to get the username?