1
0
mirror of https://github.com/matt-fidd/stratos.git synced 2026-01-01 20:19:30 +00:00

Added Test.addResult

This commit is contained in:
2022-04-18 20:18:36 +00:00
parent 0e7f0534b7
commit d88a2b8fd7

View File

@@ -1,6 +1,8 @@
/* eslint-disable no-empty-function, getter-return */ /* eslint-disable no-empty-function, getter-return */
'use strict'; 'use strict';
const TestResult = require('./TestResult');
/** /**
* A class that represents the date of a test * A class that represents the date of a test
*/ */
@@ -135,6 +137,16 @@ class Test {
})); }));
} }
addResult(accountId, studentId, mark) {
return TestResult.create(
this.#conn,
this.id,
accountId,
studentId,
mark
);
}
async hasAccess(u) { async hasAccess(u) {
const userTests = await u.getTests(); const userTests = await u.getTests();
@@ -143,10 +155,6 @@ class Test {
}).length; }).length;
} }
get students() {
}
calculateAverageScore() { calculateAverageScore() {
} }