Fix flaky CSV test

The test compares the raw CSV string directly, but the actual order of
the objects returned from the database is unspecified and sometimes gives
a test failure:

MarksGradersControllerTest#test_: An authenticated admin should download
a csv on GET :
download_grader_students_mapping.
[/home/su/code/Markus/test/functional/marks_graders_
controller_test.rb:114]:
<"machinist_student1,machinist_ta1,machinist_ta2\nmachinist_student2\nmachinist_student
3\nmachinist_student4\nmachinist_student5\n"> expected but was
<"machinist_student3\nmachinist_student1,machinist_ta1,machinist_ta2\nmachinist_student
2\nmachinist_student4\nmachinist_student5\n">.

This can be fixed by comparing the set of rows.
Merge pull request #1566 from zhangsu/fix_csv_flakyness

Fix: flaky CSV test.

The test compares the raw CSV string directly, but the actual order of
the objects returned from the database is unspecified and sometimes gives
a test failure
Fix "(invalid)" markup in summary view

The markup of "(invalid)" is rendered as plain text due to the fact that
they are produced in a ERB tag without the use of `String#html_safe` or
the `raw` method.
Merge pull request #1570 from zhangsu/summary_group_invalid_span

Fix "(invalid)" markup in summary view