Fix Add Event not saving survey event_template_id.

Adding a Survey event ends up with the default survey template instead
of the the actual survey template the user selected. This was due to the
event_template_id save section not having a case for surveys.
Fix #454

The node structure was changed recently which caused problems with
the remove function that assumed the "answers" to be in a certain
structure. This has now been fixed using the current structure.
Merge branch 'hotfix' of github.com:ubc/iPeer into hotfix
Fix Survey result link on instructor/admin home.

It was linking to the old survey results page which I removed earlier.
Also, the special case for survey results that doesn't apply anymore,
the normal event view result page will work now.
Fix an issue with get empty group in v1 controller

When getting empty group, the userIds are empty and the User->find with
empty userIds will return a random user. Replaced implementation of
retrieving group member with the method in model
Fix TeamMaker execution on Linux & error display.

TeamMaker couldn't be executed because it didn't have the execute flag,
chmod +x fixed it.

TeamMaker was just failing silently without informing the user. As a
quick fix, this commit checks the TeamMaker return status, and if it
isn't successful, it'll at least tell the user that TeamMaker execution
was at fault.
Fix a teammaker xml issue when student survey response id is NULL

Teammaker doesn't like empty responses. In the xml file, the response
must have a value sub node. Otherwsie, teammaker will throw an exception
Fix a typo in last commit
Fix couldn't add question in survey in IE and Firefox

IE and Firefox don't allow a tag in button tag. Have to use onclick
instead
Update guard to ignore the non-existing field mapping
Update guard for a fix in cwl module
Convert from inline style to css in group import.

Minor cosmetic change, also helps that highlight copy & paste of the
example CSS doesn't give you extra lines.
Fix point dist on editing a simple evaluation.

When a student edit one of their previously submitted simple evaluation,
the point distribution calculated by javascript ("Points
Allocated/Total") doesn't get initialized properly. The 'Submit
Evaluation' button also isn't available.

Don't know why the javascript on this page is all done in php echos and
don't know why it's at the top of the page instead of at the button.
These should rectified later, but for now, to limit the scope of my
changes, I've just moved the initial javascript update call to the
bottom of the file.
Fix user/event API not getting survey events
Change user/events API to use method in model

Also refactor user/events to show the pending events instead of all
events
Fix #458

=added another remove function for the multiple answers. The reason
is the structure between newly added answers and answers previously
saved is different so the remove function has to be slightly
different. The major difference is previously saved answers
have an extra hidden input.
Fix getEventsByUserId for same student in multi groups

getEventsByUserId now handles the same student in multiple groups for
the same event. It retrieves multiple events for the students.
Remove result release date from event form for surveys

Surveys don't need result release date. So remove them from the form and
disabled validation when add/edit
Fix penalty display when only 1 penalty present.

Penalties aren't shown when there's only 1 day of penalty set.
Student home, rename result date start/end column

Since students can now edit their evaluations, the event link can be
active even when results aren't available, so calling the result release
date column "Viewable Start/End" doesn't make much sense anymore.