[O] Separate rating criteria

This commit is contained in:
Hykilpikonna
2020-04-27 18:13:56 -04:00
parent 9665b3a793
commit 13167fe050
2 changed files with 13 additions and 8 deletions
+10
View File
@@ -152,3 +152,13 @@ export class AnalyzedRating
this.overallRating /= this.ratingAverages.length;
}
}
export const RATING_CRITERIA: {title: string, desc: string}[] =
[
{title: 'Enjoyable', desc: 'How enjoyable is the course?'},
{title: 'Knowledge', desc: 'How interesting is the content of the course? ' +
'Is it something you feel worth learning?'},
{title: 'Interactivity', desc: 'How interesting is the teacher? Is the teacher interactive?'},
{title: 'Eloquence', desc: `Are the teacher's lectures easy to understand?`},
{title: 'Fairness', desc: `How fair is the teacher's grading? Is credit given in proportion to effort?`}
];
@@ -85,6 +85,7 @@
import App from '@/components/app/app';
import {GPAUtils} from '@/logic/utils/gpa-utils';
import Constants from '@/constants';
import {RATING_CRITERIA} from '@/logic/course-info';
@Component
export default class CourseHead extends Vue
@@ -95,14 +96,6 @@
ratingDialog = false;
ratingPosting = false;
ratingCriteria = [
{title: 'Enjoyable', desc: 'How enjoyable is the course?'},
{title: 'Knowledge', desc: 'How interesting is the content of the course? ' +
'Is it something you feel worth learning?'},
{title: 'Interactivity', desc: 'How interesting is the teacher? Is the teacher interactive?'},
{title: 'Eloquence', desc: `Are the teacher's lectures easy to understand?`},
{title: 'Fairness', desc: `How fair is the teacher's grading? Is credit given in proportion to effort?`}
];
rating = this.course.rating;
/**
@@ -122,6 +115,8 @@
return this.clickable && App.instance.showRating;
}
get ratingCriteria() {return RATING_CRITERIA}
/**
* Change star rating data
*