mirror of
https://github.com/matt-fidd/stratos.git
synced 2026-01-01 20:39:28 +00:00
Added writeup diagram files and scripts to generate to images
This commit is contained in:
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
static/assets/diagrams/
|
||||||
13
utility/uml/generate_diagrams.ksh
Executable file
13
utility/uml/generate_diagrams.ksh
Executable file
@@ -0,0 +1,13 @@
|
|||||||
|
#!/bin/ksh
|
||||||
|
|
||||||
|
targetdir="$(pwd)/static/assets/diagrams"
|
||||||
|
|
||||||
|
rm -rf "$targetdir/*"
|
||||||
|
cp $(pwd)/writeup/diagrams/*.png $targetdir
|
||||||
|
|
||||||
|
for diag in $(find . -path "node_modules" -prune -o -name "*.puml" -print); do
|
||||||
|
ofilename="$(basename $diag .puml).png"
|
||||||
|
|
||||||
|
java -jar "utility/uml/plantuml-1.2021.13.jar" $diag -o $targetdir
|
||||||
|
echo "Compiled $diag to $targetdir/$ofilename"
|
||||||
|
done
|
||||||
BIN
utility/uml/plantuml-1.2021.13.jar
Normal file
BIN
utility/uml/plantuml-1.2021.13.jar
Normal file
Binary file not shown.
2
writeup/diagrams/.gitignore
vendored
Normal file
2
writeup/diagrams/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
*.png
|
||||||
|
!stratosSchema.png
|
||||||
132
writeup/diagrams/classDiagram.puml
Normal file
132
writeup/diagrams/classDiagram.puml
Normal file
@@ -0,0 +1,132 @@
|
|||||||
|
@startuml
|
||||||
|
skinparam classAttributeIconSize 0
|
||||||
|
|
||||||
|
User <|-- Account
|
||||||
|
User <|-- Student
|
||||||
|
User <|-- Parent
|
||||||
|
|
||||||
|
User -- PasswordReset
|
||||||
|
|
||||||
|
Student -- Parent
|
||||||
|
Student -- Test
|
||||||
|
Student -- Class
|
||||||
|
|
||||||
|
Account -- Class
|
||||||
|
Account -- TestTemplate
|
||||||
|
|
||||||
|
Class -- Subject
|
||||||
|
Class -- Test
|
||||||
|
|
||||||
|
TestTemplate -- Test
|
||||||
|
TestTemplate -- Class
|
||||||
|
|
||||||
|
Test -- TestResult
|
||||||
|
|
||||||
|
TestResult -- Student
|
||||||
|
|
||||||
|
class User {
|
||||||
|
id: string
|
||||||
|
firstName: string
|
||||||
|
otherNames: string
|
||||||
|
lastName: string
|
||||||
|
email: string
|
||||||
|
password: string
|
||||||
|
type: string
|
||||||
|
getfullName(): string
|
||||||
|
verifyPassword(hash): boolean
|
||||||
|
changePassword(password): void
|
||||||
|
getPasswordReset(): PasswordReset
|
||||||
|
generatePasswordReset(): PasswordReset
|
||||||
|
{static} hashPassword(password): string
|
||||||
|
{static} createUser(...): Account|Student|Parent
|
||||||
|
{static} getUserByEmail(...): Account|Student|Parent
|
||||||
|
}
|
||||||
|
|
||||||
|
class Account {
|
||||||
|
getClasses(): Class[]
|
||||||
|
getTests(): TestTemplate[]
|
||||||
|
createTestTemplate(...): TestTemplate
|
||||||
|
createClass(...): Class
|
||||||
|
}
|
||||||
|
|
||||||
|
class Student {
|
||||||
|
getClasses(): Class[]
|
||||||
|
getTests(): Test[]
|
||||||
|
getParents(): Parent[]
|
||||||
|
}
|
||||||
|
|
||||||
|
class Parent {
|
||||||
|
getChildren(): Student[]
|
||||||
|
}
|
||||||
|
|
||||||
|
class PasswordReset {
|
||||||
|
userId: string
|
||||||
|
token: string
|
||||||
|
nonce: string
|
||||||
|
expires: Date
|
||||||
|
getUser(): User
|
||||||
|
{static} hashToken(): {string, string}
|
||||||
|
{static} generatePasswordReset(): PasswordReset
|
||||||
|
}
|
||||||
|
|
||||||
|
class Subject {
|
||||||
|
subjectId: int
|
||||||
|
name: string
|
||||||
|
}
|
||||||
|
|
||||||
|
class Class {
|
||||||
|
classId: string
|
||||||
|
subjectId: int
|
||||||
|
name: string
|
||||||
|
getSubject(): Subject
|
||||||
|
getTests(): Test[]
|
||||||
|
getTeachers(): Account[]
|
||||||
|
getTeacher(): Teacher
|
||||||
|
getStudents(): Student[]
|
||||||
|
getStudent(): Student
|
||||||
|
addTeacher(): void
|
||||||
|
removeTeacher(): void
|
||||||
|
addStudent(): void
|
||||||
|
removeStudent(): void
|
||||||
|
isAuthorised(User): boolean
|
||||||
|
calculateAverageMovement(): int
|
||||||
|
{static} createClass(): Class
|
||||||
|
}
|
||||||
|
|
||||||
|
class TestTemplate {
|
||||||
|
testTemplateId: string
|
||||||
|
accountId: string
|
||||||
|
name: string
|
||||||
|
maxMark: int
|
||||||
|
assignClass(): Test
|
||||||
|
getClasses(): Class[]
|
||||||
|
isAuthorised(User): boolean
|
||||||
|
{static} createTestTemplate(): TestTemplate
|
||||||
|
}
|
||||||
|
|
||||||
|
class Test {
|
||||||
|
testId: string
|
||||||
|
testTemplateId: string
|
||||||
|
classId: string
|
||||||
|
testDate: Date
|
||||||
|
getClass(): Class
|
||||||
|
getStudent(): TestResult
|
||||||
|
getStudents(): TestResult[]
|
||||||
|
getTestTemplate(): TestTemplate
|
||||||
|
calculateAverageScore(): int
|
||||||
|
calculateGradeBoundaries(): Object
|
||||||
|
}
|
||||||
|
|
||||||
|
class TestResult {
|
||||||
|
studentId: string
|
||||||
|
accountId: string
|
||||||
|
testId: string
|
||||||
|
setMark(): void
|
||||||
|
getMark(): int
|
||||||
|
getPercentage(): int
|
||||||
|
getGrade(): string
|
||||||
|
getStudent(): Student
|
||||||
|
getTest(): Test
|
||||||
|
}
|
||||||
|
|
||||||
|
@enduml
|
||||||
314
writeup/diagrams/stratos.dbs
Executable file
314
writeup/diagrams/stratos.dbs
Executable file
@@ -0,0 +1,314 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<project name="Stratos new_mysql_create.sql" id="Project-199e" database="MySql" >
|
||||||
|
<schema name="public" >
|
||||||
|
<table name="account" spec="" >
|
||||||
|
<column name="accountId" type="varchar" length="36" jt="12" mandatory="y" />
|
||||||
|
<column name="email" type="varchar" length="255" jt="12" mandatory="y" />
|
||||||
|
<column name="firstName" type="varchar" length="50" jt="12" mandatory="y" />
|
||||||
|
<column name="otherNames" type="varchar" length="255" jt="12" mandatory="y" />
|
||||||
|
<column name="lastName" type="varchar" length="50" jt="12" mandatory="y" />
|
||||||
|
<column name="password" type="varchar" length="60" jt="12" mandatory="y" />
|
||||||
|
<index name="Unq_account_email" unique="UNIQUE_KEY" >
|
||||||
|
<column name="email" />
|
||||||
|
</index>
|
||||||
|
<index name="primarykey" unique="PRIMARY_KEY" >
|
||||||
|
<column name="accountId" />
|
||||||
|
</index>
|
||||||
|
</table>
|
||||||
|
<table name="accountClassLink" spec="" >
|
||||||
|
<column name="accountId" type="varchar" length="36" jt="12" mandatory="y" />
|
||||||
|
<column name="classId" type="varchar" length="36" jt="12" mandatory="y" />
|
||||||
|
<index name="primarykey" unique="PRIMARY_KEY" >
|
||||||
|
<column name="accountId" />
|
||||||
|
<column name="classId" />
|
||||||
|
</index>
|
||||||
|
<fk name="accountClassLink_fk0" to_schema="public" to_table="account" delete_action="cascade" >
|
||||||
|
<fk_column name="accountId" pk="accountId" />
|
||||||
|
</fk>
|
||||||
|
<fk name="accountClassLink_fk1" to_schema="public" to_table="class" delete_action="cascade" >
|
||||||
|
<fk_column name="classId" pk="classId" />
|
||||||
|
</fk>
|
||||||
|
</table>
|
||||||
|
<table name="class" spec="" >
|
||||||
|
<column name="classId" type="varchar" length="36" jt="12" mandatory="y" />
|
||||||
|
<column name="name" type="varchar" length="50" jt="12" mandatory="y" />
|
||||||
|
<column name="subjectId" type="int" jt="4" mandatory="y" />
|
||||||
|
<index name="primarykey" unique="PRIMARY_KEY" >
|
||||||
|
<column name="classId" />
|
||||||
|
</index>
|
||||||
|
<fk name="class_fk0" to_schema="public" to_table="subject" >
|
||||||
|
<fk_column name="subjectId" pk="subjectId" />
|
||||||
|
</fk>
|
||||||
|
</table>
|
||||||
|
<table name="parent" spec="" >
|
||||||
|
<column name="parentId" prior="parentid" type="varchar" length="36" jt="12" mandatory="y" />
|
||||||
|
<column name="email" type="varchar" length="255" jt="12" mandatory="y" />
|
||||||
|
<column name="firstName" type="varchar" length="50" jt="12" mandatory="y" />
|
||||||
|
<column name="otherNames" type="varchar" length="50" jt="12" mandatory="y" />
|
||||||
|
<column name="lastName" type="varchar" length="50" jt="12" mandatory="y" />
|
||||||
|
<column name="password" type="varchar" length="60" jt="12" mandatory="y" />
|
||||||
|
<index name="primarykey" unique="PRIMARY_KEY" >
|
||||||
|
<column name="parentId" />
|
||||||
|
</index>
|
||||||
|
<index name="Unq_parent" unique="UNIQUE_KEY" >
|
||||||
|
<column name="email" />
|
||||||
|
</index>
|
||||||
|
</table>
|
||||||
|
<table name="passwordReset" spec="" >
|
||||||
|
<column name="accountId" type="varchar" length="36" jt="12" mandatory="y" />
|
||||||
|
<column name="token" type="varchar" length="60" jt="12" mandatory="y" />
|
||||||
|
<column name="nonce" type="varchar" length="16" jt="12" mandatory="y" />
|
||||||
|
<column name="expires" type="datetime" jt="93" mandatory="y" />
|
||||||
|
<index name="primarykey" unique="PRIMARY_KEY" >
|
||||||
|
<column name="accountId" />
|
||||||
|
</index>
|
||||||
|
<fk name="fk_passwordreset_account" to_schema="public" to_table="account" delete_action="cascade" >
|
||||||
|
<fk_column name="accountId" pk="accountId" />
|
||||||
|
</fk>
|
||||||
|
<fk name="fk_passwordreset_parent" to_schema="public" to_table="parent" delete_action="cascade" >
|
||||||
|
<fk_column name="accountId" pk="parentId" />
|
||||||
|
</fk>
|
||||||
|
<fk name="fk_passwordreset_student" to_schema="public" to_table="student" delete_action="cascade" >
|
||||||
|
<fk_column name="accountId" pk="studentId" />
|
||||||
|
</fk>
|
||||||
|
</table>
|
||||||
|
<table name="student" spec="" >
|
||||||
|
<column name="studentId" prior="studentid" type="varchar" length="36" jt="12" mandatory="y" />
|
||||||
|
<column name="email" type="varchar" length="255" jt="12" mandatory="y" />
|
||||||
|
<column name="firstName" type="varchar" length="50" jt="12" mandatory="y" />
|
||||||
|
<column name="otherNames" type="varchar" length="50" jt="12" mandatory="y" />
|
||||||
|
<column name="lastName" type="varchar" length="50" jt="12" mandatory="y" />
|
||||||
|
<column name="password" type="varchar" length="60" jt="12" mandatory="y" />
|
||||||
|
<index name="primarykey" unique="PRIMARY_KEY" >
|
||||||
|
<column name="studentId" />
|
||||||
|
</index>
|
||||||
|
<index name="Unq_student" unique="UNIQUE_KEY" >
|
||||||
|
<column name="email" />
|
||||||
|
</index>
|
||||||
|
</table>
|
||||||
|
<table name="studentClassLink" prior="Tbl" >
|
||||||
|
<column name="studentId" type="varchar" length="36" jt="12" mandatory="y" />
|
||||||
|
<column name="classId" type="varchar" length="36" jt="12" mandatory="y" />
|
||||||
|
<index name="Pk_studentClassLink_studentId" unique="PRIMARY_KEY" >
|
||||||
|
<column name="studentId" />
|
||||||
|
<column name="classId" />
|
||||||
|
</index>
|
||||||
|
<fk name="fk_studentclasslink_student" to_schema="public" to_table="student" delete_action="cascade" >
|
||||||
|
<fk_column name="studentId" pk="studentId" />
|
||||||
|
</fk>
|
||||||
|
<fk name="fk_studentclasslink_class" to_schema="public" to_table="class" delete_action="cascade" >
|
||||||
|
<fk_column name="classId" pk="classId" />
|
||||||
|
</fk>
|
||||||
|
<options><![CDATA[engine=InnoDB]]></options>
|
||||||
|
</table>
|
||||||
|
<table name="studentParentLink" spec="" >
|
||||||
|
<column name="studentid" prior="studentId" type="varchar" length="36" jt="12" mandatory="y" />
|
||||||
|
<column name="parentId" type="varchar" length="36" jt="12" mandatory="y" />
|
||||||
|
<index name="pk_studentparentlink_studentid" unique="PRIMARY_KEY" >
|
||||||
|
<column name="studentid" />
|
||||||
|
<column name="parentId" />
|
||||||
|
</index>
|
||||||
|
<fk name="studentParentLink_fk0" to_schema="public" to_table="student" delete_action="cascade" >
|
||||||
|
<fk_column name="studentid" pk="studentId" />
|
||||||
|
</fk>
|
||||||
|
<fk name="studentParentLink_fk1" to_schema="public" to_table="parent" delete_action="cascade" >
|
||||||
|
<fk_column name="parentId" pk="parentId" />
|
||||||
|
</fk>
|
||||||
|
</table>
|
||||||
|
<table name="subject" spec="" >
|
||||||
|
<column name="subjectId" type="int" jt="4" mandatory="y" >
|
||||||
|
<identity><![CDATA[AUTO_INCREMENT]]></identity>
|
||||||
|
</column>
|
||||||
|
<column name="name" type="varchar" length="100" jt="12" mandatory="y" />
|
||||||
|
<index name="primarykey" unique="PRIMARY_KEY" >
|
||||||
|
<column name="subjectId" />
|
||||||
|
</index>
|
||||||
|
</table>
|
||||||
|
<table name="test" prior="classTestLink" spec="" >
|
||||||
|
<column name="testId" type="varchar" length="36" jt="12" mandatory="y" />
|
||||||
|
<column name="testTemplateId" type="varchar" length="36" jt="12" mandatory="y" />
|
||||||
|
<column name="classId" type="varchar" length="36" jt="12" mandatory="y" />
|
||||||
|
<column name="testDate" type="date" jt="91" mandatory="y" />
|
||||||
|
<index name="Pk_test_testId" unique="PRIMARY_KEY" >
|
||||||
|
<column name="testId" />
|
||||||
|
</index>
|
||||||
|
<index name="Unq_test" unique="UNIQUE_KEY" >
|
||||||
|
<column name="testTemplateId" />
|
||||||
|
<column name="classId" />
|
||||||
|
<column name="testDate" />
|
||||||
|
</index>
|
||||||
|
<fk name="fk_test_account" to_schema="public" to_table="class" >
|
||||||
|
<fk_column name="classId" pk="classId" />
|
||||||
|
</fk>
|
||||||
|
<fk name="fk_test_testtemplate" to_schema="public" to_table="testTemplate" >
|
||||||
|
<fk_column name="testTemplateId" pk="testTemplateId" />
|
||||||
|
</fk>
|
||||||
|
</table>
|
||||||
|
<table name="testResult" spec="" >
|
||||||
|
<column name="studentId" type="varchar" length="36" jt="12" mandatory="y" />
|
||||||
|
<column name="testId" type="varchar" length="36" jt="12" mandatory="y" />
|
||||||
|
<column name="accountId" type="varchar" length="36" jt="12" mandatory="y" />
|
||||||
|
<column name="mark" type="int" jt="4" mandatory="y" />
|
||||||
|
<index name="primarykey" unique="PRIMARY_KEY" >
|
||||||
|
<column name="studentId" />
|
||||||
|
<column name="testId" />
|
||||||
|
</index>
|
||||||
|
<fk name="testResult_fk0" to_schema="public" to_table="student" delete_action="cascade" >
|
||||||
|
<fk_column name="studentId" pk="studentId" />
|
||||||
|
</fk>
|
||||||
|
<fk name="fk_testresult_test" to_schema="public" to_table="test" >
|
||||||
|
<fk_column name="testId" pk="testId" />
|
||||||
|
</fk>
|
||||||
|
<fk name="fk_testresult_account" to_schema="public" to_table="account" >
|
||||||
|
<fk_column name="accountId" pk="accountId" />
|
||||||
|
</fk>
|
||||||
|
</table>
|
||||||
|
<table name="testTemplate" prior="test" spec="" >
|
||||||
|
<column name="testTemplateId" prior="testId" type="varchar" length="36" jt="12" mandatory="y" />
|
||||||
|
<column name="accountId" type="varchar" length="36" jt="12" mandatory="y" />
|
||||||
|
<column name="name" type="varchar" length="100" jt="12" mandatory="y" />
|
||||||
|
<column name="maxMark" type="int" jt="4" mandatory="y" />
|
||||||
|
<index name="primarykey" unique="PRIMARY_KEY" >
|
||||||
|
<column name="testTemplateId" />
|
||||||
|
</index>
|
||||||
|
<fk name="test_fk0" to_schema="public" to_table="account" delete_action="setNull" >
|
||||||
|
<fk_column name="accountId" pk="accountId" />
|
||||||
|
</fk>
|
||||||
|
</table>
|
||||||
|
</schema>
|
||||||
|
<layout name="main" id="Layout-dd6" show_column_type="y" show_relation="columns" >
|
||||||
|
<entity schema="public" name="account" color="C7F4BE" x="832" y="368" />
|
||||||
|
<entity schema="public" name="accountClassLink" color="C7F4BE" x="784" y="192" />
|
||||||
|
<entity schema="public" name="class" color="3986C1" x="544" y="48" />
|
||||||
|
<entity schema="public" name="parent" color="BED3F4" x="416" y="368" />
|
||||||
|
<entity schema="public" name="passwordReset" color="3986C1" x="688" y="576" />
|
||||||
|
<entity schema="public" name="student" color="BED3F4" x="624" y="368" />
|
||||||
|
<entity schema="public" name="studentClassLink" color="C1D8EE" x="576" y="208" />
|
||||||
|
<entity schema="public" name="studentParentLink" color="BED3F4" x="448" y="624" />
|
||||||
|
<entity schema="public" name="subject" color="C7F4BE" x="288" y="80" />
|
||||||
|
<entity schema="public" name="test" color="C7F4BE" x="352" y="176" />
|
||||||
|
<entity schema="public" name="testResult" color="BED3F4" x="176" y="416" />
|
||||||
|
<entity schema="public" name="testTemplate" color="C7F4BE" x="48" y="208" />
|
||||||
|
<script name="SQL_Editor" id="Editor-12ab" language="SQL" >
|
||||||
|
<string><![CDATA[CREATE SCHEMA public;
|
||||||
|
|
||||||
|
CREATE TABLE public.account (
|
||||||
|
accountId varchar(36) NOT NULL PRIMARY KEY,
|
||||||
|
email varchar(255) NOT NULL ,
|
||||||
|
firstName varchar(50) NOT NULL ,
|
||||||
|
otherNames varchar(255) NOT NULL ,
|
||||||
|
lastName varchar(50) NOT NULL ,
|
||||||
|
password varchar(60) NOT NULL ,
|
||||||
|
CONSTRAINT Unq_account_email UNIQUE ( email )
|
||||||
|
);
|
||||||
|
|
||||||
|
CREATE TABLE public.parent (
|
||||||
|
parentId varchar(36) NOT NULL PRIMARY KEY,
|
||||||
|
email varchar(255) NOT NULL ,
|
||||||
|
firstName varchar(50) NOT NULL ,
|
||||||
|
otherNames varchar(50) NOT NULL ,
|
||||||
|
lastName varchar(50) NOT NULL ,
|
||||||
|
password varchar(60) NOT NULL
|
||||||
|
);
|
||||||
|
|
||||||
|
CREATE TABLE public.student (
|
||||||
|
studentId varchar(36) NOT NULL PRIMARY KEY,
|
||||||
|
email varchar(255) NOT NULL ,
|
||||||
|
firstName varchar(50) NOT NULL ,
|
||||||
|
otherNames varchar(50) NOT NULL ,
|
||||||
|
lastName varchar(50) NOT NULL ,
|
||||||
|
password varchar(60) NOT NULL
|
||||||
|
);
|
||||||
|
|
||||||
|
CREATE TABLE public.studentParentLink (
|
||||||
|
studentid varchar(36) NOT NULL ,
|
||||||
|
parentId varchar(36) NOT NULL ,
|
||||||
|
CONSTRAINT pk_studentparentlink_studentid PRIMARY KEY ( studentid, parentId )
|
||||||
|
);
|
||||||
|
|
||||||
|
CREATE TABLE public.subject (
|
||||||
|
subjectId int NOT NULL AUTO_INCREMENT PRIMARY KEY,
|
||||||
|
name varchar(100) NOT NULL
|
||||||
|
);
|
||||||
|
|
||||||
|
CREATE TABLE public.test (
|
||||||
|
testId varchar(36) NOT NULL PRIMARY KEY,
|
||||||
|
accountId varchar(36) NOT NULL ,
|
||||||
|
name varchar(100) NOT NULL ,
|
||||||
|
maxMark int NOT NULL
|
||||||
|
);
|
||||||
|
|
||||||
|
CREATE TABLE public.testResult (
|
||||||
|
studentId varchar(36) NOT NULL ,
|
||||||
|
testId varchar(36) NOT NULL ,
|
||||||
|
mark int NOT NULL ,
|
||||||
|
percentage int NOT NULL ,
|
||||||
|
CONSTRAINT primarykey PRIMARY KEY ( studentId, testId )
|
||||||
|
);
|
||||||
|
|
||||||
|
CREATE TABLE public.class (
|
||||||
|
classId varchar(36) NOT NULL PRIMARY KEY,
|
||||||
|
name varchar(50) NOT NULL ,
|
||||||
|
subjectId int NOT NULL ,
|
||||||
|
invitationCode varchar(9) NOT NULL
|
||||||
|
);
|
||||||
|
|
||||||
|
CREATE TABLE public.classTestLink (
|
||||||
|
classId varchar(36) NOT NULL ,
|
||||||
|
testId varchar(36) NOT NULL ,
|
||||||
|
`date` date NOT NULL ,
|
||||||
|
CONSTRAINT primarykey PRIMARY KEY ( classId, testId, `date` )
|
||||||
|
);
|
||||||
|
|
||||||
|
CREATE TABLE public.passwordReset (
|
||||||
|
accountId varchar(36) NOT NULL PRIMARY KEY,
|
||||||
|
token varchar(60) NOT NULL ,
|
||||||
|
nonce varchar(16) NOT NULL ,
|
||||||
|
expires datetime NOT NULL
|
||||||
|
);
|
||||||
|
|
||||||
|
CREATE TABLE public.studentClassLink (
|
||||||
|
studentId varchar(36) NOT NULL ,
|
||||||
|
classId varchar(36) NOT NULL ,
|
||||||
|
CONSTRAINT Pk_studentClassLink_studentId PRIMARY KEY ( studentId, classId )
|
||||||
|
) engine=InnoDB;
|
||||||
|
|
||||||
|
CREATE TABLE public.accountClassLink (
|
||||||
|
accountId varchar(36) NOT NULL ,
|
||||||
|
classId varchar(36) NOT NULL ,
|
||||||
|
CONSTRAINT primarykey PRIMARY KEY ( accountId, classId )
|
||||||
|
);
|
||||||
|
|
||||||
|
ALTER TABLE public.accountClassLink ADD CONSTRAINT accountClassLink_fk0 FOREIGN KEY ( accountId ) REFERENCES public.account( accountId ) ON DELETE NO ACTION ON UPDATE NO ACTION;
|
||||||
|
|
||||||
|
ALTER TABLE public.accountClassLink ADD CONSTRAINT accountClassLink_fk1 FOREIGN KEY ( classId ) REFERENCES public.class( classId ) ON DELETE NO ACTION ON UPDATE NO ACTION;
|
||||||
|
|
||||||
|
ALTER TABLE public.class ADD CONSTRAINT class_fk0 FOREIGN KEY ( subjectId ) REFERENCES public.subject( subjectId ) ON DELETE NO ACTION ON UPDATE NO ACTION;
|
||||||
|
|
||||||
|
ALTER TABLE public.classTestLink ADD CONSTRAINT classTestLink_fk0 FOREIGN KEY ( classId ) REFERENCES public.class( classId ) ON DELETE NO ACTION ON UPDATE NO ACTION;
|
||||||
|
|
||||||
|
ALTER TABLE public.classTestLink ADD CONSTRAINT classTestLink_fk1 FOREIGN KEY ( testId ) REFERENCES public.test( testId ) ON DELETE NO ACTION ON UPDATE NO ACTION;
|
||||||
|
|
||||||
|
ALTER TABLE public.passwordReset ADD CONSTRAINT fk_passwordreset_account FOREIGN KEY ( accountId ) REFERENCES public.account( accountId ) ON DELETE NO ACTION ON UPDATE NO ACTION;
|
||||||
|
|
||||||
|
ALTER TABLE public.passwordReset ADD CONSTRAINT fk_passwordreset_parent FOREIGN KEY ( accountId ) REFERENCES public.parent( parentId ) ON DELETE NO ACTION ON UPDATE NO ACTION;
|
||||||
|
|
||||||
|
ALTER TABLE public.passwordReset ADD CONSTRAINT fk_passwordreset_student FOREIGN KEY ( accountId ) REFERENCES public.student( studentId ) ON DELETE NO ACTION ON UPDATE NO ACTION;
|
||||||
|
|
||||||
|
ALTER TABLE public.studentClassLink ADD CONSTRAINT fk_studentclasslink_student FOREIGN KEY ( studentId ) REFERENCES public.student( studentId ) ON DELETE NO ACTION ON UPDATE NO ACTION;
|
||||||
|
|
||||||
|
ALTER TABLE public.studentClassLink ADD CONSTRAINT fk_studentclasslink_class FOREIGN KEY ( classId ) REFERENCES public.class( classId ) ON DELETE NO ACTION ON UPDATE NO ACTION;
|
||||||
|
|
||||||
|
ALTER TABLE public.studentParentLink ADD CONSTRAINT studentParentLink_fk0 FOREIGN KEY ( studentid ) REFERENCES public.student( studentId ) ON DELETE NO ACTION ON UPDATE NO ACTION;
|
||||||
|
|
||||||
|
ALTER TABLE public.studentParentLink ADD CONSTRAINT studentParentLink_fk1 FOREIGN KEY ( parentId ) REFERENCES public.parent( parentId ) ON DELETE NO ACTION ON UPDATE NO ACTION;
|
||||||
|
|
||||||
|
ALTER TABLE public.test ADD CONSTRAINT test_fk0 FOREIGN KEY ( accountId ) REFERENCES public.account( accountId ) ON DELETE NO ACTION ON UPDATE NO ACTION;
|
||||||
|
|
||||||
|
ALTER TABLE public.testResult ADD CONSTRAINT testResult_fk0 FOREIGN KEY ( studentId ) REFERENCES public.student( studentId ) ON DELETE NO ACTION ON UPDATE NO ACTION;
|
||||||
|
|
||||||
|
ALTER TABLE public.testResult ADD CONSTRAINT testResult_fk1 FOREIGN KEY ( testId ) REFERENCES public.test( testId ) ON DELETE NO ACTION ON UPDATE NO ACTION;
|
||||||
|
]]></string>
|
||||||
|
</script>
|
||||||
|
</layout>
|
||||||
|
</project>
|
||||||
BIN
writeup/diagrams/stratosSchema.png
Executable file
BIN
writeup/diagrams/stratosSchema.png
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 84 KiB |
49
writeup/diagrams/systemsDiagram.puml
Normal file
49
writeup/diagrams/systemsDiagram.puml
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
@startwbs
|
||||||
|
<style>
|
||||||
|
wbsDiagram {
|
||||||
|
LineColor black
|
||||||
|
BackgroundColor white
|
||||||
|
|
||||||
|
leafNode {
|
||||||
|
'BackgroundColor SkyBlue
|
||||||
|
BackgroundColor #93ff75
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
+ Stratos Online Markbook
|
||||||
|
+ User accounts
|
||||||
|
+ Creating accounts
|
||||||
|
+ Logging in
|
||||||
|
+ Resetting passwords
|
||||||
|
+ Management
|
||||||
|
+ Teacher based
|
||||||
|
+ Accounts assigning teachers
|
||||||
|
+ Accounts adding classes
|
||||||
|
+ Assigning students to classes
|
||||||
|
+ Assigning tests to classes
|
||||||
|
+ Test based
|
||||||
|
+ Assigning scores to students
|
||||||
|
+ Calculating grade boundaries
|
||||||
|
+ Generating graphs
|
||||||
|
+ Setting global test values with reports generation
|
||||||
|
+ Student/Parent based
|
||||||
|
+ Contact teachers
|
||||||
|
+ Generate graphs per student
|
||||||
|
+ Generate local test values with reports generation
|
||||||
|
+ Display dashboard
|
||||||
|
+ Send emails
|
||||||
|
+ Handling data
|
||||||
|
+ Reports
|
||||||
|
+ Test reports
|
||||||
|
+ Average score
|
||||||
|
+ Grade boundary chart
|
||||||
|
+ Class reports
|
||||||
|
+ Score movement over time
|
||||||
|
+ Markbook
|
||||||
|
+ Teacher reports
|
||||||
|
+ Mass generate all classes/students
|
||||||
|
+ Student reports
|
||||||
|
+ Average score over time
|
||||||
|
+ Score movement
|
||||||
|
+ Average grade
|
||||||
|
@endwbs
|
||||||
69
writeup/diagrams/test/testAggregated.puml
Normal file
69
writeup/diagrams/test/testAggregated.puml
Normal file
@@ -0,0 +1,69 @@
|
|||||||
|
|
||||||
|
@startuml
|
||||||
|
skinparam actorStyle awesome
|
||||||
|
|
||||||
|
package Parents {
|
||||||
|
actor parent1 as p1
|
||||||
|
actor parent2 as p2
|
||||||
|
actor parent3 as p3
|
||||||
|
actor parent4 as p4
|
||||||
|
actor parent5 as p5
|
||||||
|
}
|
||||||
|
|
||||||
|
package Students {
|
||||||
|
actor student1 as s1
|
||||||
|
actor student2 as s2
|
||||||
|
actor student3 as s3
|
||||||
|
actor student4 as s4
|
||||||
|
actor student5 as s5
|
||||||
|
}
|
||||||
|
|
||||||
|
p1 --> s1
|
||||||
|
p2 --> s2
|
||||||
|
p3 --> s2
|
||||||
|
p4 --> s3
|
||||||
|
p4 --> s4
|
||||||
|
p5 --> s4
|
||||||
|
p5 --> s5
|
||||||
|
|
||||||
|
package Classes {
|
||||||
|
usecase "Class 1" as c1
|
||||||
|
usecase "Class 2" as c2
|
||||||
|
usecase "Class 3" as c3
|
||||||
|
usecase "Class 4" as c4
|
||||||
|
}
|
||||||
|
|
||||||
|
s1 --> c1
|
||||||
|
s2 --> c1
|
||||||
|
s3 --> c1
|
||||||
|
s4 --> c1
|
||||||
|
s5 --> c1
|
||||||
|
|
||||||
|
s1 --> c2
|
||||||
|
s2 --> c2
|
||||||
|
|
||||||
|
s1 --> c3
|
||||||
|
s2 --> c3
|
||||||
|
s3 --> c3
|
||||||
|
|
||||||
|
s4 --> c4
|
||||||
|
s5 --> c4
|
||||||
|
|
||||||
|
package Accounts {
|
||||||
|
actor account1 as a1
|
||||||
|
actor account2 as a2
|
||||||
|
actor account3 as a3
|
||||||
|
}
|
||||||
|
|
||||||
|
c1 --> a1
|
||||||
|
|
||||||
|
c2 --> a1
|
||||||
|
c2 --> a2
|
||||||
|
|
||||||
|
c3 --> a3
|
||||||
|
|
||||||
|
c4 --> a1
|
||||||
|
c4 --> a2
|
||||||
|
c4 --> a3
|
||||||
|
|
||||||
|
@enduml
|
||||||
28
writeup/diagrams/test/testClassesAccounts.puml
Normal file
28
writeup/diagrams/test/testClassesAccounts.puml
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
@startuml
|
||||||
|
skinparam actorStyle awesome
|
||||||
|
|
||||||
|
package Classes {
|
||||||
|
usecase "Class 1" as c1
|
||||||
|
usecase "Class 2" as c2
|
||||||
|
usecase "Class 3" as c3
|
||||||
|
usecase "Class 4" as c4
|
||||||
|
}
|
||||||
|
|
||||||
|
package Accounts {
|
||||||
|
actor account1 as a1
|
||||||
|
actor account2 as a2
|
||||||
|
actor account3 as a3
|
||||||
|
}
|
||||||
|
|
||||||
|
c1 --> a1
|
||||||
|
|
||||||
|
c2 --> a1
|
||||||
|
c2 --> a2
|
||||||
|
|
||||||
|
c3 --> a3
|
||||||
|
|
||||||
|
c4 --> a1
|
||||||
|
c4 --> a2
|
||||||
|
c4 --> a3
|
||||||
|
|
||||||
|
@enduml
|
||||||
29
writeup/diagrams/test/testParentsStudents.puml
Normal file
29
writeup/diagrams/test/testParentsStudents.puml
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
@startuml
|
||||||
|
skinparam actorStyle awesome
|
||||||
|
|
||||||
|
package Parents {
|
||||||
|
actor parent1 as p1
|
||||||
|
actor parent2 as p2
|
||||||
|
actor parent3 as p3
|
||||||
|
actor parent4 as p4
|
||||||
|
actor parent5 as p5
|
||||||
|
}
|
||||||
|
|
||||||
|
package Students {
|
||||||
|
actor student1 as s1
|
||||||
|
actor student2 as s2
|
||||||
|
actor student3 as s3
|
||||||
|
actor student4 as s4
|
||||||
|
actor student5 as s5
|
||||||
|
}
|
||||||
|
|
||||||
|
p1 --> s1
|
||||||
|
p2 --> s2
|
||||||
|
p3 --> s2
|
||||||
|
p4 --> s3
|
||||||
|
p4 --> s4
|
||||||
|
p5 --> s4
|
||||||
|
p5 --> s5
|
||||||
|
|
||||||
|
|
||||||
|
@enduml
|
||||||
35
writeup/diagrams/test/testStudentsClasses.puml
Normal file
35
writeup/diagrams/test/testStudentsClasses.puml
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
@startuml
|
||||||
|
skinparam actorStyle awesome
|
||||||
|
|
||||||
|
package Students {
|
||||||
|
actor student1 as s1
|
||||||
|
actor student2 as s2
|
||||||
|
actor student3 as s3
|
||||||
|
actor student4 as s4
|
||||||
|
actor student5 as s5
|
||||||
|
}
|
||||||
|
|
||||||
|
package Classes {
|
||||||
|
usecase "Class 1" as c1
|
||||||
|
usecase "Class 2" as c2
|
||||||
|
usecase "Class 3" as c3
|
||||||
|
usecase "Class 4" as c4
|
||||||
|
}
|
||||||
|
|
||||||
|
s1 --> c1
|
||||||
|
s2 --> c1
|
||||||
|
s3 --> c1
|
||||||
|
s4 --> c1
|
||||||
|
s5 --> c1
|
||||||
|
|
||||||
|
s1 --> c2
|
||||||
|
s2 --> c2
|
||||||
|
|
||||||
|
s1 --> c3
|
||||||
|
s2 --> c3
|
||||||
|
s3 --> c3
|
||||||
|
|
||||||
|
s4 --> c4
|
||||||
|
s5 --> c4
|
||||||
|
|
||||||
|
@enduml
|
||||||
Reference in New Issue
Block a user