Adapting CiviCRM for the needs of a school ...

Publié
2009-08-13 19:31
Written by

I've been working on customizing CiviCRM for my kids school. I documented how i exposed relationship information on a profile view in this blog post. In the past week i've also exposed "activities" and "a multiple record custom group" via profiles which i'll describe in this blog post. All this work was done via civicrm hooks and custom templates and run on CiviCRM v2.2.8. You can download the code from here. In this blog post i'll discuss two features that i've implemented: Scheduling Parent Teacher Conferences and Managing Extended Care.

Scheduling Parent Teacher Conferences

The school wanted an automated system to schedule parent teacher conferences. These meetings typically last 30 mins. For some grades its all done in one day, for some other classes its spread out over a couple of weeks (few slots / day). I decided to create a new activity type called "Parent Teacher Conference". For the first parent teacher conference, we have 4 advisors and 30 students. The conferences happen on the same day between 7:00 am - 6:00 pm. Each advisor has 10 students. Some students have 2 advisors. I wrote a script to populate these activities automatically with the assignee being the advisor. The advisor also has the option of going into his activities tab and deleting all the times when she/he does not want a meeting. We also created a new relationship type called "Advisor <-> Advisee" and used import to create these relationships.

I exposed the meeting in the profile view for a parent (and the student). The query seems pretty complex but basically checks and sees if there is a scheduled meeting for the student in the future. If so it displays the information. It also provides a link for the parent to choose a time that works for them. Once a slot is taken, its no longer available to other students/parents. Thanx to the relationship feature, handling multiple advisors was also relatively easy. The drop down allows the parent to choose a meeting with either advisor. The school can go in and change the student-advisor relationship via the relationships tab

Ability to sign up for extended care (i.e. after school activites)

We also decided to give parents the ability to sign their child(ren) up for after school classes. There are multiple classes offered every day, some of them have a max number of participants limit, some of them have an additional fee associated with it. A student can also sign up mid session and/or drop out before the end of the term. So we would need to track start/end dates. The extended care supervisor wanted an easy way to update the class information. He also wanted the ability to edit / delete students from a class and a daily attendance sheet report.

We thought a fair bit on how to structure and hold this data to meet the above requirements. The above data can be split up into two parts: information about classes and data about who signed up for what class and when. After some back and forth we decided on the following. We decided to store the classes in a CSV format (so the supervisor can maintain things in excel and upload changes to the system). We chose this approach because we could not find a good way to store this information in CiviCRM. Also this information is used only when someone wants to sign up for a class. We decided to use a custom group with multiple records to store the information about the classes that a student could sign up for. A student can sign up for multiple classes per day / week. Hence we needed the multiple record feature. This also meant we could not use civicrm profiles to edit/create this data, which was not a big deal since the source data was in the CSV file.

Similar to the conference scheduling, we implemented a custom hook on profiles to inject these form elements into the profile edit form. We read from the csv file, check with the custom table to ensure that space is still available and then give the parent option to sign up for one or more classes for their child. The profile view is a bit simpler since all the information is directly available in the custom value table for all students.

One final customization was the custom data view screen in the contact tab. By default multiple records are displayed as blocks, one below the other. This was not very friendly or usable in this case. Since the amount of data to be displayed was fairly limited (8 fields), we modified the template to show it in a tabular manner.

The extended care supervisor can now go in and edit the student record and edit/delete/add any classes as needed using the regular CiviCRM backend interface.

Some thoughts and comments

Overall i've been fairly happy with how easy things have been to customize and extend for this specific scenario. I think our recent focus on allowing folks to extend the system via hooks has definitely been worth it. I also think most of the changes that i've done are fairly generic and packaged so that other folks can use it as an example / customize it / run with it. As with most software packages, CiviCRM does not (and cannot) do everything. I do hope that folks start building additional modules that meet their specific needs but are potentially beneficial to others in the community. If you do so, please document/blog about it Unfortunately at this time, i do not have a demo of the site (since the data is confidential, we cannot expose the test site). Please feel free to download the code and ask me questions on the blog or IRC. Please note that this is being actively developed and things are subject to major/minor change over the next few weeks.

now back to CiviCRM v3.0 :)

Filed under

Comments

Anonymous (non vérifié)
2009-08-30 - 16:27

Thanks for the write-up. Quick note, it looks like the bottom half of your post got copied in twice!

What does a "custom group with multiple records" mean?

Oh, and if you ever get inspired to post a screenshot or two (not sure if that would be legal, but if so) especially of the new profile edit forms etc. that would be wonderful!

Keep these posts coming - I'm needing to do something really similar so this is a huge help!

Thanks!

another blog post coming this week :) the system is going into production this week, so far things seem to be looking quite good :)

no promises for a screenshot or demo currently :( its a bit more work than i have time for right now

lobo

Guest (non vérifié)
2009-09-03 - 04:22

Hello

I am so interested to use the Ability to sign up for extended care module you post it . I am new to Civicrm, this is my first use , I use it with Joomla , would you please give me some guidance where I need to include the profile edit form file you post , and how I have a link on the front end for parents to sign up .

thank you very much

Rania

but u can potentially be on joomla. You'll need to be a programmer and be good with php/mysql/drupal/civicrm. The code is on the links above. ping us on IRC if u need help

lobo