How do i filter list of users by user role and further by custom profile field

private
geniekids - Thu, 2008-07-17 11:23

Hi
I am struggling with something which i guess is simple - but could not find a straight solution - hence this post.
This is my scenario (i run a institute):
1. I have a CCK content type in which the faculty enters the observation of each student
2. Each student's (drupal) role is defined by the program he is sighned up for say progA, progB and ProgC
3. Further within each program (or role) each child is in a different class or group - for this i have created a profile field called student_group - say groupX and GroupY

so what i want is that when faculty want to enter observation they should be able to "choose" the student's name
first filter by program name - say choose progA, then filter the list by group name - say, GroupX

so they get user list (of students) only in ProgA & GroupX and select the right name to enter observations.

Once they enter the observation - the student sees his observations (using views)

How do i get the userlist filtered by these two levels - first by role and then by student_group.

realise also that one student could be in more than one program (through within a program only in one group). Which means that in the user profile two roles are selected for such a student.

thanks in advance to help me set this up.

Hello genie ....

newmans@drupal.org's picture
newmans@drupal.org - Thu, 2008-07-17 12:13

I think you can views modules for this,
If you know use of views then i think its very easier to make thing,
One our member zeal can help you more o this as she is well experience with views....

You can use js for this too,
i can hep you using js if you provide me zip file of your module on my mail,
you can mail me on "mehul_n_parmar@yahoo.com"

in page you have to add one js and three select box using drupal_render function
now in js , on suitable event of combo 1 and 1 you can change there data

for this you have to use ajax and jquery or any othere js interface will make for u if u send me module....
have a good day friend :)