mirror of
https://github.com/matt-fidd/stratos.git
synced 2026-01-01 22:19:26 +00:00
Added Test.addResult
This commit is contained in:
16
lib/Test.js
16
lib/Test.js
@@ -1,6 +1,8 @@
|
||||
/* eslint-disable no-empty-function, getter-return */
|
||||
'use strict';
|
||||
|
||||
const TestResult = require('./TestResult');
|
||||
|
||||
/**
|
||||
* 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) {
|
||||
const userTests = await u.getTests();
|
||||
|
||||
@@ -143,10 +155,6 @@ class Test {
|
||||
}).length;
|
||||
}
|
||||
|
||||
get students() {
|
||||
|
||||
}
|
||||
|
||||
calculateAverageScore() {
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user