It appears that user_id is the variable used by the LTI tool to do its mapping against (in my case) unique Moodle identifiers. This is fine as it goes but for some purposes it would be useful to have access to Moodle identifiers that are the genuine student ids as used within the University system (and ultimately, I assume, sourced from the SRS or similar).
In the below exchange between Christian and Tom Salyers in Feb 2021, there is a reference to a variable that might carry what we need: lis_person_sourcedid.
I can see that this appears in the LTI source code in various places but I cannot see how I can access it for use in a Numbas exam for example, where I'd like to be able display the (SRS) student id at the top of the left-hand nav bar. (I've been able to modify the nav-equence.html file in the theme we are using to include student_name but student_id gives the Moodle identifier and not the desired SRS one.)
Tom Salyers
Mon, Feb 22, 2021, 11:51 PM
Hi, all . As the subject says--we're putting in an instance of the Numbas LTI provider at our institution, and we've got some security paperwork to run through
Christian Lawson-Perfect <
christia...@gmail.com>
Tue, Feb 23, 2021, 12:21 AM
to numbas-users
Ah, I saw the email you sent to
num...@ncl.ac.uk before this one!
For everyone else's benefit, here's the reply I just sent Tom:
The information that the LTI tool receives about each user depends on how you configure the LTI link. The LTI consumer must at least send a unique ID for the user, which might or might not correspond to their username on the consumer.
There are a few other optional fields that the consumer can send; there's a good list of these at
https://www.edu-apps.org/code.html. The potentially personally identifiying fields are the email address, and the name fields: given, family and full. The lis_person_sourcedid field is a unique identifier that the consumer can understand, and might be readable on its own or might need to be linked to the consumer's database to make sense.
The LTI launch data is saved in the temporary session table; this is deleted when the session expires. The username, email address and full name are stored permanently in the Numbas LTI provider's auth_user table. For each resource launched by a user, an LTIUserData record is created. This stores: the lis_result_sourcedid, a unique identifier generated by the consumer linking the user and resource; the lis_person_sourcedid and user_id described above; and whether the user is an instructor.
Finally, everything the student does inside a Numbas exam, such as submitted answers, is stored in the SCORM data model, in the numbas_lti_scormelement table.
I think that's everything that could be personally-identifying.