-
Notifications
You must be signed in to change notification settings - Fork 1
The old system
From Janak:
I'm the original developer of the system, and I still currently maintain it, although I'm no longer in Berkeley. There are a number of issues with the system as it currently stands, perhaps of varying interest to your course. My impression of important ways that the system needs work are the following:
- UI, as Natalie said. Much of the interface is bare-bones html, but javascript and CSS are used extensively in parts, and keeping that functionality while making the whole system look and feel better would be a big task.
- There is a page at which workshift managers assign workshifts (chores) to members, based on member preferences. The system currently gives some "passive" help -- telling the manager which members want to do a particular shift and are able to do it, and warning if a member is unable to do a certain workshift based on their stated preferences or already-assigned workshifts. A big (NP-complete) project would be writing an automated system to assign workshifts. A more useful big project would be to work with workshift managers to write a more active assistant. For instance, the workshift manager could ask the system to assign everyone 3 hours of chores, as a baseline, and then they would only have to manually assign the remaining 2 hours. Or in reverse -- the workshift manager would specify certain assignments as fixed, other assignments as movable, and the system would try to complete the assignments based on this. Or the workshift manager could ask that the system assign shifts for the following 10 members, ensuring that each had at most two dish-washing shifts, one bathroom shift, and one vacuuming shift. And so on. I don't know which of these features would be most useful -- there would be a lot of user testing with the workshift managers.
- User authentication is kind of a mess, and the co-ops are moving to use JomSocial, and giving each member a JomSocial page. Integrating the workshift system with JomSocial, or even just the user authentication part, would be a big project.
- the system was written in PHP, in a fairly non-object-oriented, non-encapsulated way. Much of it could be rewritten to be cleaner. As well, a lot of PHP features (like session-based variables) aren't used. Similarly, the MySQL tables are definitely not optimized -- lots of redundancies. The whole database structure could be radically changed for the better.
The system's source code is available at http://sourceforge.net/projects/workshiftdb0/ and a recently-created wiki with some documentation is at http://workshiftdb0.sourceforge.net/w/ .
You can get access to the system at http://workshift.bsc.coop/nsc/admin . Northside doesn't use the system since it's an apartment, so that should be fine for testing. Username/pass are [contact Brian to get user/pass, don't want to post it here], which gives you full control (to all the houses, so use it wisely). For shell access to the bsc system, ask the webmaster, I guess.
I normally do testing on http://cvsworkshift.bsc.coop/ which has a copy of all the files. I'd be happy to talk with you by phone or email about any aspects of the current system that you had questions on.
As I said, the database structure can probably be largely scrapped. However, if you're going to write the front-end in php, you might want to look at reusing chunks of the current system. Even if you're not writing in php, some of the generated html/javascript may be useful. In particular, php_includes/table_edit.php contains a lot of php, html, and javascript that is used to provide a way to edit/view a general MySQL table. This functionality is essential in at least two places -- workshift managers updating the hours done by the house in a given week (http://workshift.bsc.coop/nsc/admin/week.php) and workshift managers assigning shifts (http://workshift.bsc.coop/nsc/admin/master_shifts.php) . I'm sure things have advanced greatly since I wrote this 7 years ago, but I haven't come across anything similar in terms of a spreadsheet linked to a database. So while the php is quite ugly, you might want to use the html/javascript it generates and some of its logic.
From a programming standpoint, my view is that the three biggest challenges are: (1) writing the mysql-spreadsheet link, as above; (2) implementing the calculation of fines/hours, since this varies a lot from house to house, and houses change their fining policies occasionally; (3) writing a usable interface for the workshift managers when assigning shifts (currently at http://workshift.bsc.coop/nsc/admin/assign_shifts.php).
If you're going to rewrite from scratch, I'm not sure that looking at the code will be that useful, but you might want to look at the workshift manager main page (http://workshift.bsc.coop/nsc/admin) to see what tasks workshift managers have to do. I would suggest that your first task be to figure out how workshift managers will view/enter the weekly data about shifts. Note that workshift managers often add special shifts in a given week, may delete certain shifts, may alter pretty much any value of a given shift, and, with online signoffs, the table may be altered directly by users, and those changes should be apparent to the workshift manager, who can let them stand or change them. This part of the system is separate from issues like user's preference forms and fining and hours calculations, so it's a reasonable thing to work on in some isolation, or at least to flesh out more fully before the entire system is settled.
With regard to integration with JomSocial: if all of the coops are going to be using it soon for sure, we can build the entire authentication system around it. Otherwise, we can add it in afterwards as a side module (and still have normal authentication), which might be a better design anyway.
Alfred the Communications Coordinator [email protected] is the person to ask -- the project started this summer, as I understand, but I haven't heard anything more about that. User accounts are a bit annoying, since (1) users leave for a summer/semester/year, but then return, and it's nice to have some data persistence; (2) houses will have official/unofficial boarders, who may or may not show up on an official house list, but should be accounted for; (3) houses may have short-term guests, who perhaps the workshift manager doesn't even bother creating an account for, but who do some workshifts that are kept track of if the manager needs to go back and check that enough hours were done. (You should ask workshift managers about actual use cases here -- perhaps I'm overstating it.)
A (totally separate?) issue is that the workshift system currently has an online elections module, which is used by a number of the houses. There's a claim that it will be replaced by something the consultants are doing, but I don't know the timeline for that. But as a result, the authentication, and general security, for the current system is probably higher than it should be for a workshift system but not high enough for an elections system (note that since online signoffs sometimes use another member's login for verification, a reasonable level of security is definitely needed).
I would be happy to take a look at any progress you make, to let you know about issues that I'd come across that you might run into. Please do keep me updated!