mirror of
https://github.com/matt-fidd/stratos.git
synced 2026-01-01 16:19:26 +00:00
Parents should be notified about test results
This commit is contained in:
@@ -173,8 +173,11 @@ class Test {
|
|||||||
mark
|
mark
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const parents = await tr.student.getParents();
|
||||||
|
|
||||||
const email = new EmailBuilder()
|
const email = new EmailBuilder()
|
||||||
.addTo([ tr.student.getEmail() ])
|
.addTo([ tr.student, ...parents ]
|
||||||
|
.map(u => u.getEmail()))
|
||||||
.setSubject('Stratos - Test result added')
|
.setSubject('Stratos - Test result added')
|
||||||
.setBody(
|
.setBody(
|
||||||
'Your result has been added for ' +
|
'Your result has been added for ' +
|
||||||
|
|||||||
@@ -114,8 +114,11 @@ class TestResult {
|
|||||||
`(${this.percentage}%) which is a grade ` +
|
`(${this.percentage}%) which is a grade ` +
|
||||||
`${this.grade}`;
|
`${this.grade}`;
|
||||||
|
|
||||||
|
const parents = await this.student.getParents();
|
||||||
|
|
||||||
const email = new EmailBuilder()
|
const email = new EmailBuilder()
|
||||||
.addTo([ this.student.getEmail() ])
|
.addTo([ this.student, ...parents ]
|
||||||
|
.map(u => u.getEmail()))
|
||||||
.setSubject('Stratos - Test result changed')
|
.setSubject('Stratos - Test result changed')
|
||||||
.setBody(body);
|
.setBody(body);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user