- Implemented an image attachment to the Writing exercise;
- Made it so the exams are now sorted when going through the history; - Corrected some little mistakes;
This commit is contained in:
@@ -1,8 +1,14 @@
|
||||
import {Module} from "@/interfaces";
|
||||
|
||||
const MODULE_ARRAY: Module[] = ["reading", "listening", "writing", "speaking"];
|
||||
|
||||
export const moduleLabels: {[key in Module]: string} = {
|
||||
listening: "Listening",
|
||||
reading: "Reading",
|
||||
speaking: "Speaking",
|
||||
writing: "Writing",
|
||||
};
|
||||
|
||||
export const sortByModule = (a: {module: Module}, b: {module: Module}) => {
|
||||
return MODULE_ARRAY.findIndex((x) => a.module === x) - MODULE_ARRAY.findIndex((x) => b.module === x);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user