Closed mek32390 closed 6 years ago
My suggested approach, for long-term stability, is to have user Profile objects that have the Foreign Key to a Django User object optional and their school email address stored there. This would allow profiles to be created and students to be attached to those profiles and so on, and so forth, and so the most "logical"-sounding approach would then work.
AllAuth would continue to be associated with User accounts and, when registering, a way would need to be found to check existing Profile email addresses against the registering user's email address.
Challenges in this: the existing system depends upon being able to find a User for many things, including email addresses, so simply making the key optional for existing Profiles wouldn't cut it. Instead, a parallel system could be created to eventually subsume the existing system.
While I consider the above the most robust in terms of not duplicating things and enhancing scalability, I'm not convinced about its viability in terms of timeframe. As such, one thought is to have it create "NewProfile" (call it whatever you like) and "NewEnrollment" (same) objects for all imports, but also set up enrollments for existing users if any are found. Then over time, new features would depend on the NewProfile/NewEnrollment classes and eventually the old ones could be deprecated.
This is a critical issue that needs a good diagnosis. I'll put it into context:
Given this update, how we should proceed with this? Do I make 300 google Drive folders (one per intern), and have them submit their class sets there (syllabus and html file) in the meantime?
Here is the breakdown of the workflow:
A problem occurs because the mailer will only email "enrolled" "student objects" in the course. Our backend makes a one-to-one relationship between each Django "user" to a "student object", and only a "student" can be "enrolled" in a course on mchp. Remember, the mailer checks for the "students" "enrolled" in the course and emails them.
So, how do imported roster entries from an intern become "enrolled" and therefore "student objects" in a course on mchp, even thought they may have never signed up before?
Further, if they do try to sign up, Django will reject their email in the form because to Django, there is already a "user" with that email.
This may be the wrong approach, so I am very open to trying alternative methods to solve this problem.