Here are some resources to help you get started on the code for managing the AIM workshop surveys.
Our current workshop surveys:
(may need to login as "aim" with password "arcc")
http://aimath.org/sitevisit2011/WorkshopEvaluationForm.pdf
http://aimath.org/sitevisit2011/WorkshopProgressForm.pdf
The current form we use to record and view surveys.
(Do not take this as a model of how we want the new form to work.)
The program you will write accept a parameter (which is a positive integer) that is the "WorkshopCode" of a workshop. In addition to connecting the surve to the workshop, the WorkshopCode is used to look up the title of the workshop in a database. Here is a dump from a mysql database of the table containing information about workshops:
Probably you only need the WorkshopCode and WorkshopName fields from that table. The WorkshopAbbrev is a short string that encodes the workshop name, which may also be useful for something.
You will use that data to seed a MongoDB database with a collection containing the workshop data. This will ensure that when we change from mysql to Mongo at AIM, your program will continue to work with minimal changes.
The other information your program knows about the workshop is the survey(s) associated to it. A survey has questions, and responses from each person surveyed to those questions. The questions, and the responses to the questions are stored in a MongoDB database that you will set up. Note that there can be multiple surveys for a workshop.
Once the survey forms for a particular workshop have been described, and the answers on the completed surveys have been uploaded, people will want to browse the responses.
Statement of question 1
Person 1's answer to question 1
Statement of question 2
Person 1's answer to question 2
.
.
.
-------------------
Statement of question 1
Person 2's answer to question 1
Statement of question 2
Person 2's answer to question 2
.
.
.
-------------------
etc
(I tried to make a mockup of this, but it didn't convey the
idea any clearer than this plain text version.)
The person entering the data will leave a blank line as a paragraph
break in text answers, so you have to scan for this and make it look
right in html.
Before clicking "by person", the user has to select a survey by clicking near the top of the navigation box. The survey title then appears in the banner.
When the question is multiple choice, the page only shows the total in each response category. Include "no response" for those who did not answer the question (only if there were any).
When the question has a text answer, the page has to indicate where one answer ends and the next begins. For example, there may be two answers, one of which is 2 paragraphs and the other one paragraph, The person viewing the page has to be able to tell as a glance where one answer ends and the next begins. (We can discuss this later if you wish.)
Grouping of answers. In the "by person" option we want to order the responses by the multiple choice answers. Suppose there are three (3) options to Question 1. Then when displaying the results "by person", first show those who have answered option1 for Question 1, then option2, then option3, and then those who did not respond.
When grouping "by question", for Questions 2 and following, we again want to group the responses. So for all the responses to Question 2, first come those who answered option1 to Question 1, then option2, etc. The answer to Question 1 should somehow be indicated (in a subtle way) in the answers to Question 2. (We can discuss this later if you wish.)
Allow for the possibility that the first few questions are multiple choice. So then you would make a lexicographic ordering according to those answers. (This scenario is not far-fetched. Question 1 may ask whether their PhD was before or after 2002, and Question 2 may ask whether they are Postdoc, or assistant professor, or associate professor, or full professor.) Ask if this is unclear.
Note: The above discussion is not quite right. It is possible that Question 1 asks for the person's name, and then Question 2 is multiple choice. So in display "by question", we don't actually want to see the answers to Question 1 (because the list of names is not helpful by itself), and it is Question 2 that should be used by grouping. So probably we need some way of indicating which questions we want to see when we group "by question". Hopefully you can code in a way that lets you ignore this at first and add more features later.
I guess a workable solution is to order lexicographic according to the questions that are multiple choice, in the order they appear on the survey. And when viewing "by question", have the option of hiding a question.
A given workshop might use a completely new survey, a modification of a previous survey, or a survey that was used before.
The form has a field for the title of the survey, and a "brief title". The brief title is a short string, maybe 10-12 characters, which will appear in the navigation box. (For example, "Survey1" in the mockup.)
Each question has a statement and an answer type. The statement typically is one or two sentences. The answer type could be text(one line), or textbox, or radio/dropdown, or multiple answer. In the case of radio/multiple answer, after choosing the type of answer, the user selects the number of options and then enters the values of those options.
After creating a question, the user can save it. The form now shows the existing question(s), and below that the form to add another question.
The user can drag-and-drop to reorder the questions (the questions are numbered, and the numbers change automatically when rearranged).
Next to each existing question is an "edit" link, which enables edit-in-place of the existing question.
At the bottom is a "save form" link, which exits the form creation page, and makes the form available under "Surveys" in the navigation box.
Clicking the "use as-is" link makes that survey available for that workshop. The "make new version" link brings up the edit survey form (as described above) with that survey already in the form. The user can then make changes and save.
When a survey is used "as-is" it does not get added to the list of all surveys. (This prevents the list from being too long, where many of the surveys are identical, differing only by which workshop the are associated to.)
Note: before clicking "new response", the user has to first select a survey to use. This is done at the top of the navigation box. After selecting a survey, the title of the survey appears at the bottom of the top banner. That is the "active" survey until another is selected.
To edit information, there should be an "edit" link next to every response when viewing "by person" and next to every text response when viewing "by question". This should bring up an edit-in-place form. The main reason we need to edit old responses is to fix typos in the entered data. Once the new program is working and you load all the old survey data, we will go back and fix a lot of typos.)
I'll let you know as I think of more things.