This site is rarely updated. benbrophy.com is more up-to-date. - Ben
New javascript goodness
In order to enable the use of more client-side scripting, and eventually some Ajax interactions, I added the Prototype javascript framework to Stellar. I used it to stream line a new validation trick in Stellar 1.7.1.
In Stellar 1.7 we changed the access denied page, so that if the person seeing the Access denied page is a member of the MIT communuity, they can send an email to the instructors asking to be added to the class list. This reduced the number of students calling the help desk to report they were unfairly excluded from a class. Unfortunately it increased the number of faculyty complaining about students asking for access to the class website. This was especially true for big classes, with lots of TAs and instructors, where the faculty delegate jobs like keeping track of the class list to their assistants.
We now allow instructors to indicate who in the class staff should receive access requests from the students. At least one person must be designated, more than one is also fine. We couldn't use a radio button, because that would allow selecting more than one, and by using check boxes we allowed people to emove everyone. So I wrote a java script that notices when the penultimate check box has been checked and disables the last check box, adding a little expanatory note. When more than one check box is checked, all of the check boxes are enabled and the note goes away.
Prototype.js made it much easiers, especially being able to collect all the check boxes with the same 'class' in an array. I'm looking forward to doing fancier things with it in the future, espcecially in Stellar images.
Tags: Stellar javascript prototype