1

I run a Drupal 7 site for one of my clubs at school. My eventual goal is to create a system where club officers can manage all sorts of information about our members through this site (such as contact information, which I've already got working). I want to have a system where perhaps a content type like "Club Event" (doesn't have to be an actual event like that found in the Date module) or "Club Meeting" is created and there is some field where club officers can essentially get a checklist of members and check off who attended that event. This content type would then also have a field where a certain point value is assigned to that node and whoever is checked off on the list will get a certain number of points added to their account.

Finally there should be some sort of view where officers can view a list of all members and the number of points they've earned/events they attended.

Does this sound like something realistic to do within the Drupal framework? If so, any suggestions as to what modules might be necessary? Would this be something the User Points module can be used for?

I've never written any modules for Drupal before, but I'm not opposed to getting my hands a bit dirty if necessary.

1

If it were me, I would first create a role for members. I would have each member register and then have an officer assign them the role member.

I would then use the views module to display a list of members by using a filter by role. That would allow a list of members to be shown.

Then, I would create an attendance table and a meeting table in the database. (You can do this through the next step if you want to learn how to create drupal db schema. I would probably have the fields:

meetingId
meetingDate
meetingDescription

The attendance table would have:

meetingId
userId

When a user attends, you create a reference to the meetingId from the meeting table and create an enter with the drupal user id. When you want to know who selected a given meeting, you select all userId's from the attendance table matching the meetingId.

I would then write a simple module that uses the forms api to create a meeting. Then, you would have another page that lists all of the users by selecting all the ones with the member role and again using the forms api you would add an entry for the attendance table for each person that was there.

So there would be one link and two coded pages now... one link to "view meetings" which would show all of the meetings. If you click on a meeting, you would be taken to the page which displays users. If the meeting was in the past (meaning some historical data exists), it should have historical attendance data. You can handle that in one of two ways... either show them the historical data and do not allow edits, or you show your original form but populate the check boxes of people that attended. Otherwise, it is a new meeting and should just display the form. If it were me, I would allow edits and it simplifies the page because it is the same form, just populated with check-boxes if there is any data.

This is an excellent opportunity to learn how to write a module. It is very simple yet complex enough to show you the ins an outs of creating a Drupal module. Also, it has a clear and definable end result which will either work or won't.

You can check out the schema module for help creating the database tables through the module. This is a good thing to learn.

If you want to go one step further, you can expose your tables to views and use the views module to create the display portions of your data. Although you will still need to create the forms on your own.

Update: Thought, you could also add a notes column to the meetings so people could enter and save notes. Also, your imagination is the limit here. All sorts of other things could be done. However, I would keep it as simple as you can stand for your first module.

0

You are on the right path, User Points is the module you should use. You might need to do some custom coding to assign points.

  • Use User Points module
  • Create a checkbox Update User Points
  • Write a small custom module which will implement hook node update. Check for checkbox value Update User points and read Number of Points and Attendee list to add points to users. For more detail refer user points documentation.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.