Skip to content

RegProfileModule doesn't distinguish between teacher and student profiles #2722

@willgearty

Description

@willgearty

When checking whether the RegProfileModule is already completed for either student registration or teacher registration, it only checks for the existence of ANY RegistrationProfile for that program that is associated with the user. This can be problematic when a user (most likely an admin, although there are probably instances of students that also teach for the same program) registers for both student and teacher registration, because then the user will not be prompted to update their info for the latter registration. Since the profile form only shows student- or teacher-specific infos during registration, this will potentially result in us not having updated teacher or student info for the user.

This also has the potential to cause issues with various pages (e.g. userview) when we are trying to display info from the student_info or teacher_info associated with the profile. Perhaps this is even related to the issue @kkbrum brought up while reviewing #2607.

def isCompleted(self):
regProf = RegistrationProfile.getLastForProgram(get_current_request().user, self.program)
return regProf.id is not None

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions