By jim0203 on
I'm building a site for a school. There will be two user roles, "student" and "teacher". I want to be able to allocate each student to a teacher, preferably when I create the student account and preferably from a drop-down list of teachers. This information will then be fed back in to various things, including a custom content type where the teacher writes a report on their students: in the form for this content type, there will be a drop down box where the teacher can pick from their allocated students.
Any ideas how I might achieve this?
Comments
sub user
I have been trying to create a module for similar type of situation. Module is named as "sub-user"
You can check the module at http://open.vinayras.com/new-drupal-module-subuser
The module is still into very early stage of development.
I think you can use it as starting point.
Vinay Yadav
PHP / Drupal Developer
http://www.vinayras.com
www.eDrupal.com - Indian Drupal Community
Or you may try OG
Or you may try OG, teacher can be the group, student can subscribe to many teachers (groups).
Then you may explore further features that OG have.
The teacher would ideally
The teacher would ideally need to be a user, because they would be logging into the site and creating content. I guess I could create a group and put the tutor into it, and also all of his students, but that seems like an unnecessary amount of work.
Anyone else got any other suggestions? I don't want to appear picky, but this seems like a pretty simple thing that D6 should be able to do.
if you use content_profile
if you use content_profile to make user profiles into nodes, you can then use nodereference/nodereferrer cck fields to relate them to each other.
===
"Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime." - Lao Tzu
"God helps those who help themselves." - Ben Franklin
"Search is your best friend." - Worldfallz
I tried that, but it seemed
I tried that, but it seemed that, firstly, the user had to be the one creating the node-like profile, when on my site it should be an administrator who is creating all profiles. Secondly, when I did (just about) manage to set up rules.module and content_profile.module together so that an admin could create node-like profiles, I had to create these separately from the regular user account creation.
My admins are going to be creating a lot of accounts, so I want to keep their work to an absolute minimum. Any suggestions how I can do this?
Surely I can add a drop-down box to the user account creation form which contains a list of user profiles which are all teachers?
Surely I can add a
You should be able to-- just about anything can be done with drupal + php/sql. I would think that you'd have to hook into the form with hook_form_alter and then add your changes. I've not tried it though. Maybe someone who has will chime in....
===
"Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime." - Lao Tzu
"God helps those who help themselves." - Ben Franklin
"Search is your best friend." - Worldfallz
I've now created a custom
I've now created a custom module which adds a drop-down box to the user account creation form. This drop-down box is populated with users of a certain type, rather than from the output of a view, but this can easily be changed if you're happy to hack the code.
Anyone who wants the code should contact me for the latest version.