[eluser]adityamenon[/eluser]
[quote author="digital_frog" date="1339687724"]
Out of curiosity, are there any tutorials for Ion_auth? I've gone through the documentation, but seeing code in action is the fastest way to learn it sometimes.[/quote]
To be fair, Ion_auth is one of the better documented libraries around, the code examples are very clear on what input to give and what output to expect. Dinko's post above mine has a link to a 3rd party tutorial too.
[quote author="digital_frog" date="1339687724"]
Ok, one solution is to create an extra row in the database that contains a teacher ID separate from their user ID, and all of their students will have the same teacher ID. Looking up students by teacher would simply mean matching the teacher's ID of the student with that of the teacher. Defining class could just be another row for students as well. But would it be easier to create a group for every teacher which would define their own students, and then another group based on class? Instead of using a teacher ID to track students, it would be their teacher's group. Also for the class group, it would simply be class1, class2, class3 and so forth, so all students across all teachers can use the same class groups since their teacher group will separate them.[/quote]
I suppose you can do it this way too. I would personally prefer having IDs to track teacher and class, as I think having so many groups will probably get messy after a while. Especially because I will then need to write code to create groups on demand, edit/delete them (and dealing with all the students they are associated with, and this might even affect classes). I tend to think Groups as a structural support to the data, and don't want to mess too much with it but only use it as a foundation.
But coding is also about creativity, so go ahead, do what you are thinking, and let us know how you fared!