Many institutions have a numeric id used to uniquely identify students (student number) that is valuable for grading and administrative purposes. The CandidateDetailProvider introduced in
provides a similar feature, an institutional anonymous id. This patch will add a numeric id to this provider, and expose the student number as a column in Gradebook (our institution has had this column for many years). Other tools would be able to use this provider to also expose students numbers as needed (we also use it in the Certification contrib tool).
Due to the sometimes sensitive nature of student numbers, visibility is controlled through two permissions. Permission "user.studentnumber.visible" is for the user the student number belongs to, and is required for that user's student number to be displayed. Permission "gradebook.viewStudentNumbers" is required for the current user to be able to see the student number column in the gradebook. Other tools could adopt similar permission schemes.
CandidateDetailProvider encrypts data by default, but this can be disabled for student numbers with a property, which is helpful, for example, when sourcing student numbers directly from plain text entries in the sakai_user_property table.
A minimal setup for this feature includes the following:
- grant "user.studentnumber.visible" to students
- grant "gradebook.viewStudentNumbers" to instructors
- set sakai.property useInstitutionalNumericID=true
- set sakai.property encryptInstitutionalNumericID=false
- insert the student numbers in the sakai_user_property table under the key "studentNumber"
- like other CandidateDetailProvider attributes, student numbers can be sourced from LDAP
- there is a SampleCandidateDetailProvider implementation, active by default, that generates student numbers automatically for testing purposes.