Redesigned the Record page along with solving some bugs on the FillBlanks
This commit is contained in:
@@ -12,3 +12,7 @@ export const moduleLabels: {[key in Module]: string} = {
|
||||
export const sortByModule = (a: {module: Module}, b: {module: Module}) => {
|
||||
return MODULE_ARRAY.findIndex((x) => a.module === x) - MODULE_ARRAY.findIndex((x) => b.module === x);
|
||||
};
|
||||
|
||||
export const sortByModuleName = (a: string, b: string) => {
|
||||
return MODULE_ARRAY.findIndex((x) => a === x) - MODULE_ARRAY.findIndex((x) => b === x);
|
||||
};
|
||||
|
||||
@@ -2,6 +2,32 @@ import {Module} from "@/interfaces";
|
||||
|
||||
type Type = "academic" | "general";
|
||||
|
||||
export const writingReverseMarking: {[key: number]: number} = {
|
||||
9: 90,
|
||||
8: 80,
|
||||
7: 70,
|
||||
6: 60,
|
||||
5: 50,
|
||||
4: 40,
|
||||
3: 30,
|
||||
2: 20,
|
||||
1: 10,
|
||||
0: 0,
|
||||
};
|
||||
|
||||
const writingMarking: {[key: number]: number} = {
|
||||
90: 9,
|
||||
80: 8,
|
||||
70: 7,
|
||||
60: 6,
|
||||
50: 5,
|
||||
40: 4,
|
||||
30: 3,
|
||||
20: 2,
|
||||
10: 1,
|
||||
0: 0,
|
||||
};
|
||||
|
||||
const readingGeneralMarking: {[key: number]: number} = {
|
||||
100: 9,
|
||||
97.5: 8.5,
|
||||
@@ -46,8 +72,8 @@ const moduleMarkings: {[key in Module]: {[key in Type]: {[key: number]: number}}
|
||||
general: academicMarking,
|
||||
},
|
||||
writing: {
|
||||
academic: academicMarking,
|
||||
general: readingGeneralMarking,
|
||||
academic: writingMarking,
|
||||
general: writingMarking,
|
||||
},
|
||||
speaking: {
|
||||
academic: academicMarking,
|
||||
|
||||
Reference in New Issue
Block a user