diff --git a/lib/Test.js b/lib/Test.js index e81d0e1..a7c231a 100644 --- a/lib/Test.js +++ b/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() { }