blob: 68af1ee361a474cae162d806d5e8d2d2ae97c9d6 [file] [log] [blame]
j1c53f822020-06-07 15:32:06 -07001<!DOCTYPE html>
2<html lang="en">
3<head>
4 <meta charset="utf-8">
5 <title>JSDoc: Namespace: dtpsLMS</title>
6
7 <script src="scripts/prettify/prettify.js"> </script>
8 <script src="scripts/prettify/lang-css.js"> </script>
9 <!--[if lt IE 9]>
10 <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
11 <![endif]-->
12 <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
13 <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
14</head>
15
16<body>
17
18<div id="main">
19
20 <h1 class="page-title">Namespace: dtpsLMS</h1>
21
22
23
24
25
26
27<section>
28
29<header>
30
31 <h2>dtpsLMS</h2>
32
33
34</header>
35
36<article>
37 <div class="container-overview">
38
39
40 <div class="description">Global DTPS LMS integration object. All LMS-related tasks, such as fetching data, are handled by this object. This is always loaded first. Please read the guide docs for instructions on implementing a custom LMS.</div>
41
42
43
44
45
46 <h5 class="subsection-title">Properties:</h5>
47
48
49
50<table class="props">
51 <thead>
52 <tr>
53
54 <th>Name</th>
55
56
57 <th>Type</th>
58
59
60 <th>Attributes</th>
61
62
63
64
65 <th class="last">Description</th>
66 </tr>
67 </thead>
68
69 <tbody>
70
71
72 <tr>
73
74 <td class="name"><code>name</code></td>
75
76
77 <td class="type">
78
79
80<span class="param-type">string</span>
81
82
83
84 </td>
85
86
87 <td class="attributes">
88
89
90
91 </td>
92
93
94
95
96 <td class="description last">Full LMS name</td>
97 </tr>
98
99
100
101 <tr>
102
103 <td class="name"><code>shortName</code></td>
104
105
106 <td class="type">
107
108
109<span class="param-type">string</span>
110
111
112
113 </td>
114
115
116 <td class="attributes">
117
118 &lt;optional><br>
119
120
121
122 </td>
123
124
125
126
127 <td class="description last">Short LMS name</td>
128 </tr>
129
130
131
132 <tr>
133
134 <td class="name"><code>legalName</code></td>
135
136
137 <td class="type">
138
139
140<span class="param-type">string</span>
141
142
143
144 </td>
145
146
147 <td class="attributes">
148
149
150
151 </td>
152
153
154
155
156 <td class="description last">Legal name (or names) to show in the "Welcome to Power+" disclaimer</td>
157 </tr>
158
159
160
161 <tr>
162
163 <td class="name"><code>description</code></td>
164
165
166 <td class="type">
167
168
169<span class="param-type">string</span>
170
171
172
173 </td>
174
175
176 <td class="attributes">
177
178 &lt;optional><br>
179
180
181
182 </td>
183
184
185
186
187 <td class="description last">A short description of the LMS integration provided</td>
188 </tr>
189
190
191
192 <tr>
193
194 <td class="name"><code>logo</code></td>
195
196
197 <td class="type">
198
199
200<span class="param-type">string</span>
201
202
203
204 </td>
205
206
207 <td class="attributes">
208
209
210
211 </td>
212
213
214
215
216 <td class="description last">LMS logo image URL</td>
217 </tr>
218
219
220
221 <tr>
222
223 <td class="name"><code>url</code></td>
224
225
226 <td class="type">
227
228
229<span class="param-type">string</span>
230
231
232
233 </td>
234
235
236 <td class="attributes">
237
238
239
240 </td>
241
242
243
244
245 <td class="description last">URL to the LMS' website</td>
246 </tr>
247
248
249
250 <tr>
251
252 <td class="name"><code>source</code></td>
253
254
255 <td class="type">
256
257
258<span class="param-type">string</span>
259
260
261
262 </td>
263
264
265 <td class="attributes">
266
267
268
269 </td>
270
271
272
273
274 <td class="description last">URL to the LMS integration's source code</td>
275 </tr>
276
277
278
279 <tr>
280
281 <td class="name"><code>institutionSpecific</code></td>
282
283
284 <td class="type">
285
286
287<span class="param-type">boolean</span>
288
289
290
291 </td>
292
293
294 <td class="attributes">
295
296 &lt;optional><br>
297
298
299
300 </td>
301
302
303
304
j35a697e2020-07-24 20:28:00 -0700305 <td class="description last">True if the LMS is designed for a specific institution instead of a broader LMS</td>
j1c53f822020-06-07 15:32:06 -0700306 </tr>
307
308
309
310 <tr>
311
312 <td class="name"><code>preferRubricGrades</code></td>
313
314
315 <td class="type">
316
317
318<span class="param-type">boolean</span>
319
320
321
322 </td>
323
324
325 <td class="attributes">
326
327 &lt;optional><br>
328
329
330
331 </td>
332
333
334
335
336 <td class="description last">True if DTPS should prefer rubric grades for assignments</td>
337 </tr>
338
339
340
341 <tr>
342
343 <td class="name"><code>genericGradebook</code></td>
344
345
346 <td class="type">
347
348
349<span class="param-type">boolean</span>
350
351
352
353 </td>
354
355
356 <td class="attributes">
357
358 &lt;optional><br>
359
360
361
362 </td>
363
364
365
366
367 <td class="description last">True if DTPS should show the generic gradebook. Ignored if dtpsLMS.gradebook defined.</td>
368 </tr>
369
370
371 </tbody>
372</table>
373
374
375
376
377<dl class="details">
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 <dt class="tag-source">Source:</dt>
405 <dd class="tag-source"><ul class="dummy"><li>
j35a697e2020-07-24 20:28:00 -0700406 <a href="core.js.html">core.js</a>, <a href="core.js.html#line1452">line 1452</a>
j1c53f822020-06-07 15:32:06 -0700407 </li></ul></dd>
408
409
410
411
412
413
414
415</dl>
416
417
418
419
420 </div>
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437 <h3 class="subsection-title">Methods</h3>
438
439
440
441
442
443
444
445 <h4 class="name" id=".calculateGrade"><span class="type-signature">(static) </span>calculateGrade<span class="signature">(course, assignments)</span><span class="type-signature"> &rarr; {undefined|object}</span></h4>
446
447
448
449
450
451
452<div class="description">
453 [OPTIONAL] Calculates class grades with a custom grade calculation formula. Used for unique grading systems.
454</div>
455
456
457
458
459
460
461
462
463
464 <h5>Parameters:</h5>
465
466
467<table class="params">
468 <thead>
469 <tr>
470
471 <th>Name</th>
472
473
474 <th>Type</th>
475
476
477
478
479
480 <th class="last">Description</th>
481 </tr>
482 </thead>
483
484 <tbody>
485
486
487 <tr>
488
489 <td class="name"><code>course</code></td>
490
491
492 <td class="type">
493
494
495<span class="param-type"><a href="global.html#Class">Class</a></span>
496
497
498
499 </td>
500
501
502
503
504
505 <td class="description last">Class to calculate grades for [DO NOT USE COURSE.ASSIGNMENTS to access assignments for grade calculation. Use the assignments parameter instead.]</td>
506 </tr>
507
508
509
510 <tr>
511
512 <td class="name"><code>assignments</code></td>
513
514
515 <td class="type">
516
517
518<span class="param-type">Array.&lt;<a href="global.html#Assignment">Assignment</a>></span>
519
520
521
522 </td>
523
524
525
526
527
528 <td class="description last">Assignments used for grade calculation. Use this instead of course.assignments for hypothetical/what-if grade calculation.</td>
529 </tr>
530
531
532 </tbody>
533</table>
534
535
536
537
538
539
540<dl class="details">
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 <dt class="tag-source">Source:</dt>
568 <dd class="tag-source"><ul class="dummy"><li>
j35a697e2020-07-24 20:28:00 -0700569 <a href="core.js.html">core.js</a>, <a href="core.js.html#line1566">line 1566</a>
j1c53f822020-06-07 15:32:06 -0700570 </li></ul></dd>
571
572
573
574
575
576
577
578</dl>
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594<h5>Returns:</h5>
595
596
597<div class="param-desc">
598 The letter grade should be returned in the "letter" property as a string and the percentage in the "grade" property as a number. Other custom properties can be set if they need to be accessed by dtpsLMS.gradebook. Return undefined if there is no grade for the class.
599</div>
600
601
602
603<dl>
604 <dt>
605 Type
606 </dt>
607 <dd>
608
609<span class="param-type">undefined</span>
610|
611
612<span class="param-type">object</span>
613
614
615 </dd>
616</dl>
617
618
619
620
621
622
623
624
625
626
627
628
629
j35a697e2020-07-24 20:28:00 -0700630 <h4 class="name" id=".collapseModule"><span class="type-signature">(static) </span>collapseModule<span class="signature">(classID, moduleID, collapsed)</span><span class="type-signature"> &rarr; {Promise}</span></h4>
631
632
633
634
635
636
637<div class="description">
638 [OPTIONAL] Collapses a module in the LMS
639</div>
640
641
642
643
644
645
646
647
648
649 <h5>Parameters:</h5>
650
651
652<table class="params">
653 <thead>
654 <tr>
655
656 <th>Name</th>
657
658
659 <th>Type</th>
660
661
662
663
664
665 <th class="last">Description</th>
666 </tr>
667 </thead>
668
669 <tbody>
670
671
672 <tr>
673
674 <td class="name"><code>classID</code></td>
675
676
677 <td class="type">
678
679
680<span class="param-type">string</span>
681
682
683
684 </td>
685
686
687
688
689
690 <td class="description last">The ID of the class</td>
691 </tr>
692
693
694
695 <tr>
696
697 <td class="name"><code>moduleID</code></td>
698
699
700 <td class="type">
701
702
703<span class="param-type">string</span>
704
705
706
707 </td>
708
709
710
711
712
713 <td class="description last">The ID of the module to collapse</td>
714 </tr>
715
716
717
718 <tr>
719
720 <td class="name"><code>collapsed</code></td>
721
722
723 <td class="type">
724
725
726<span class="param-type">boolean</span>
727
728
729
730 </td>
731
732
733
734
735
736 <td class="description last">True if the module is collapsed, false otherwise</td>
737 </tr>
738
739
740 </tbody>
741</table>
742
743
744
745
746
747
748<dl class="details">
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 <dt class="tag-source">Source:</dt>
776 <dd class="tag-source"><ul class="dummy"><li>
777 <a href="core.js.html">core.js</a>, <a href="core.js.html#line1498">line 1498</a>
778 </li></ul></dd>
779
780
781
782
783
784
785
786</dl>
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802<h5>Returns:</h5>
803
804
805<div class="param-desc">
806 A promise which resolves when the operation is completed
807</div>
808
809
810
811<dl>
812 <dt>
813 Type
814 </dt>
815 <dd>
816
817<span class="param-type">Promise</span>
818
819
820 </dd>
821</dl>
822
823
824
825
826
827
828
829
830
831
832
833
834
835 <h4 class="name" id=".fetchAnnouncements"><span class="type-signature">(static) </span>fetchAnnouncements<span class="signature">(classID)</span><span class="type-signature"> &rarr; {Promise.&lt;Array.&lt;<a href="global.html#Announcement">Announcement</a>>>}</span></h4>
836
837
838
839
840
841
842<div class="description">
843 [OPTIONAL] Fetches recent announcements for a course from the LMS
844</div>
845
846
847
848
849
850
851
852
853
854 <h5>Parameters:</h5>
855
856
857<table class="params">
858 <thead>
859 <tr>
860
861 <th>Name</th>
862
863
864 <th>Type</th>
865
866
867
868
869
870 <th class="last">Description</th>
871 </tr>
872 </thead>
873
874 <tbody>
875
876
877 <tr>
878
879 <td class="name"><code>classID</code></td>
880
881
882 <td class="type">
883
884
885<span class="param-type">string</span>
886
887
888
889 </td>
890
891
892
893
894
895 <td class="description last">The class ID to fetch announcements for</td>
896 </tr>
897
898
899 </tbody>
900</table>
901
902
903
904
905
906
907<dl class="details">
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 <dt class="tag-source">Source:</dt>
935 <dd class="tag-source"><ul class="dummy"><li>
936 <a href="core.js.html">core.js</a>, <a href="core.js.html#line1508">line 1508</a>
937 </li></ul></dd>
938
939
940
941
942
943
944
945</dl>
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961<h5>Returns:</h5>
962
963
964<div class="param-desc">
965 A promise which resolves to an array of Announcement objects
966</div>
967
968
969
970<dl>
971 <dt>
972 Type
973 </dt>
974 <dd>
975
976<span class="param-type">Promise.&lt;Array.&lt;<a href="global.html#Announcement">Announcement</a>>></span>
977
978
979 </dd>
980</dl>
981
982
983
984
985
986
987
988
989
990
991
992
993
j1c53f822020-06-07 15:32:06 -0700994 <h4 class="name" id=".fetchAssignments"><span class="type-signature">(static) </span>fetchAssignments<span class="signature">(classID)</span><span class="type-signature"> &rarr; {Promise.&lt;Array.&lt;<a href="global.html#Assignment">Assignment</a>>>}</span></h4>
995
996
997
998
999
1000
1001<div class="description">
1002 [REQUIRED] Fetches assignment data for a course from the LMS
1003</div>
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013 <h5>Parameters:</h5>
1014
1015
1016<table class="params">
1017 <thead>
1018 <tr>
1019
1020 <th>Name</th>
1021
1022
1023 <th>Type</th>
1024
1025
1026
1027
1028
1029 <th class="last">Description</th>
1030 </tr>
1031 </thead>
1032
1033 <tbody>
1034
1035
1036 <tr>
1037
1038 <td class="name"><code>classID</code></td>
1039
1040
1041 <td class="type">
1042
1043
1044<span class="param-type">string</span>
1045
1046
1047
1048 </td>
1049
1050
1051
1052
1053
1054 <td class="description last">The class ID to fetch assignments for</td>
1055 </tr>
1056
1057
1058 </tbody>
1059</table>
1060
1061
1062
1063
1064
1065
1066<dl class="details">
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 <dt class="tag-source">Source:</dt>
1094 <dd class="tag-source"><ul class="dummy"><li>
j35a697e2020-07-24 20:28:00 -07001095 <a href="core.js.html">core.js</a>, <a href="core.js.html#line1482">line 1482</a>
j1c53f822020-06-07 15:32:06 -07001096 </li></ul></dd>
1097
1098
1099
1100
1101
1102
1103
1104</dl>
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120<h5>Returns:</h5>
1121
1122
1123<div class="param-desc">
1124 A promise which resolves to an array of Assignment objects
1125</div>
1126
1127
1128
1129<dl>
1130 <dt>
1131 Type
1132 </dt>
1133 <dd>
1134
1135<span class="param-type">Promise.&lt;Array.&lt;<a href="global.html#Assignment">Assignment</a>>></span>
1136
1137
1138 </dd>
1139</dl>
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153 <h4 class="name" id=".fetchClasses"><span class="type-signature">(static) </span>fetchClasses<span class="signature">()</span><span class="type-signature"> &rarr; {Promise.&lt;Array.&lt;<a href="global.html#Class">Class</a>>>}</span></h4>
1154
1155
1156
1157
1158
1159
1160<div class="description">
1161 [REQUIRED] Fetches class data from the LMS
1162</div>
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176<dl class="details">
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 <dt class="tag-source">Source:</dt>
1204 <dd class="tag-source"><ul class="dummy"><li>
j35a697e2020-07-24 20:28:00 -07001205 <a href="core.js.html">core.js</a>, <a href="core.js.html#line1475">line 1475</a>
j1c53f822020-06-07 15:32:06 -07001206 </li></ul></dd>
1207
1208
1209
1210
1211
1212
1213
1214</dl>
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230<h5>Returns:</h5>
1231
1232
1233<div class="param-desc">
1234 A promise which resolves to an array of Class objects
1235</div>
1236
1237
1238
1239<dl>
1240 <dt>
1241 Type
1242 </dt>
1243 <dd>
1244
1245<span class="param-type">Promise.&lt;Array.&lt;<a href="global.html#Class">Class</a>>></span>
1246
1247
1248 </dd>
1249</dl>
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263 <h4 class="name" id=".fetchDiscussionPosts"><span class="type-signature">(static) </span>fetchDiscussionPosts<span class="signature">(classID, threadID)</span><span class="type-signature"> &rarr; {Promise.&lt;Array.&lt;<a href="global.html#DiscussionPost">DiscussionPost</a>>>}</span></h4>
1264
1265
1266
1267
1268
1269
1270<div class="description">
1271 [REQUIRED IF dtpsLMS.fetchDiscussionThreads IS IMPLEMENTED] Fetches discussion posts in a thread from the LMS
1272</div>
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282 <h5>Parameters:</h5>
1283
1284
1285<table class="params">
1286 <thead>
1287 <tr>
1288
1289 <th>Name</th>
1290
1291
1292 <th>Type</th>
1293
1294
1295
1296
1297
1298 <th class="last">Description</th>
1299 </tr>
1300 </thead>
1301
1302 <tbody>
1303
1304
1305 <tr>
1306
1307 <td class="name"><code>classID</code></td>
1308
1309
1310 <td class="type">
1311
1312
1313<span class="param-type">string</span>
1314
1315
1316
1317 </td>
1318
1319
1320
1321
1322
1323 <td class="description last">The class ID to fetch discussion posts for</td>
1324 </tr>
1325
1326
1327
1328 <tr>
1329
1330 <td class="name"><code>threadID</code></td>
1331
1332
1333 <td class="type">
1334
1335
1336<span class="param-type">string</span>
1337
1338
1339
1340 </td>
1341
1342
1343
1344
1345
1346 <td class="description last">The discussion thread ID to fetch discussion posts for</td>
1347 </tr>
1348
1349
1350 </tbody>
1351</table>
1352
1353
1354
1355
1356
1357
1358<dl class="details">
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 <dt class="tag-source">Source:</dt>
1386 <dd class="tag-source"><ul class="dummy"><li>
j35a697e2020-07-24 20:28:00 -07001387 <a href="core.js.html">core.js</a>, <a href="core.js.html#line1532">line 1532</a>
j1c53f822020-06-07 15:32:06 -07001388 </li></ul></dd>
1389
1390
1391
1392
1393
1394
1395
1396</dl>
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412<h5>Returns:</h5>
1413
1414
1415<div class="param-desc">
1416 A promise which resolves to an array of Discussion Post objects
1417</div>
1418
1419
1420
1421<dl>
1422 <dt>
1423 Type
1424 </dt>
1425 <dd>
1426
1427<span class="param-type">Promise.&lt;Array.&lt;<a href="global.html#DiscussionPost">DiscussionPost</a>>></span>
1428
1429
1430 </dd>
1431</dl>
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445 <h4 class="name" id=".fetchDiscussionThreads"><span class="type-signature">(static) </span>fetchDiscussionThreads<span class="signature">(classID)</span><span class="type-signature"> &rarr; {Promise.&lt;Array.&lt;<a href="global.html#DiscussionThread">DiscussionThread</a>>>}</span></h4>
1446
1447
1448
1449
1450
1451
1452<div class="description">
1453 [OPTIONAL] Fetches discussion threads for a course from the LMS
1454</div>
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464 <h5>Parameters:</h5>
1465
1466
1467<table class="params">
1468 <thead>
1469 <tr>
1470
1471 <th>Name</th>
1472
1473
1474 <th>Type</th>
1475
1476
1477
1478
1479
1480 <th class="last">Description</th>
1481 </tr>
1482 </thead>
1483
1484 <tbody>
1485
1486
1487 <tr>
1488
1489 <td class="name"><code>classID</code></td>
1490
1491
1492 <td class="type">
1493
1494
1495<span class="param-type">string</span>
1496
1497
1498
1499 </td>
1500
1501
1502
1503
1504
1505 <td class="description last">The class ID to fetch discussion threads for</td>
1506 </tr>
1507
1508
1509 </tbody>
1510</table>
1511
1512
1513
1514
1515
1516
1517<dl class="details">
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 <dt class="tag-source">Source:</dt>
1545 <dd class="tag-source"><ul class="dummy"><li>
j35a697e2020-07-24 20:28:00 -07001546 <a href="core.js.html">core.js</a>, <a href="core.js.html#line1524">line 1524</a>
j1c53f822020-06-07 15:32:06 -07001547 </li></ul></dd>
1548
1549
1550
1551
1552
1553
1554
1555</dl>
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571<h5>Returns:</h5>
1572
1573
1574<div class="param-desc">
1575 A promise which resolves to an array of Discussion Thread objects
1576</div>
1577
1578
1579
1580<dl>
1581 <dt>
1582 Type
1583 </dt>
1584 <dd>
1585
1586<span class="param-type">Promise.&lt;Array.&lt;<a href="global.html#DiscussionThread">DiscussionThread</a>>></span>
1587
1588
1589 </dd>
1590</dl>
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
j35a697e2020-07-24 20:28:00 -07001604 <h4 class="name" id=".fetchHomepage"><span class="type-signature">(static) </span>fetchHomepage<span class="signature">(classID)</span><span class="type-signature"> &rarr; {Promise.&lt;string>}</span></h4>
1605
1606
1607
1608
1609
1610
1611<div class="description">
1612 [OPTIONAL] Fetches homepage HTML for a course from the LMS
1613</div>
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623 <h5>Parameters:</h5>
1624
1625
1626<table class="params">
1627 <thead>
1628 <tr>
1629
1630 <th>Name</th>
1631
1632
1633 <th>Type</th>
1634
1635
1636
1637
1638
1639 <th class="last">Description</th>
1640 </tr>
1641 </thead>
1642
1643 <tbody>
1644
1645
1646 <tr>
1647
1648 <td class="name"><code>classID</code></td>
1649
1650
1651 <td class="type">
1652
1653
1654<span class="param-type">string</span>
1655
1656
1657
1658 </td>
1659
1660
1661
1662
1663
1664 <td class="description last">The class ID to get the homepage for</td>
1665 </tr>
1666
1667
1668 </tbody>
1669</table>
1670
1671
1672
1673
1674
1675
1676<dl class="details">
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 <dt class="tag-source">Source:</dt>
1704 <dd class="tag-source"><ul class="dummy"><li>
1705 <a href="core.js.html">core.js</a>, <a href="core.js.html#line1516">line 1516</a>
1706 </li></ul></dd>
1707
1708
1709
1710
1711
1712
1713
1714</dl>
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730<h5>Returns:</h5>
1731
1732
1733<div class="param-desc">
1734 A promise which resolves to the HTML for the class homepage
1735</div>
1736
1737
1738
1739<dl>
1740 <dt>
1741 Type
1742 </dt>
1743 <dd>
1744
1745<span class="param-type">Promise.&lt;string></span>
1746
1747
1748 </dd>
1749</dl>
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763 <h4 class="name" id=".fetchModules"><span class="type-signature">(static) </span>fetchModules<span class="signature">(classID)</span><span class="type-signature"> &rarr; {Promise.&lt;Array.&lt;<a href="global.html#Module">Module</a>>>}</span></h4>
1764
1765
1766
1767
1768
1769
1770<div class="description">
1771 [OPTIONAL] Fetches module data for a course from the LMS
1772</div>
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782 <h5>Parameters:</h5>
1783
1784
1785<table class="params">
1786 <thead>
1787 <tr>
1788
1789 <th>Name</th>
1790
1791
1792 <th>Type</th>
1793
1794
1795
1796
1797
1798 <th class="last">Description</th>
1799 </tr>
1800 </thead>
1801
1802 <tbody>
1803
1804
1805 <tr>
1806
1807 <td class="name"><code>classID</code></td>
1808
1809
1810 <td class="type">
1811
1812
1813<span class="param-type">string</span>
1814
1815
1816
1817 </td>
1818
1819
1820
1821
1822
1823 <td class="description last">The class ID to fetch modules for</td>
1824 </tr>
1825
1826
1827 </tbody>
1828</table>
1829
1830
1831
1832
1833
1834
1835<dl class="details">
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 <dt class="tag-source">Source:</dt>
1863 <dd class="tag-source"><ul class="dummy"><li>
1864 <a href="core.js.html">core.js</a>, <a href="core.js.html#line1490">line 1490</a>
1865 </li></ul></dd>
1866
1867
1868
1869
1870
1871
1872
1873</dl>
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889<h5>Returns:</h5>
1890
1891
1892<div class="param-desc">
1893 A promise which resolves to an array of Module objects
1894</div>
1895
1896
1897
1898<dl>
1899 <dt>
1900 Type
1901 </dt>
1902 <dd>
1903
1904<span class="param-type">Promise.&lt;Array.&lt;<a href="global.html#Module">Module</a>>></span>
1905
1906
1907 </dd>
1908</dl>
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
j1c53f822020-06-07 15:32:06 -07001922 <h4 class="name" id=".fetchPageContent"><span class="type-signature">(static) </span>fetchPageContent<span class="signature">(classID, pageID)</span><span class="type-signature"> &rarr; {Promise.&lt;string>}</span></h4>
1923
1924
1925
1926
1927
1928
1929<div class="description">
1930 [REQUIRED IF dtpsLMS.fetchPages IS IMPLEMENTED] Fetches content for a page from the LMS
1931</div>
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941 <h5>Parameters:</h5>
1942
1943
1944<table class="params">
1945 <thead>
1946 <tr>
1947
1948 <th>Name</th>
1949
1950
1951 <th>Type</th>
1952
1953
1954
1955
1956
1957 <th class="last">Description</th>
1958 </tr>
1959 </thead>
1960
1961 <tbody>
1962
1963
1964 <tr>
1965
1966 <td class="name"><code>classID</code></td>
1967
1968
1969 <td class="type">
1970
1971
1972<span class="param-type">string</span>
1973
1974
1975
1976 </td>
1977
1978
1979
1980
1981
1982 <td class="description last">The class ID to fetch page content for</td>
1983 </tr>
1984
1985
1986
1987 <tr>
1988
1989 <td class="name"><code>pageID</code></td>
1990
1991
1992 <td class="type">
1993
1994
1995<span class="param-type">string</span>
1996
1997
1998
1999 </td>
2000
2001
2002
2003
2004
2005 <td class="description last">The page ID to fetch page content for</td>
2006 </tr>
2007
2008
2009 </tbody>
2010</table>
2011
2012
2013
2014
2015
2016
2017<dl class="details">
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044 <dt class="tag-source">Source:</dt>
2045 <dd class="tag-source"><ul class="dummy"><li>
j35a697e2020-07-24 20:28:00 -07002046 <a href="core.js.html">core.js</a>, <a href="core.js.html#line1549">line 1549</a>
j1c53f822020-06-07 15:32:06 -07002047 </li></ul></dd>
2048
2049
2050
2051
2052
2053
2054
2055</dl>
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071<h5>Returns:</h5>
2072
2073
2074<div class="param-desc">
2075 A promise which resolves to the page's content as HTML
2076</div>
2077
2078
2079
2080<dl>
2081 <dt>
2082 Type
2083 </dt>
2084 <dd>
2085
2086<span class="param-type">Promise.&lt;string></span>
2087
2088
2089 </dd>
2090</dl>
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104 <h4 class="name" id=".fetchPages"><span class="type-signature">(static) </span>fetchPages<span class="signature">(classID)</span><span class="type-signature"> &rarr; {Promise.&lt;Array.&lt;<a href="global.html#Page">Page</a>>>}</span></h4>
2105
2106
2107
2108
2109
2110
2111<div class="description">
2112 [OPTIONAL] Fetches pages for a course from the LMS
2113</div>
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123 <h5>Parameters:</h5>
2124
2125
2126<table class="params">
2127 <thead>
2128 <tr>
2129
2130 <th>Name</th>
2131
2132
2133 <th>Type</th>
2134
2135
2136
2137
2138
2139 <th class="last">Description</th>
2140 </tr>
2141 </thead>
2142
2143 <tbody>
2144
2145
2146 <tr>
2147
2148 <td class="name"><code>classID</code></td>
2149
2150
2151 <td class="type">
2152
2153
2154<span class="param-type">string</span>
2155
2156
2157
2158 </td>
2159
2160
2161
2162
2163
2164 <td class="description last">The class ID to fetch pages for</td>
2165 </tr>
2166
2167
2168 </tbody>
2169</table>
2170
2171
2172
2173
2174
2175
2176<dl class="details">
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203 <dt class="tag-source">Source:</dt>
2204 <dd class="tag-source"><ul class="dummy"><li>
j35a697e2020-07-24 20:28:00 -07002205 <a href="core.js.html">core.js</a>, <a href="core.js.html#line1541">line 1541</a>
j1c53f822020-06-07 15:32:06 -07002206 </li></ul></dd>
2207
2208
2209
2210
2211
2212
2213
2214</dl>
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230<h5>Returns:</h5>
2231
2232
2233<div class="param-desc">
2234 A promise which resolves to an array of Page objects
2235</div>
2236
2237
2238
2239<dl>
2240 <dt>
2241 Type
2242 </dt>
2243 <dd>
2244
2245<span class="param-type">Promise.&lt;Array.&lt;<a href="global.html#Page">Page</a>>></span>
2246
2247
2248 </dd>
2249</dl>
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263 <h4 class="name" id=".fetchUser"><span class="type-signature">(static) </span>fetchUser<span class="signature">()</span><span class="type-signature"> &rarr; {Promise.&lt;<a href="global.html#User">User</a>>}</span></h4>
2264
2265
2266
2267
2268
2269
2270<div class="description">
2271 [REQUIRED] Fetches user data from the LMS
2272</div>
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286<dl class="details">
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313 <dt class="tag-source">Source:</dt>
2314 <dd class="tag-source"><ul class="dummy"><li>
j35a697e2020-07-24 20:28:00 -07002315 <a href="core.js.html">core.js</a>, <a href="core.js.html#line1468">line 1468</a>
j1c53f822020-06-07 15:32:06 -07002316 </li></ul></dd>
2317
2318
2319
2320
2321
2322
2323
2324</dl>
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340<h5>Returns:</h5>
2341
2342
2343<div class="param-desc">
2344 A promise which resolves to a User object
2345</div>
2346
2347
2348
2349<dl>
2350 <dt>
2351 Type
2352 </dt>
2353 <dd>
2354
2355<span class="param-type">Promise.&lt;<a href="global.html#User">User</a>></span>
2356
2357
2358 </dd>
2359</dl>
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373 <h4 class="name" id=".gradebook"><span class="type-signature">(static) </span>gradebook<span class="signature">(course)</span><span class="type-signature"> &rarr; {Promise.&lt;string>}</span></h4>
2374
2375
2376
2377
2378
2379
2380<div class="description">
2381 [OPTIONAL] Renders custom gradebook HTML for unique grading systems or for a more tailored experience. The gradebook only shows for classes with a grade and with at least 1 assignment.
2382</div>
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392 <h5>Parameters:</h5>
2393
2394
2395<table class="params">
2396 <thead>
2397 <tr>
2398
2399 <th>Name</th>
2400
2401
2402 <th>Type</th>
2403
2404
2405
2406
2407
2408 <th class="last">Description</th>
2409 </tr>
2410 </thead>
2411
2412 <tbody>
2413
2414
2415 <tr>
2416
2417 <td class="name"><code>course</code></td>
2418
2419
2420 <td class="type">
2421
2422
2423<span class="param-type"><a href="global.html#Class">Class</a></span>
2424
2425
2426
2427 </td>
2428
2429
2430
2431
2432
2433 <td class="description last">Class to render the gradebook for. If custom grade calculation is enabled (dtpsLMS.calculateGrade), those results can be accessed at course.gradeCalculation.</td>
2434 </tr>
2435
2436
2437 </tbody>
2438</table>
2439
2440
2441
2442
2443
2444
2445<dl class="details">
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472 <dt class="tag-source">Source:</dt>
2473 <dd class="tag-source"><ul class="dummy"><li>
j35a697e2020-07-24 20:28:00 -07002474 <a href="core.js.html">core.js</a>, <a href="core.js.html#line1558">line 1558</a>
j1c53f822020-06-07 15:32:06 -07002475 </li></ul></dd>
2476
2477
2478
2479
2480
2481
2482
2483</dl>
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499<h5>Returns:</h5>
2500
2501
2502<div class="param-desc">
2503 A promise which resolves to HTML to render for the class gradebook
2504</div>
2505
2506
2507
2508<dl>
2509 <dt>
2510 Type
2511 </dt>
2512 <dd>
2513
2514<span class="param-type">Promise.&lt;string></span>
2515
2516
2517 </dd>
2518</dl>
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532 <h4 class="name" id=".updateAssignments"><span class="type-signature">(static) </span>updateAssignments<span class="signature">(assignments)</span><span class="type-signature"> &rarr; {Array.&lt;<a href="global.html#Assignment">Assignment</a>>}</span></h4>
2533
2534
2535
2536
2537
2538
2539<div class="description">
2540 [OPTIONAL, INSTITUTION ONLY] This function can be implemented by institution-specific scripts to loop through and override assignment data returned by the LMS.
2541</div>
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551 <h5>Parameters:</h5>
2552
2553
2554<table class="params">
2555 <thead>
2556 <tr>
2557
2558 <th>Name</th>
2559
2560
2561 <th>Type</th>
2562
2563
2564
2565
2566
2567 <th class="last">Description</th>
2568 </tr>
2569 </thead>
2570
2571 <tbody>
2572
2573
2574 <tr>
2575
2576 <td class="name"><code>assignments</code></td>
2577
2578
2579 <td class="type">
2580
2581
2582<span class="param-type">Array.&lt;<a href="global.html#Assignment">Assignment</a>></span>
2583
2584
2585
2586 </td>
2587
2588
2589
2590
2591
2592 <td class="description last">Original assignments array</td>
2593 </tr>
2594
2595
2596 </tbody>
2597</table>
2598
2599
2600
2601
2602
2603
2604<dl class="details">
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631 <dt class="tag-source">Source:</dt>
2632 <dd class="tag-source"><ul class="dummy"><li>
j35a697e2020-07-24 20:28:00 -07002633 <a href="core.js.html">core.js</a>, <a href="core.js.html#line1575">line 1575</a>
j1c53f822020-06-07 15:32:06 -07002634 </li></ul></dd>
2635
2636
2637
2638
2639
2640
2641
2642</dl>
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658<h5>Returns:</h5>
2659
2660
2661<div class="param-desc">
2662 Updated assignments array
2663</div>
2664
2665
2666
2667<dl>
2668 <dt>
2669 Type
2670 </dt>
2671 <dd>
2672
2673<span class="param-type">Array.&lt;<a href="global.html#Assignment">Assignment</a>></span>
2674
2675
2676 </dd>
2677</dl>
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691 <h4 class="name" id=".updateClasses"><span class="type-signature">(static) </span>updateClasses<span class="signature">(classes)</span><span class="type-signature"> &rarr; {Array.&lt;<a href="global.html#Class">Class</a>>}</span></h4>
2692
2693
2694
2695
2696
2697
2698<div class="description">
2699 [OPTIONAL, INSTITUTION ONLY] This function can be implemented by institution-specific scripts to loop through and override class data returned by the LMS.
2700</div>
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710 <h5>Parameters:</h5>
2711
2712
2713<table class="params">
2714 <thead>
2715 <tr>
2716
2717 <th>Name</th>
2718
2719
2720 <th>Type</th>
2721
2722
2723
2724
2725
2726 <th class="last">Description</th>
2727 </tr>
2728 </thead>
2729
2730 <tbody>
2731
2732
2733 <tr>
2734
2735 <td class="name"><code>classes</code></td>
2736
2737
2738 <td class="type">
2739
2740
2741<span class="param-type">Array.&lt;<a href="global.html#Class">Class</a>></span>
2742
2743
2744
2745 </td>
2746
2747
2748
2749
2750
2751 <td class="description last">Original classes array</td>
2752 </tr>
2753
2754
2755 </tbody>
2756</table>
2757
2758
2759
2760
2761
2762
2763<dl class="details">
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790 <dt class="tag-source">Source:</dt>
2791 <dd class="tag-source"><ul class="dummy"><li>
j35a697e2020-07-24 20:28:00 -07002792 <a href="core.js.html">core.js</a>, <a href="core.js.html#line1583">line 1583</a>
j1c53f822020-06-07 15:32:06 -07002793 </li></ul></dd>
2794
2795
2796
2797
2798
2799
2800
2801</dl>
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817<h5>Returns:</h5>
2818
2819
2820<div class="param-desc">
2821 Updated classes array
2822</div>
2823
2824
2825
2826<dl>
2827 <dt>
2828 Type
2829 </dt>
2830 <dd>
2831
2832<span class="param-type">Array.&lt;<a href="global.html#Class">Class</a>></span>
2833
2834
2835 </dd>
2836</dl>
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850</article>
2851
2852</section>
2853
2854
2855
2856
2857</div>
2858
2859<nav>
2860 <h2><a href="index.html">Home</a></h2><h3>Namespaces</h3><ul><li><a href="dtps.html">dtps</a></li><li><a href="dtpsLMS.html">dtpsLMS</a></li></ul><h3><a href="global.html">Global</a></h3>
2861</nav>
2862
2863<br class="clear">
2864
2865<footer>
j35a697e2020-07-24 20:28:00 -07002866 Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.5</a> on Fri Jul 24 2020 19:25:37 GMT-0700 (Pacific Daylight Time)
j1c53f822020-06-07 15:32:06 -07002867</footer>
2868
2869<script> prettyPrint(); </script>
2870<script src="scripts/linenumber.js"> </script>
2871</body>
2872</html>