From: James E. F. <jf...@ac...> - 2002-01-09 15:24:43
|
On Wed, 9 Jan 2002, Danie Roux wrote: > Great program Jimmerman! It's really well thought out. > > Where do I start looking if I want to change it to do the following: > > I want students (respondents) to be able to fill in only certain > surveys. But the students is part of more than one subject (group). > > So I guess I want it so that I can assign more than one group to a > student. > > It's about 20000+ students and I have no idea how many subjects. > > Once again thank you for the great work! Well, you should be able to do this without changing any code. Its a little messy right now, because I adopted the authentication code from something I wrote using an external authentication method. The way to do it is just to add the user in for each group, with the same password. If you have so many students, I assume you will be adding accounts with a script (not by hand in the web interface). So something like this should work: INSERT INTO respondent (username, password, realm, fname, lname) VALUES ('foo', PASSWORD('foopass'), 'subj1', 'John', 'Doe'); INSERT INTO respondent (username, password, realm, fname, lname) VALUES ('foo', PASSWORD('foopass'), 'subj2', 'John', 'Doe'); Hope that helps. -James |