fixed connected to database problem (special case)

If username or password has the characters php in it, it will be
"ignored" which will in turn cause phing test to fail. The small
change made in this commit will fix this problem.
moved query to model for event & new sample data

= moved query for events api to events model instead of events
function in v1_controller

= added new sample data for anther simple evaluation and a
submission for it
Hide Add Course link from instructors.

Instructors don't have permission to add new courses anyway, so they
shouldn't be seeing that link.
ipeer.sql sync with ipeer_sample_data.sql

Some changes made to ipeer_sample_data.sql didn't make it into
ipeer.sql, now they should be matching.
Refactor user summary and course submenu view.

elements/courses/submenu was unnecessarily nested with
submenu_items.ctp, so I brought in the code from submenu_items.ctp and
removed it.

views/users/user_summary.ctp was using a div when it really should've
been using a header, so removed the unnecessary div and CSS class and
changed it to a h3.
Remove unused or little used css classes.

Went through the list of needing to be refactored css classes and
removed those that had little use or weren't used anymore.

There is now a 'standardtable' css class that should be used for all
tables that doesn't need to be customized.
Fix test cases to expect new simple eval data.

The expectations didn't include the new data. In the v1 controller case,
the expected data generation was wrong while the implementation was
right.
removed Debugger::log as it doesn't work in prod environment
added error template for returning error in v1 controller, changed some 501 error to 500 and using error template
disabled validate on user create in v1 so that it allows the accounts from external to be saved even their username doesn't satisfy the validation rules
reverted back with validation enabled in v1 user creation, removed first_name not empty validation and changed virtual field full_name in user model to use username when first name and last name are both empty
replaced the usage of first_name+last_name to use full_name as there will be always a value in full_name
Refactor evaltools to simplify tables/improve nav

views/evaltools/index.ctp Instead of just a huge giant table of all the
various evaluations and email templates, split the table up into
individual tables for each eval/email type that'll be easier to maintain.

The Survey and Email Templates tables actually weren't being shown due
to it using the old way of checking permissions. It might be a good idea
to permission control the other tables as well, but for now, I assume
that if you have access to the EvalTools page, you have access to
everything else as well.
SimpleEvalResult fix comments, css refactor.

This is for view_simple_evaluation_result which instructors and admins
see.

Comments release wasn't working due to broken parameter checking. The
check was removed and it seems to be working now.

Turns out that the usage of tables on this page is necessary. So the
code wasn't seriously simplified. I've removed the accordion stuff
though, as it's completely unecessary to have all that extra complexity
when scrolling down a longer page is much more intuitive and has better
cross-platform compatibility.

All the tables are using the standardtable css class so that we can cut
down on the number of custom table CSS we've currently got.
CSS: Nicer fonts, change color theme for tables.

Now imports 2 fonts from Google Web Fonts.
- Open Sans, for the headers, since it allows a font-weight of 600
- Lato, for everything else

http://www.google.com/webfonts/specimen/Open+Sans
http://www.google.com/webfonts/specimen/Lato

Open Sans is there purely because it seems to look nicer when bolded. I
originally was going to use the 2 different levels of bold available in
Open Sans to set the headers more apart from each other, but didn't
bother in the end. Open Sans also seem to retain a bit more readability
at smaller font sizes, so I'm using it for the user's name and logout
button in the banner too.

The tables were using a lot of blue, it seems that there might be too
much blue in iPeer, so I changed the colors for standardtable to orange.
But then realized that the orange was a bit too dark and makes stuff a
bit hard to read. So now, I'm using lighter yellow/brown/orange-ish
colours.

Unfortunately, because themeing the jQuery based datatables takes a bit
more effort due to the increased complexity (and some image assets), I
only did a minimal customization. Enough so that it fits in with the new
colours, but not enough so that I have to change the more complicated
assets.
Fix SimplEvalResult can't find full_name in user.

The various user variables used on the page is loaded by
GroupsMembers->getGroupMembers which simply uses a join query to get
user data. Unfortunately, since full_name is a virtual field provided by
the User model and not stored in the database, this means that
view_simple_evaluation_results.ctp doesn't get the 'full_name' field.
This is why it was concatting first_name and last_name all over the
place.

I've replaced the getGroupMembers call with a replacement that actually
uses the User model. Judging from the state of the evaluation component,
I'm guessing that there's other evaluation result pages that might
suffer from this same bug, will have to check those out later.
Login box on load set username focus, css color.

Add a small piece of javascript to set focus on the Username input box
when the page is loaded. Also changed the color to crimson instead of
orange. Since it's somewhat of a warning/error?
Group submission detail remove element, rerelease.

I can't figure out what reReleaseEvaluation is supposed to do, so I've
just removed it entirely.

Group submission detail for some reason was unnecessarily taken out into
an element, I've removed the element and moved the code into the regular
view. The code was refactored to use the standardtable style and use
html helper to generate the group members table.

Note that the problem with using the Group models to get User
information as noted before exists here too and was temporarily patched.
A better refactor is needed later.
Convert view group and student index to stdtable.

Change the table css to use the standardtable class.

Also refactored the code for view group to be simpler.
View users css table changed to standardtable.

Removed the view_user_detail element since it isn't being referenced
anywhere else but at views/users/view. The code inside was moved to the
regular users view file.