I am building a website for an organization that offers many different training courses each year. The members of the site want to be able to find classmates from previous years who took a course together.

For those of you who dont know facebook - it has a cool ajax app that lets you choose a school - and then you can specify the years you were there and then move on to add more school/year combos.

I want to build something similar into the profile section when a new member is signing up for an account. (I am already using the content_profile module http://drupal.org/project/content_profile)

The way I see it in database terms (I am a relatively new drupal user) - I need an sql table something like this:

TABLE_GRADS
-----------------------------------
USER_ID | COURSE_ID | YEAR
-----------------------------------

This would allow one user to add many course/year combinations.

ADVICE I NEED:

Can I build this using existing Drupal modules and pieces? I've tried to imagine how it could work using taxonomy only - but I dont think it will work.

My first instinct was that I should use node reference as a CCK type but the only problem is, I cannot also specify the year. Ideally I would be able to select the node [course id] and then specify the year and add the package.

I have noticed that the link module http://drupal.org/project/link allows for this.

Should I be looking at venturing into creating my first module or is this something I can bang together in another way?

Once I get your feedback then I will look down the road into how I will allow users to browse/find classmates.

Thanks,
Bart Sullivan

Comments

vsr’s picture

Could you use a views to filter results. Maybe pass as arguments the year and course ID and have output users. You probably would need to write a module that would make the urls with the arguments for views to handle. The module would have to output the list in the profile page or something like that. Just a thought on how to do it.

surfacescan’s picture

yes - the views is a must have for outputting the results - no question.

The question is how the user can store the information when creating the account - I could create a new content type called graduating_class with two fields: Course and year.

Then have a link somewhere in the account creation page to "add a course you've taken to your profile" and keep iterating until they've filled them all out...

But Im trying to avoid creating a new content type...

Bart