fsr-itse/EvaP — pull request #349 by janno42 (2014-06-22 21:16:03+00:00)
Title: LikertAnswer/GradeAnswer

This is a solution for #348.

This Pull Request renames the existing ```GradeAnswer``` to ```LikertAnswer``` and introduces a new ```GradeAnswer``` with different behavior:

```GradeAnswers``` are (integer) grades from ```1``` to ```5``` or ```no answer``` (represented as ```6```).
The total grade for a course is now calculated as follows:

total_likert = CP * likert_answers_about_contributors + (1-CP) * likert_answers_about_courses
total_grade = CP * grade_answers_about_contributors + (1-CP) * grade_answers_about_courses
total = GP * total_grade + (1-GP) * total_likert

```GRADE_PERCENTAGE``` (GP) is initially set as ```0.8``` and ```CONTRIBUTION_PERCENTAGE``` (CP) is set as ```0.5```.
That means the total value for the Likert answers is calculated by 50% of the answers about contributors and by 50% of the answers about the course.
The total value for grade answers is calculated in the same way.
The total grade of the course is then determined by 80% of the grade answers' total value and by 20% of the Likert answers' total value.

To successfully work this Pull Request is doing the following migrations:
- creating a new table for Likert answers
- redefining all existing grade questions as Likert questions
- moving all existing grade answers into the Likert answers table

Note:
- Pre-existing courses don't have grade answers, so their results will stay the same.
- The grade answer can now be used to allow voters to have a stronger direct influence on the outcome of the total grade.