DesignUseCases.tex
51.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
\documentclass[letterpaper]{scrartcl} % or whatever
\usepackage{tgpagella}
\setkomafont{disposition}{\normalfont\bfseries}
%\usepackage[markuppercase]{scrpage2}
\title{\huge Design Use Cases}
\date{\today}
\author{\Large Students With A Goal (S.W.A.G.)}
\usepackage[pass]{geometry}
\usepackage{hyperref}
\usepackage{graphicx}
\usepackage{enumitem}
\setlist[description]{style=multiline,leftmargin=3cm,font=\normalfont\textbf}
\setlistdepth{9}
\setlist[itemize,1]{label=$\bullet$}
\setlist[itemize,2]{label=$\bullet$}
\setlist[itemize,3]{label=$\bullet$}
\setlist[itemize,4]{label=$\bullet$}
\setlist[itemize,5]{label=$\bullet$}
\setlist[itemize,6]{label=$\bullet$}
\setlist[itemize,7]{label=$\bullet$}
\setlist[itemize,8]{label=$\bullet$}
\setlist[itemize,9]{label=$\bullet$}
\renewlist{itemize}{itemize}{9}
\begin{document}
\maketitle
\begin{center}
\includegraphics[width=12cm]{../swag_logo.png}\\
\begin{tabular}{l r}
Melody Jeng & System Architect \\
Arno Gau & Senior System Analyst \\
Rachel Lee & Software Development Lead \\
Laura Hawkins & Project Manager \\
Rohan Rangray & Algorithms Specialist\\
Andrew Buss & Database Specialist \\
Phuong Tran & Quality Assurance Lead \\
Chung Kang Wang & Business Analyst\\
Masud Rahman & User Interface Specialist\\
Kevin Mach & User Interface Specialist\\
\end{tabular}
\end{center}
\newpage
\tableofcontents
\newpage
\section{Accounts}
\subsection{[A1] User Registration}
\begin{description}[style=multiline,leftmargin=3cm]
\item[Description]{To create and save decks, the system requires the user
to create an account prior. The user will be able to create an account
through registering.}
\item[Desired Outcome]{An account will be created for the user from the
specified username, password, email. The user will be able to log into
the aforementioned account.}
\\
\item[User Goals]{The user shall have an account to participate in the
application's activities.}
\item[Primary Actor]{User (student)}
\item[Dependency Use Cases]{None}
\\
\item[Priority Level]{``Must''}
\item[Status]{Implemented}
\item[Pre-conditions]: None.
\item[Post-conditions]
\begin{itemize}
\itemsep1pt\parskip0pt\parsep0pt
\item
{The user has an account registered with the system.}
\end{itemize}
\item[Trigger]{The user wants to create an account.}
\item[Workflow]
\begin{enumerate}
\itemsep1pt\parskip0pt\parsep0pt
\item
{The frontend renders the login form described in login.html.}
\item
{The User shall click the sign up toggle.}
\item
{The frontend shall render a registration form and display it to the User.}
\item
{The User shal fill in the form.}
\item
{The frontend checks that the provided email is not invalid, and that
the password is not valid. If anything is not valid, it displays an
error and returns this to the user. }
\item
{If the form is valid, the frontent POSTs the form in JSON format to the
server API at /api/verify\_email/.}
\item
{The backend deserializes and validates the data in /api/register. If it's not valid, it
returns an error to the frontend.}
\item
{The backend creates a new User object from the provided data, filling
in the email and password fields in models.py in model method create\_user.}
\item
{The backend saves the User object in models.py.}
\item
{The backend marks the User's email as unverified.}
\item
{The backend sends an email to the User's address with a link to
validate the user's email address from models.py in function send\_confirmation\_email.}
\item
{The backend responds with success and logs the User in on a new
session for the User. }
\item
{The frontend reports success to the User and stores the sessionid for
future requests.}
\end{enumerate}
{Verification Workflow:}
\begin{enumerate}
\itemsep1pt\parskip0pt\parsep0pt
\item
{The User receives an email with a link to verify their email. The
User clicks the link}
\item
{The frontend in VerifyEmailController submits a POST request to the backend.}
\item
{The backend validates the code in views.py in function veryify\_email. If the code is not valid, it returns
an error to the frontend.}
\item
{The backend marks the user's email as confirmed and saves the User object
again in models.py in function confirm\_email. The user's account is now active.}
\item
{The frontend's VerifyEmailController.js reports success and logs the User in to the application. }
\end{enumerate}
\end{description}
\newpage
\subsection{[A2] User Login}
\begin{description}
\item[Description]{User is able to login to personal account.}
\item[Desired Outcome]{The user shall be able to provide their username and
password to access their courses and flash cards. The user shall gain
access to the list of the courses they have added, and be able to review
the flash cards they have added to their decks.}
\\
\item[User Goals]{The user wants to resume use of the site on another
device, or use the site after logging out.}
\item[Primary Actor]{User (student)}
\item[Dependency Use Cases]{{[}A1{]} User Registration}
\\
\item[Priority Level]{``Must''}
\item[Status]{Implemented}
\item[Pre-conditions]
\begin{itemize}
\itemsep1pt\parskip0pt\parsep0pt
\item
{The User has registered an account.}
{The User knows their email and password.}
\end{itemize}
\item[Post-conditions]
\begin{itemize}
\itemsep1pt\parskip0pt\parsep0pt
\item
{The User can navigate the site and see their data.}
\end{itemize}
\item[Trigger]{The User wants to use the application and its core features.}
\item[Workflow]
\begin{enumerate}
\itemsep1pt\parskip0pt\parsep0pt
\item
{The frontend shall render the login form described in login.html and implemented in LoginController.js}
\item
{The User shall type in their email and password.}
\item
{The backend shall verify that the User has submitted their email and password in views.py in function login.}
\item
{The backend shall check that the User is active in views.py in function login.}
\item
{The backend shall log the User in using the Django login feature.}
\item
{The frontend shall displays the home page for the User.}
\end{enumerate}
\end{description}
\newpage
\subsection{[A3] Add a Class}
\begin{description}
\item[Description]{The User shall be able to add a class and access the
flashcards associated with that class.}
\item[Desired Outcome]{The class shall be connected to the student's account
and the User shall have the ability to read and publish flashcards
for this class.}
\\
\item[User Goals]{The User wants to publish flashcards for this class, and
read the flashcards for this class that are published by other users.}
\item[Primary Actor]{User (student)}
\item[Dependency Use Cases]{{[}A1{]} User Registration, {[}A2{]} User
Login}
\\
\item[Priority Level]{``Must''}
\item[Status]{Implemented}
\item[Pre-conditions]
\begin{itemize}
\itemsep1pt\parskip0pt\parsep0pt
\item
{The User has registered an account.}
\item
{The User has successfully logged in to the application.}
\end{itemize}
\item[Post-conditions]
\begin{itemize}
\itemsep1pt\parskip0pt\parsep0pt
\item
{The User can view the flashcards being published for the class and
add them to their deck.}
\item
{The User can publish flashcards to be viewed and added by other users
in the same class.}
\end{itemize}
\item[Trigger]{The User wants to make flashcards and view flashcards for a class.}
\item[Workflow]
\begin{enumerate}
\itemsep1pt\parskip0pt\parsep0pt
\item
{The User shall click "Add a Class" from the drop down menu in the upper left hand corner.}
\item
{The frontend shall navigate to the new page described by addclass.html.}
\item
{The User shall begin to type the class department code, course title, course number, or instructor in the text box.}
\item
{The frontend in ClassAddController.js shall send a get request to the backend at api/sections/search/.}
\item
{The backend shall search the database for the classes matching department code, course title, course number, or instructor in models.py in function search.}
\item
{The frontend shall show the classes that the backend has found.}
\item
{The User shall select from the classes the one that they want to add.}
\item
{The frontend shall enable the 'Add Class' button.}
\item
{The User shall click 'Add Class' button to the right of the text box.}
\item
{The frontend shall send a post request to api/sections/.}
\item
{The backend shall in views.py in function enroll shall call the method enroll in models.py.}
\item
{The backend in models.py in function enroll shall add the class to the User's sections.}
\item
{The frontend shall redirect the User to the class's Live Feed using the ClassAddController.js.}
\item
{The frontend shall present the live feed for the class by using feed.html and FeedController.js.}
\end{enumerate}
\item[Alternate Workflow: User is whitelisted.\\]
\begin{enumerate}
\setcounter{enumi}{3}
\itemsep1pt\parskip0pt\parsep0pt
\item []{ Precondition: The class has a whitelist, a whitelist is a list of email addresses that can add themselves to the class.\\}
\item
{The User shall select their desired class, which has a whitelist, by clicking on ``Add Class''.}
\item
{The frontend shall submit a POST request to /api/me/sections with
the course ID that the User typed. }
\item
{The backend shall check if there is a whitelist for the class that the
User has selected in models.py at function is\_whitelisted.}
\item
{The backend shall check if the user is on the whitelist in models.py
in function is\_user\_on\_whitelist.}
\item
{The backend shall add the User to the class following steps above.}
\item
{The frontend shall redirect the User to the class's live feed followed the last step in the Workflow above.}
\end{enumerate}
\item[Alternate Workflow: User is not whitelisted.]
\begin{enumerate}
\setcounter{enumi}{7}
\itemsep1pt\parskip0pt\parsep0pt
\item []{ Precondition: The class has a whitelist, a whitelist is a list of email addresses that can add themselves to the class.\\}
\item
{The backend shall will check that the user is in the whitelist in models.py.}
\item
{The frontend shall display that the class is whitelisted and the Add Class button will not be enabled.}
\end{enumerate}
\end{description}
{}
\newpage
{}
\subsection{[A4] Drop a Class}
\begin{description}
\item[Description]{The User can remove themselves from a course he/she is
registered to}
\item[Desired Outcome]{The User has dropped the class and no longer need
access to the flashcards for said class. This means they can no longer
see the flashcards associated to the class that they dropped }
\\
\item[User Goals]{The User shall not have access to a class and the
flashcards associated with that class. They will no longer see the class
listed in their drop down menu.}
\item[Primary Actor]{User (student)}
\item[Dependency Use Cases]{{[}A1{]} User Registration, {[}A2{]} User
Login, {[}A3{]} Add a Class}
\\
\item[Priority Level]{ ``Should''}
\item[Status]{Implemented }
\item[Pre-conditions]
\begin{itemize}
\itemsep1pt\parskip0pt\parsep0pt
\item
{The User has a valid account.}
\item
{The User is logged in.}
\item
{The User has enrolled in at least one class.}
\item
{The User has navigated to the Settings page.}
\end{itemize}
\item[Post-conditions]{}
\begin{itemize}
\itemsep1pt\parskip0pt\parsep0pt
\item
{User shall no longer have access to dropped class, or associated
flashcards}
\end{itemize}
\item[Trigger]{User no longer wants to see flashcards from that class.}
\item[Workflow]
\begin{enumerate}
\itemsep1pt\parskip0pt\parsep0pt
\item
{The User shall click `Drop' button to the right of the class they wish to drop.}
\item
{The frontend shall submit a DELETE request to
/api/me/sections/\textless{}section ID number\textgreater{}.}
\item
{The backend shall check that the User is enrolled in the section in models.py in function drop.}
\item
{The server shall remove the selected class from a user's list of section in models.py in function drop. }
\item
{The frontend shall remove the class from the list in setting and show toast reading 'Dropped'.}
\end{enumerate}
\end{description}
\newpage
{}
\subsection{[A5] Password change}
\begin{description}
\item[Description]{The User shall be able to change the password for their
account in the account settings. }
\item[Desired Outcome]{The User's password shall be changed and the User
shall be able to log in with the new password in the future}
\\\\
\item[User Goals]{The User wants to use a different password in the future}
\item[Primary Actor]{User (student)}
\item[Dependency Use Cases]{{[}A1{]} User Registration, {[}A2{]} User
Login}
\\
\item[Details]{The User provides their current password and a new password
in a form. If the current password is correct, the system updates their
password to the requested new password.}
\item[Priority Level]{``Must''}
\item[Status]{Implemented}
\item[Pre-conditions]
\begin{itemize}
\itemsep1pt\parskip0pt\parsep0pt
\item
{The User has registered an account.}
\item
{The User has logged in.}
\item
{The User knows their current password.}
\item
{The User has navigated to the Settings page.}
\end{itemize}
\item[Post-conditions]
\begin{itemize}
\itemsep1pt\parskip0pt\parsep0pt
\item
{The User's password is changed}
\item
{The User can log in with the new password}
\end{itemize}
\item[Trigger]{The User wants to change their password.}
\item[Error Handling]
\begin{description}
\item[\small Missing Fields] \begin{itemize}
\item The client shall enforce required fields
\item The server will return an HTTP Bad Request error to the client.
\end{itemize}
\item[\small Incorrect Old Password] \begin{itemize}
\item The server will return an HTTP Forbidden error to the client.
\end{itemize}
\item[\small Blank New Password] \begin{itemize}
\item The server will return an HTTP Bad Request error to the client.
\end{itemize}
\end{description}
\item[Workflow]
\begin{enumerate}
\itemsep1pt\parskip0pt\parsep0pt
\item
{The frontend shall render a form that requires the user to enter their
old password and new password from settings.html}
\item
{The User shall type in their current password, the desired new
password, and retype the desired new password to confirm.}
\item
{The frontend shall submit the data to the server by sending a PATCH
request to /api/me containing ``old\_password'' and
``new\_password'' values in SettingsController.js.}
\item (The )
\item
{The backend shall check the user's current password in views.py in function patch under UserDetail.}
\item The backend shall update the user's current password in views.py in function patch under UserDetail.
\item
{The frontend shall present a toast reading "Password successfully changed" and redirect the User to the Add a Class page.}
\end{enumerate}
\end{description}
{}
\newpage
{}
\subsection{[A6] Password reset}
\begin{description}
\item[Description]{The User shall be able to reset their password without
being logged in.}
\item[Desired Outcome]{The User's password shall be changed to one that
they remember.}
\\
\item[User Goals]{The User will be able to log into the site with a new password.}
\item[Primary Actor]{User (student)}
\item[Dependency Use Cases]{{[}A1{]} User Registration}
\\
\item[Details]{The user provides their email in a password reset form. If
the address is valid, the site sends a password reset link with a random
token to that address. If the address is invalid, the site does not send
a link. For security reasons, we do not reveal to the user whether the
email address was valid, and we expire the link after 24 hours. When a
user visits the link emailed to them, they are able to specify a new
password in a form. When they submit the form, their password is updated
if the token is correct. }
\item[Priority Level]{``Must''}
\item[Status]{Implemented}
\item[Pre-conditions]
\begin{itemize}
\itemsep1pt\parskip0pt\parsep0pt
\item
{The User has created an account before.}
\item
{The User knows the email address attached to their account for our application.}
\item
{The User can log into their email account.}
\end{itemize}
\item[Post-conditions]
\begin{itemize}
\itemsep1pt\parskip0pt\parsep0pt
\item
{The User's password is changed.}
\item
{The User can log in with the new password.}
\end{itemize}
\item[Trigger]{The User wants to log into the site but does not know their password.}
\item[Workflow]
\begin{enumerate}
\itemsep1pt\parskip0pt\parsep0pt
\item
{The User clicks ``Forgot Password'' text on the login page}
\item
{The frontend shall render the password reset page from the template requestpasswordreset.html.}
\item
{The User shall type in their email address for their account and click the "Reset" button.}
\item
{The frontend shall send a POST request to /api/request\_password\_reset/ from RequestResetController.js.}
\item
{The backend shall check if an account exists with the email entered by
the User in views.py in function request\_password\_reset.}
\item
{The backend shal send an email to the User with a link to the password reset page in models.py in function
request\_password\_reset.}
\item
{The User will navigate to their email account, open the email, and click the link.}
\item
{The frontend shall render the password reset page from the template resetpassword.html.}
\item
{The User shall type in their new password and re-type it to confirm it.}
\item
{The frontend shall check if the new password is long enough and if the confirmed password is the same as
the new password in ResetPasswordController.js.}
\item
{The frontend shall send a POST request to /api/reset\_password from ResetPasswordController.js.}
\item
{The backend shall change the user's password in views.py in function reset\_password.}
\item
{The frontend shall redirect the User to the login page. }
\item
{The User shall use their new password to login to the application.}
\end{enumerate}
\end{description}
\newpage
{}
\subsection{[A7] Limit Student Access to Courses}
\begin{description}
\item[Description]{The instructor shall be able to limit access to the
courses that he is in charge of by whitelisting only those students that
are actually in the class.}
\item[Desired Outcome]{The class will have limited access and only those
users who are whitelisted may enroll in the class.}
\\
\item[User Goals]{The instructor wants to limit access to his class so only
the students who are actually in his class participate, and nobody
else.}
{Primary Actor: }{User (instructor)}
\item[Dependency Use Cases]{{[}A1{]} User Registration, {[}A2{]} User
Login}
\\
\item[Priority Level]{``Should''}
\item[Status]{Implemented}
\item[Pre-conditions]
\begin{itemize}
\itemsep1pt\parskip0pt\parsep0pt
\item
{User has valid instructor's account}
\end{itemize}
\item[Post-conditions]
\begin{itemize}
\itemsep1pt\parskip0pt\parsep0pt
\item
{Only those users who were whitelisted may add the class.}
\end{itemize}
\item[Trigger]{The course instructor wants to limit the students who
can add his class on our application.}
\item[Workflow]
\begin{enumerate}
\itemsep1pt\parskip0pt\parsep0pt
\item
{The instructor emails the administrators from his UCSD email address
and requests to limit access to his course. He provides a list of
emails of the students that are to be whitelisted.}
\item
{The administrators visit a custom admin page, select the course, and
paste the list of emails. They submit the page directly (no separate
frontend here) to the server.}
\item
{The backend shall create a WhitelistedAddress for each provided email,
attaching it to the section taught by the instructor.}
\item
{The backend shall add any existing users whose email addresses appear
in the whitelist to the class. }
\end{enumerate}
\end{description}
\newpage
\subsection{[A8] User Logout}
\begin{description}
\item[Description]{The User shall be able to log out of his/her account on
the site.}
\item[Desired Outcome]{The User's information and data will no longer be
accessible after logging out. }
\\
\item[User Goals]{The User is done with his/her session of using the
website, and wants to make sure others cannot access the data in his/her
account.}
\item[Primary Actor]{User (student)}
\item[Dependency Use Cases] None
\\
\item[Priority Level]{``Must''}
\item[Status]{Implemented}
\item[Pre-conditions]{The user is logged into their account}
\item[Post-conditions]{}{The user's data can no longer be accessed.}
\item[Trigger]{The User no longer wants to be logged into the application.}
\item[Workflow]
\begin{enumerate}
\itemsep1pt\parskip0pt\parsep0pt
\item
{The User clicks the 'Logout' button in the upper right hand corner.}
\item
{The backend shall log the User out using the Django logout feature.}
\item
{The frontend renders the application login page using login.html.}
\end{enumerate}
\end{description}
\newpage
\subsection{[A9] Contact Admin}
\begin{description}
\item[Description]{The User shall be able to contact the admin.}
\item[Desired Outcome]{The User shall send a message to the admin; the
admin shall receive the message.}
{User Goals:}{The User sends a message to the admin.}
\item[Primary Actor]{User}
\item[Dependency Use Cases]{None}
\\
\item[Priority Level]{``Must''}
\item[Status]{Implemented}
\item[Pre-conditions]{The User has an account registered and is logged in.}
\item[Post-conditions]{The admin receives the user's message.}
\item[Trigger]{The User wants to contact the adiminstators of the site with
bug reports, questions, or praise. }
\item[Workflow]
\begin{enumerate}
\itemsep1pt\parskip0pt\parsep0pt
\item
{The User shall click the '?' button that presents a toast reading "Help" when the User hovers over it.}
\item
{The frontend shall render the page using the help.html template.}
\item
{The User shall scroll to the bottom of the page.}
\item
{The User shall click the text reading "Send Us an Email!"}
\item
{The frontend shall open Microsoft Outlook or a similar application using the HelpController.js.}
\item
{The User shall see our email address in the recipients text box.}
\end{enumerate}
\end{description}
\newpage
{}
\section{Flashcards}
\subsection{[F1] Push Flashcard}
\begin{description}
\item[Description]{The user shall be able to create a flashcard with their
input. }
\item[Desired Outcome]{The user shall have the flashcard added to their own
deck and the Live Feed. }
\\
\item[User Goals]{The user will see their flashcard in their deck and the
flashcard will be shared with others. }
\item[Dependency Use Cases]{{[}A1{]} User Registration, {[}A2{]} User
Login, {[}A3{]} Add a Class}
\\
\item[Pre-conditions]
\begin{itemize}
\itemsep1pt\parskip0pt\parsep0pt
\item
{The User has an account }
\item
{The User has added at least one class}
\item
{The User is on the class' page}
\end{itemize}
\item[Post-conditions]
\begin{itemize}
\itemsep1pt\parskip0pt\parsep0pt
\item
{The User has flashcard added to their deck}
\item
{The Flashcard is shown in the Live Feed}
\item
{Other users can add this flashcard to their decks}
\end{itemize}
\item[Trigger]{}
\begin{itemize}
\itemsep1pt\parskip0pt\parsep0pt
\item
{The User has clicked on the button ``Make New Flashcard''.}
\item
{The Server receives a POST request containing the flashcard data.}
\end{itemize}
\item[Workflow]
\begin{enumerate}
\itemsep1pt\parskip0pt\parsep0pt
\item
{The User is at the live feed for the class.}
\item
{The User shall click on the button}{Push
Flashcard}
\item
{The
}{Client}{shall
present a dialog box for inputting the flashcard text to the User.}
\item
{The User shall input the flashcard text.}
\item
{Optionally, the User shall mark keywords in the flashcard text.}
\item
{If the User creates this flashcard outside of the lecture time, he
will get the option to change the material date.}
\item
{The User shall click on the `Submit' button to submit the flashcard
text, blanks, and material date, in JSON form as a POST request.}
\item
{The Server shall obtain the flashcard information by deserializing
the JSON in the POST request.}
\item
{The Server shall create a new record for this flashcard in the
Flashcards table in the database.}
\item
{The Server shall publish the newly created card to the live feed of
the class.}
\end{enumerate}
\end{description}
{Alternative Workflow:}
\begin{enumerate}
\itemsep1pt\parskip0pt\parsep0pt
\item
{The User shall view a flashcard that he/she did not create}
\item
{The User shall click ``Edit''}
\item
{The client shall present a dialog box for editing the existing
flashcard text}
\item
{The User shall make edits}
\item
{The User shall click ``save''}
\item
{The client shall send a POST request}
\item
{The server shall remove the original card from user's deck}
\item
{The Server shall obtain the flashcard information by deserializing
the JSON in the POST request.}
\item
{The Server shall create a new record for this flashcard in the
Flashcards table in the database.}
\item
{The Server shall publish the newly created card to the live feed of
the class.}
\end{enumerate}
\newpage
{}
\subsection{[F2] Edit Flashcard}
\begin{description}
\item[Description]{The user shall be able to edit the text on their own
flashcard }
\item[Desired Outcome]{Flashcard is edited and saved appropriately}
\\
\item[User Goals]{To be able to change text on a flashcard}
\item[Dependency Use Cases]{{[}A1{]} User Registration, {[}A2{]} User
Login, {[}A3{]} Add a Class, {[}F1{]} Push Flashcard, {[}F3{]} Pull
Flashcard}
\item[Pre-conditions]
\begin{itemize}
\itemsep1pt\parskip0pt\parsep0pt
\item
{Flashcard is created}
\item
{Flashcard in user's deck}
\item
{Flashcard is viewable}
\end{itemize}
\item[Post-conditions]
\begin{itemize}
\itemsep1pt\parskip0pt\parsep0pt
\item
{Flashcard is edited}
\end{itemize}
\item[Trigger]{User has clicked ``Edit'' button when viewing a specific
flashcard}
\item[Workflow]
\begin{enumerate}
\itemsep1pt\parskip0pt\parsep0pt
\item
{The user shall view their deck}
\item
{The client shall present user with a grid view of cards in
chronological creation order}
\item
{The user shall select a flashcard and click `Edit'}
\item
{The client shall produce an editable dialog box containing flashcard
text}
\item
{The user shall make desired changes}
\item
{The user shall click `Save'}
\item
{The client shall generate a POST request for a new flashcard and send
it to the server}
\item
{If the user changed only the blanks of the cards, the server shall
create a new FlashcardMask object and update the appropriate
UserFlashcard object with a reference to it.}
\item
{If the user changed the text of the card, the server will instead:}
\end{enumerate}
\begin{enumerate}
\itemsep1pt\parskip0pt\parsep0pt
\item
{create a new flashcard for the section}
\item
{push it to the feed}
\item
{add it to the user's deck}
\item
{hide the old card from the user}
\item
{and return the new card to the user}
\end{enumerate}
\end{description}
{}
\newpage
{}
\subsection{[F3] Pull Flashcard}
\begin{description}
\item[Description]{The User shall be able to add flash cards to their own
deck from the Live Feed. }
\item[Desired Outcome]{The User shall have the flashcard added to their own
deck }
\\
\item[User Goals]{The user will be able to review that flashcard. }
\item[Primary Actor]{User (student)}
\item[Dependency Use Cases]{{[}A1{]} User Registration, {[}A2{]} User
Login, {[}A3{]} Add a Class, {[}F1{]} Push Flashard}
\\
\item[Priority Level]{``Must'' }
\item[Status]{Not Implemented}
\item[Pre-conditions]
\begin{itemize}
\itemsep1pt\parskip0pt\parsep0pt
\item
{Flashcard has been created }
\item
{That flashcard is in the Live Feed}
\end{itemize}
\item[Post-conditions]
\begin{itemize}
\itemsep1pt\parskip0pt\parsep0pt
\item
{User shall have that flashcard added to their deck}
\item
{User can review this flashcard later}
\end{itemize}
\item[Trigger]{User has clicked on the flashcard in the Live Feed.}
\item[Workflow]
\begin{enumerate}
\itemsep1pt\parskip0pt\parsep0pt
\item
{The User is in the Live Feed.}
\item
{User shall click on the ``Pull Flashcard'' button on a Flashcard in
the Feed.}
\item
{The Client shall make the pulled Flashcard disappear from the Live
Feed}
\item
{The Client shall make the pulled Flashcard appear in the User's Deck
on the sidebar.}
\item
{The Client shall submit a POST request to
/api/flashcards/\textless{}flashcard id\textgreater{}/pull}
\item
{The server shall create a UserFlashcard object to represent that the
user's deck contains the card.}
\item
{The server shall notify connected clients about the new card rating,
if any}
\item
{Connected clients will take the new rating into account when next
rearranging the feed.}
\end{enumerate}
\end{description}
\newpage
{}
\subsection{[F4] Flag Inappropriate Cards}
\begin{description}
\item[Description]{Cards may be flagged indicating inappropriate content}
\item[Desired Outcome]{The flashcard's inappropriateness variable is
adjusted}
\\
\item[User Goals]{To note if a card should not belong in the class and
should not be displayed in the feed}
\item[Primary Actor]{User (Student)}
\item[Dependency Use Cases]{{[}A1{]} User Registration, {[}A2{]} User
Login, {[}A3{]} Add a Class, {[}F1{]} Push Flashcard}
\\
\item[Priority Level]{``Should''}
\item[Status]{Unimplemented}
\item[Pre-conditions]
\begin{itemize}
\itemsep1pt\parskip0pt\parsep0pt
\item
{User is enrolled in a class}
\end{itemize}
\begin{itemize}
\itemsep1pt\parskip0pt\parsep0pt
\item
{Flashcard is created}
\item
{Flashcard is viewable in feed}
\end{itemize}
\item[Post-conditions]
\begin{itemize}
\itemsep1pt\parskip0pt\parsep0pt
\item
{Flashcard is hidden from user}
\item
{Flashcard internal variable is adjusted}
\end{itemize}
\item[Trigger]{User clicks flag on a specific flashcard}
\item[Workflow]
\begin{enumerate}
\itemsep1pt\parskip0pt\parsep0pt
\item
{The User is at a page of their classes.}
\item
{The User selects one of their classes to enter the Live Feed.}
\item
{The User is on the Live Feed for his/her class.}
\item
{The User shall identify an inappropriate card and flag the card.}
\item
{The User clicks the ``Flag as Inappropriate'' button on the flashcard
that he/she wants to report}
\item
{The Client shall hide the card from the user}
\item
{The server shall create a FlashcardReport object}
\end{enumerate}
\end{description}
{}
{}
\newpage
{}
\subsection{[F5] Filter Flashcards}
\begin{description}
\item[Description]{The user is able to filter for flashcards by date}
\item[Desired Outcome]{The user shall see flashcards based on the filter
options}
{User Goals:}{The user can find what he/she is specifically looking
for}
\item[Primary Actor]{User (student)}
\item[Dependency Use Cases]{{[}A1{]} User Registration, {[}A2{]} User
Login, {[}A3{]} Add a Class, {[}F1{]} Push Flashcard, {[}F3{]} Pull
Flashcard}
\\
\item[Priority Level]{''Should''}
\item[Status]{Not}{}{Implemented }
\item[Pre-conditions]
\begin{itemize}
\itemsep1pt\parskip0pt\parsep0pt
\item
{User has registered for the course }
\item
{Flashcards exist in the course}
\end{itemize}
\item[Post-conditions]{}
\begin{itemize}
\itemsep1pt\parskip0pt\parsep0pt
\item
{User only sees specific flashcards}
\end{itemize}
\item[Trigger]{User has selected advanced options from menu}
\item[Workflow]
\begin{enumerate}
\itemsep1pt\parskip0pt\parsep0pt
\item
{The User chooses one of their classes.}
\item
{The User presses the class they want to view.}
\item
{The Client displays the Live Feed.}
\item
{The User is at the Live Feed.}
\item
{The User wants to filter the cards on the Live Feed.}
\item
{The User shall select what filter option they want from a drop down
menu.}
\item
{The Client shall display only relevant flashcards.}
\end{enumerate}
\end{description}
{}
\newpage
{}
\subsection{[F6] Blank Out Words in Flashcard}
\begin{description}
\item[Description]{The User shall be able to blank out keywords in any
flashcard in his deck. }
\item[Desired Outcome]{The blanked out words in the flashcard notify the
System that they are keywords. }
\\
\item[User Goals]{The User shall mark some words as keywords so the System
may later quiz theirself by blanking out the keywords and having the
User guess what they are.}
{Primary Actor: }{User (student)}
\item[Dependency Use Cases]{{[}A1{]} User Registration, {[}A2{]} User
Login, {[}A3{]} Add a Class, {[}F1{]} Push Flashcard}
\\
\item[Priority Level]{``Must''}
\item[Status]{Not implemented.}
\item[Pre-conditions]
\begin{itemize}
\itemsep1pt\parskip0pt\parsep0pt
\item
{The User has the flashcard he wishes to blank out words from in his
deck.}
\item
{The User shall (be on the class page and) view deck}
\end{itemize}
{Post-conditions: }
\begin{itemize}
\itemsep1pt\parskip0pt\parsep0pt
\item
{The blanked out words in the flashcard are marked as keywords.}
\item
{The System shall blank out the keywords and let the User guess what
they are when it presents the flashcard to the User for reviewing.}
\end{itemize}
\item[Trigger]{The User clicks on a flashcard.}
\item[Workflow]
\begin{enumerate}
\itemsep1pt\parskip0pt\parsep0pt
\item
{The Client shall a show deck to user}
\item
{The User shall click on the flashcard in his deck that he wants to
blank out words from}
\item
{The client shall bring user to edit flashcard page/popup}
\item
{The User shall click on the words that he wishes to blank out}
\item
{The client shall specify a character range as blank}
\item
{The server shall mark those words by updating the Flashcard Mask for
that flashcard. }
\item
{The User shall click on `Save' or the equivalent button to save the
changes}
\item
{The server will save the blanked out words as keywords to the
Flashcard Mask to review}
\item
{The client shall cover the keywords with whitespace to hide them from
the User}
\end{enumerate}
{Alternative Workflows:}
\begin{enumerate}
\itemsep1pt\parskip0pt\parsep0pt
\item
{The User shall (be on the class page and) click ``Make New
Flashcard''}
\item
{The client shall present user with a new flashcard to fill in}
\item
{The User shall fill in the information}
\item
{The client shall ask if the user wants to specify blanks}
\item
{The System will save the blanked out words as keywords to the
Flashcard Mask to review}
\item
{The client shall cover the keywords with whitespace to hide them from
the User}
\end{enumerate}
\end{description}
{}
\newpage
{}
\subsection{[F7] Fix Flashcard}
\begin{description}
\item[Description]{The User shall be able to alter a flashcard he/she made
originally and not have to make a new copy of it.}
\item[Desired Outcome]{The User shall alter one flashcard and that
alteration will be shown to all users of that flashcard}
\\
\item[User Goals]{The user shall make the flashcard say something different
than it did originally.}
\item[Primary Actor]{User (student) }
\item[Dependency Use Cases]{{[}A1{]} User Registration, {[}A2{]} User
Login, {[}A3{]} Add a Class, {[}F1{]} Push Flashcard}
\\
\item[Priority Level]{Must}
\item[Status]{Not Implemented}
\item[Pre-conditions]
\begin{itemize}
\itemsep1pt\parskip0pt\parsep0pt
\item
{User has created the flashcard}
\end{itemize}
\item[Post-conditions]{}
\begin{itemize}
\itemsep1pt\parskip0pt\parsep0pt
\item
{The user shall see their alteration for that flashcard}
\item
{Other users will be notified of the alteration}
\end{itemize}
\item[Trigger]{User (creator of original card) has clicked on the button
``Edit''}
\item[Workflow]
\begin{enumerate}
\itemsep1pt\parskip0pt\parsep0pt
\item
{User shall select one of the Flashcards they authored.}
\item
{User shall select ``Edit'' button on the flashcard.}
\item
{Client shall display an ``Edit Flashcard'' view.}
\item
{The Flashcard will display editable fields/areas.}
\item
{The User shall input any changes to the Flashcard.}
\item
{The User shall select the ``Done Editing'' button.}
\item
{The Client shall close the ``Edit Flashcard'' view.}
\item
{The server shall update the Flashcard's content.}
\item
{Client shall notify users with the Flashcard that the Flashcard has
been edited, allowing the other users to keep or to discard the
changes.}
\end{enumerate}
\end{description}
{}
{}
{}
\newpage
{}
\subsection{[F8] Hide cards from feed}
\begin{description}
\item[Description]{The user shall be able to hide cards from feed}
\item[Desired Outcome]{The card is no longer visible to the user}
\\
\item[User Goals]{The card has been looked at and should be hidden to
reduce screen clutter}
{Primary Actor: }{User (Student)}
\item[Dependency Use Cases]{}{}{{[}A1{]} User Registration, {[}A2{]} User
Login, {[}A3{]} Add a Class, {[}F1{]} Push Flashcard}
\\
\item[Priority Level]{``Should''}
{Status:}{Not implemented}
\item[Pre-conditions]{Flashcard is created, flashcard is viewable by user}
\item[Post-conditions]{Flashcard is not viewable by user}
\item[Trigger]{Card is flagged; Card is noted to be hidden}
\item[Workflow]
\begin{enumerate}
\itemsep1pt\parskip0pt\parsep0pt
\item
{The User chooses a class from the dashboard.}
\item
{The Client shows the Live Feed for the selected class.}
\item
{The User sees a card they want to hide from the Live Feed.}
\item
{The User shall press a ``Hide Flashcard'' button on the card to be
hidden.}
\item
{The Client shall hide the card of interest from the Live Feed, for
only that User.}
\end{enumerate}
\end{description}
\newpage
{}
\subsection{[F9] View a Feed}
\begin{description}
\item[Description]{The user shall be able to view Live Feeds for different
classes}
\item[Desired Outcome]{The system shall only show the user Live Feeds for
specific classes. }
\\
\item[User Goals]{The user will see only one Live Feed at a time. }
\item[Dependency Use Cases]{}{}{{[}A1{]} User Registration, {[}A2{]} User
Login, {[}A3{]} Add a Class}
\\
\item[Priority Level]{``Must''}
{Status:}{Not implemented}
\item[Pre-conditions]{User has added a class}
\item[Post-conditions]{User shall see the Live Feed for that class}
\item[Trigger]{User shall select a class}
\item[Workflow]
\begin{enumerate}
\itemsep1pt\parskip0pt\parsep0pt
\item
{The User logs into their account.}
\item
{The System verifies the User's credentials and saves their session.}
\item
{The User is at their dashboard.}
\item
{The Client shows the User's dashboard.}
\item
{The User selects a class from their dashboard.}
\item
{The Client displays the Live Feed for the class.}
\end{enumerate}
\end{description}
\newpage
{}
\section{Decks}
\subsection{[-D2-] Making a deck}
\begin{description}
\item[Description]{Upon selecting the right course, the student has the
power to make a deck by either selecting existing flashcard or adding a
new flashcard.}
\item[Desired Outcome]{The user can keep track of cards that s/he wants.}
\\
\item[User Goals]{The user has a personal deck ready for review later.}
\item[Primary Actor]{User (student)}
\item[Dependency Use Cases]{Add a class {[}A3{]}, Add Flashcards to Deck
{[}F1{]}, Make a Flashcard {[}F3{]}}
\\
\item[Priority Level]{``Must''}
\item[Status]{In Progress}
\item[Pre-conditions]
\begin{itemize}
\itemsep1pt\parskip0pt\parsep0pt
\item
{The user has an account with the application. }
\item
{The user has been added to the desired class.}
\end{itemize}
\item[Post-conditions]
\begin{itemize}
\itemsep1pt\parskip0pt\parsep0pt
\item
{Desired cards are added to user's deck to the specific class }
\item
{User's deck is added to the database.}
\end{itemize}
\item[Trigger]{User has selected a card from the pool. User submitted a
new flashcard after ``Make New Flashcard''.}
\item[Workflow]
\begin{enumerate}
\itemsep1pt\parskip0pt\parsep0pt
\item
{User is at their dashboard.}
\item
{User selects the class of interest that they had no activity in yet.}
\item
{Client displays the Live Feed for the class.}
\item
{User presses ``Pull Flashcard'' button on a Flashcard that they want
in their Deck.}
\item
{The server creates a Deck for the User for the Class of interest.}
\item
{The server adds the Flashcard to the User's Deck.}
\item
{The Client makes the Flashcard disappear from the Live Feed.}
\item
{The Client displays the Flashcard in the User's Deck in the sidebar.}
\end{enumerate}
{Alternate Workflow:}
\begin{enumerate}
\itemsep1pt\parskip0pt\parsep0pt
\item
{User is at their dashboard.}
\item
{User selects the class of interest that they had no activity in yet.}
\item
{Client displays the Live Feed for the class.}
\item
{The User adds a Flashcard into the Class.}
\item
{The server creates a Deck for the User for the Class of interest.}
\item
{The server adds the new Flashcard to the User's Deck.}
\item
{The Client makes the Flashcard disappear from the Live Feed.}
\item
{The Client displays the Flashcard in the User's Deck in the sidebar.}
\end{enumerate}
\end{description}
\newpage
{}
\subsection{[D1] Remove a card from a deck}
\begin{description}
\item[Description]{The user can remove flashcards from their deck.}
\item[Desired Outcome]{The user will not be notified about that card. }
\\
\item[User Goals]{To only review cards that the user wants to review. }
\item[Primary Actor]{User (student)}
\item[Dependency Use Cases]{Add a class {[}A3{]}, Add Flashcards to Deck
{[}F1{]}, Make a Flashcard {[}F3{]}}
\\
\item[Priority Level]{``Must''}
\item[Status]{Unimplemented}
\item[Pre-conditions]
\begin{itemize}
\itemsep1pt\parskip0pt\parsep0pt
\item
{The User has an account with the application}
\item
{The User is logged in}
\end{itemize}
\item[Post-conditions]
\begin{itemize}
\itemsep1pt\parskip0pt\parsep0pt
\item
{Desired cards are hidden to the user.}
\end{itemize}
\item[Trigger]{User has selected a card to be hidden.}
\item[Workflow]
\begin{enumerate}
\itemsep1pt\parskip0pt\parsep0pt
\item
{The Client shows the user the dashboard.}
\item
{The User shall select the appropriate class.}
\item
{The System checks if the class is in session.}
\item
{The User shall select deck view.}
\item
{The Client shall route the user to the deck view.}
\item
{The User clicks a flashcard's remove button.}
\item
{The Client shall send a DELETE request to the server}{}{at
/api/flashcard/\textless{}flashcard ID\textgreater{}/remove}
\item
{The Server removes the flashcard from the User's Deck.}
\item
{The Server updates the flashcard's position in the Live Feed.}
\item
{The Client updates the User's Deck.}
\end{enumerate}
{}
{Alternate Workflow:}
\begin{enumerate}
\itemsep1pt\parskip0pt\parsep0pt
\item
{The Client shows the user the dashboard.}
\item
{The User shall select the appropriate class.}
\item
{The System checks if the class is }{not}{in session.}
\item
{The Client shall the user to the deck view.}
\item
{The User clicks a flashcard's remove button.}
\item
{The Client shall send a DELETE request to the server}{}{at
/api/flashcard/\textless{}flashcard ID\textgreater{}/remove}
\item
{The Server removes the flashcard from the User's Deck.}
\item
{The Server updates the flashcard's position in the Live Feed.}
\item
{The Client updates the User's Deck.}
\end{enumerate}
\end{description}
\subsection{[-D2-] Shuffling deck}
\begin{description}
\item[Description]{User is able to shuffle his/her deck as a way to study
the flashcards}
\item[Desired Outcome]{When taking a quiz, the user will notice that
flashcards appear in random order}
{User Goals:}{Improve quiz taking skills and knowledge consumption}
\item[Primary Actor]{User (student)}
\item[Dependency Use Cases]{Deck has been created {[}D2{]}}
\\
\item[Priority Level]{}{''Won't''}
\item[Status]{Implemented }
\item[Pre-conditions]
\begin{itemize}
\itemsep1pt\parskip0pt\parsep0pt
\item
{User must have registered for course }
\end{itemize}
\begin{itemize}
\itemsep1pt\parskip0pt\parsep0pt
\item
{User must have added cards to deck}
\end{itemize}
\item[Post-conditions]{}
\begin{itemize}
\itemsep1pt\parskip0pt\parsep0pt
\item
{User takes a quiz and notice the deck has been shuffled}
\end{itemize}
\item[Trigger]{User has clicked on the button ``SHUFFLE DECK''}
\item[Workflow]
\begin{enumerate}
\itemsep1pt\parskip0pt\parsep0pt
\item
{User is on the homepage.}
\item
{User selects the ``Study'' button for the Class they want to view or
shuffle cards for.}
\item
{The Client displays their Deck for the Class of interest.}
\item
{User clicks on ``shuffle deck'' button to shuffle the deck,
randomizing the order in which it will be displayed.}
\item
{The Client displays a change in card ordering.}
\item
{System reorders cards' study order.}
\end{enumerate}
{Alternate Workflow: }
\begin{enumerate}
\itemsep1pt\parskip0pt\parsep0pt
\item
{User is on the homepage.}
\item
{User selects Class of interest.}
\item
{The Client displays the Live Feed for the Class.}
\item
{User clicks on ``shuffle deck'' button to shuffle the deck,
randomizing the order in which it will be displayed.}
\item
{The Client displays a change in card ordering.}
\item
{System reorders cards' study order.}
\end{enumerate}
\end{description}
{}
\newpage
{}
\subsection{[D2] Viewing cards in deck by pull time}
\begin{description}
\item[Description]{The user is able to organize the deck by Flashcards'
pull timestamps.}
\item[Desired Outcome]{The user views the deck in time ascending/descending
order.}
\\
\item[User Goals]{To organize the card for easier editing purpose.}
\item[Primary Actor]{User (student)}
\item[Dependency Use Cases]{View by pull timestamp.}
\\
\item[Priority Level]{``Must''}
\item[Status]{In Progress}
\item[Pre-conditions]
\begin{itemize}
\itemsep1pt\parskip0pt\parsep0pt
\item
{User has an account with the application.}
\item
{User is logged in.}
\item
{User has a deck with at least 1 flashcard.}
\item
{User is at the deck view for a class.}
\end{itemize}
\item[Post-conditions]
\begin{itemize}
\itemsep1pt\parskip0pt\parsep0pt
\item
{Cards in the deck are in time order.}
\end{itemize}
\item[Trigger]{User selects organize by add time.}
\item[Workflow]
\begin{enumerate}
\itemsep1pt\parskip0pt\parsep0pt
\item
{The Client shows the user the Deck View.}
\item
{The User shall select the option to sort the deck by ascending time.}
\item
{The Client shall submit a form POST request to the server at
/api/deck/ about the order}
\item
{The Server shall return the ordered view of the deck.}
\item
{The Client displays the cards in the ascending view of the pull
time.}
\end{enumerate}
{}
{Alternate WorkFlow:}
\begin{enumerate}
\itemsep1pt\parskip0pt\parsep0pt
\item
{The Client shows the user the Deck View.}
\item
{The User shall select the option to sort the deck by descending
time.}
\item
{The Client shall submit a form POST request to the server at
/api/deck/ about the order}
\item
{The Server shall return the descending view of the deck.}
\item
{The Client displays the cards in the descending view of the pull
time.}
\end{enumerate}
\end{description}
\newpage
{}
\section{Review}
\subsection{[R1] Study Deck}
\begin{description}
\item[Description]{The User shall be able to look at the cards in his/her
deck in order to study them}
\item[Desired Outcome]{The User shall be presented with individual
flashcards in an optimized order. Blanks will be empty and the user will
have a text boxes to fill in.}
\\
\item[User Goals]{The user shall be able to study all flashcards in his/her
deck from the appropriate class.}
\item[Primary Actor]{User (student)}
\item[Dependency Use Cases]{{[}F1{]}}
\\
\item[Priority Level]{``Must''}
\item[Status]{Not Implemented}
\item[Pre-conditions]
\begin{itemize}
\itemsep1pt\parskip0pt\parsep0pt
\item
{User is logged in}
\item
{User has added cards to his/her deck}
\end{itemize}
\item[Post-conditions]{}
\begin{itemize}
\itemsep1pt\parskip0pt\parsep0pt
\item
{User shall see a single card with blanks.}
\end{itemize}
\begin{itemize}
\itemsep1pt\parskip0pt\parsep0pt
\item
{User shall be presented with text boxes to fill in}
\end{itemize}
\item[Trigger]{User wishes to study flashcards compiled for a specific class.}
\item[Workflow]
\begin{enumerate}
\itemsep1pt\parskip0pt\parsep0pt
\item
{The User shall view a class.}
\item
{The User shall click on the button ``Study Deck''.}
\item
{The Client shall send POST request to the Server for a flashcard (ordering
based on a hidden algorithm).}
\item
{The Client shall display the Study View to the User with blanks to fill in.}
\item
{The User shall fill in the blanks.}
\item
{The Client shall send the User's response back to the Server in POST.}
\item
{The Server shall inform the Client of how correct the User's repsonse was.}
\item
{The Client shall display said results to User.}
\item
{The Client shall produce two buttons for the User, indicating whether or
not the card was answered correctly based on the provided results.}
\item
{The User shall select their desired response.}
\item
{The Client shall relay response to server in a POST request.}
\item
{The Server saves the response and updates statistics about the
flashcard.}
\item
{Loop back to 3.}
\end{enumerate}
\end{description}
\newpage
{}
\subsection{[R2] Review Notification}
\begin{description}
\item[Description]{The User shall be notified when to review each specific
card}
\item[Desired Outcome]{The User shall receive a notification when it is
time to review a specific card using a spaced repetition formula}
\\
\item[User Goals]{The user shall see the notification and which card needs
to be reviewed}
\item[Primary Actor]{User (student)}
\item[Dependency Use Cases]{{[}A1{]}, {[}A2{]}}
\\
\item[Priority Level]{``Must''}
\item[Status]{Not Implemented}
\item[Pre-conditions]
\begin{itemize}
\itemsep1pt\parskip0pt\parsep0pt
\item
{User has an account with the system. }
\item
{User is logged in.}
\item
{User has cards in his/her deck.}
\end{itemize}
\item[Post-conditions]{}
\begin{itemize}
\itemsep1pt\parskip0pt\parsep0pt
\item
{System shall calculate when to next present the card based on a
memory decay formula.}
\item
{User shall be notified.}
\end{itemize}
\item[Trigger]{The delay time for a card to be shown has passed}
\item[Workflow]
\begin{enumerate}
\itemsep1pt\parskip0pt\parsep0pt
\item
{The Server analyzes a User's flashcard's statistics and when they
last reviewed the card to determine when to send the flashcard
notification.}
\item
{The Server shall send a notification to the User at the specified
review time.}
\item
{The Client receives a ``Review Flashcard'' notification.}
\item
{The Client displays a notification n Sidebar that allows the
User to study the specified flashcards in the queue.}
\end{enumerate}
\end{description}
\newpage
{}
\subsection{[R3] Configure Account Notifications}
\begin{description}
\item[Description]{The User shall be able to turn notifications on or off
at will}
\item[Desired Outcome]{The User shall only receive notifications at the
times that were specified}
\\
\item[User Goals]{The User shall not be bothered needlessly or at
inconvenient times}
\item[Primary Actor]{User (student)}
\item[Dependency Use Cases]{\ldots{}}
\\
\item[Priority Level]{``Must''}
\item[Status]{Not Implemented}
\item[Pre-conditions]
\begin{itemize}
\itemsep1pt\parskip0pt\parsep0pt
\item
{User has a verified account}
\item
{User is at application's home screen}
\end{itemize}
\item[Post-conditions]{}
\begin{itemize}
\itemsep1pt\parskip0pt\parsep0pt
\item
{User only receive notifications at specified times}
\end{itemize}
\item[Trigger]{User indicates that they want to change their notification
settings}
\item[Workflow]
\begin{enumerate}
\itemsep1pt\parskip0pt\parsep0pt
\item
{User selects ``Account Settings'' button from a header.}
\item
{The Client displays a settings screen.}
\item
{User shall modify notifications and settings as seen fit.}
\item
{User shall click ``Save Settings'' button.}
\item
{Client shall display a message confirming the settings are saved.}
\item
{System shall save notification settings to the user's attributes.}
\end{enumerate}
\end{description}
\end{document}