| j | 1c53f82 | 2020-06-07 15:32:06 -0700 | [diff] [blame] | 1 | <!DOCTYPE html> |
| 2 | <html lang="en"> |
| 3 | <head> |
| 4 | <meta charset="utf-8"> |
| 5 | <title>JSDoc: Source: assignments.js</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">Source: assignments.js</h1> |
| 21 | |
| 22 | |
| 23 | |
| 24 | |
| 25 | |
| 26 | |
| 27 | <section> |
| 28 | <article> |
| 29 | <pre class="prettyprint source linenums"><code>/** |
| 30 | * @file DTPS assignment functions |
| 31 | * @author jottocraft |
| 32 | * |
| 33 | * @copyright Copyright (c) 2018-2020 jottocraft. All rights reserved. |
| 34 | * @license GPL-2.0-only |
| 35 | */ |
| 36 | |
| 37 | |
| 38 | /** |
| 39 | * Renders HTML for an assignment item in a list |
| 40 | * |
| 41 | * @param {Assignment} assignment The assignment object to render |
| 42 | * @todo Add support for points/letter scores |
| 43 | * @return {string} Assignment HTML for use in a list |
| 44 | */ |
| 45 | dtps.renderAssignment = function (assignment) { |
| 46 | var scoreHTML = ""; |
| 47 | //Render points/letter score |
| 48 | |
| 49 | //Use rubric score over points score if possible |
| 50 | if (assignment.rubric) { |
| 51 | var rubricHTML = []; |
| 52 | |
| 53 | assignment.rubric.forEach(rubricItem => { |
| 54 | if (rubricItem.score) { |
| 55 | rubricHTML.push(/*html*/` |
| 56 | <div title="${rubricItem.title}" style="color: ${rubricItem.color || "var(--text)"};"> |
| 57 | ${rubricItem.score} |
| 58 | </div> |
| 59 | `); |
| 60 | } |
| 61 | }); |
| 62 | |
| 63 | scoreHTML = `<div class="dtpsRubricScore">${rubricHTML.join("")}</div>`; |
| 64 | } |
| 65 | |
| 66 | var HTML = /*html*/` |
| 67 | <div |
| 68 | onclick="${`dtps.assignment('` + assignment.id + `', ` + assignment.class + `)`}" |
| 69 | class="card graded assignment" |
| 70 | style="${'--classColor: ' + dtps.classes[assignment.class].color}" |
| 71 | > |
| 72 | |
| 73 | <!-- Color bar for the dashboard --> |
| 74 | <div class="colorBar"></div> |
| 75 | |
| 76 | <!-- Assignment title and points --> |
| 77 | <h4> |
| 78 | ${assignment.title} |
| 79 | |
| 80 | <!-- Points display --> |
| 81 | <div class="points"> |
| 82 | ${scoreHTML} |
| 83 | </div> |
| 84 | </h4> |
| 85 | |
| 86 | <h5 style="white-space: nowrap; overflow: hidden;"> |
| 87 | <!-- Assignment info --> |
| 88 | ${assignment.dueAt ? `<div class="infoChip"><i style="margin-top: -2px;" class="material-icons">alarm</i> Due ` + dtps.formatDate(assignment.dueAt) + `</div>` : ""} |
| 89 | ${assignment.outcomes ? `<div class="infoChip weighted"><i class="material-icons">adjust</i>` + assignment.outcomes.length + `</div>` : ""} |
| 90 | ${assignment.category ? `<div class="infoChip weighted"><i class="material-icons">category</i> ` + assignment.category + `</div>` : ""} |
| 91 | |
| 92 | <!-- Status icons --> |
| 93 | ${assignment.turnedIn ? `<i title="Assignment submitted" class="material-icons statusIcon" style="color: #0bb75b;">assignment_turned_in</i>` : ``} |
| 94 | ${assignment.missing ? `<i title="Assignment is missing" class="material-icons statusIcon" style="color: #c44848;">remove_circle_outline</i>` : ``} |
| 95 | ${assignment.late ? `<i title="Assignment is late" class="material-icons statusIcon" style="color: #c44848;">assignment_late</i>` : ``} |
| 96 | ${assignment.locked ? `<i title="Assignment submissions are locked" class="material-icons statusIcon" style="font-family: 'Material Icons Extended'; color: var(--secText, gray);">lock_outline</i>` : ``} |
| 97 | ${assignment.pending ? `<i title="Grade is pending review" class="material-icons statusIcon" style="color: #b3b70b;">rate_review</i>` : ``} |
| 98 | </h5> |
| 99 | </div> |
| 100 | `; |
| 101 | |
| 102 | return HTML; |
| 103 | } |
| 104 | |
| 105 | /** |
| 106 | * Renders the DTPS dashboard and calls dtps.renderCalendar, dtps.renderUpdates, and dtps.renderUpcoming |
| 107 | */ |
| 108 | dtps.masterStream = function () { |
| 109 | //Ensure classes are rendered in the sidebar |
| 110 | dtps.presentClass("dash"); |
| 111 | dtps.showClasses(); |
| 112 | |
| 113 | //Count amount of classes that are loaded |
| 114 | var ready = 0; |
| 115 | dtps.classes.forEach(course => { |
| 116 | if (course.assignments) ready++; |
| 117 | }); |
| 118 | |
| 119 | //Check if all classes are loaded |
| 120 | var doneLoading = ready == dtps.classes.length; |
| 121 | |
| 122 | //Returns dashboard item container HTML for an item |
| 123 | function dashboardContainerHTML(dashboardItem) { |
| 124 | if (dashboardItem.id == "dtps.calendar") { |
| 125 | return $.fullCalendar !== undefined ? `<div id="calendar" class="card" style="padding: 20px;"></div>` : ""; |
| 126 | } else if (dashboardItem.id == "dtps.updates") { |
| 127 | return `<div class="updatesStream recentlyGraded announcements"></div>`; |
| 128 | } else if (dashboardItem.id == "dtps.dueToday") { |
| 129 | return `<div style="padding: 20px 0px;" class="dueToday"></div>`; |
| 130 | } else if (dashboardItem.id == "dtps.upcoming") { |
| 131 | return `<div style="padding: 20px 0px;" class="assignmentStream"></div>`; |
| 132 | } |
| 133 | } |
| 134 | |
| 135 | //Render HTML with loading placeholder |
| 136 | if (dtps.selectedClass == "dash") { |
| 137 | jQuery(".classContent").html(/*html*/` |
| 138 | <div class="dash cal" style="width: 40%;display: inline-block; vertical-align: top;"> |
| 139 | ${dtps.leftDashboard.map(dashboardItem => { |
| 140 | return dashboardContainerHTML(dashboardItem); |
| 141 | }).join("")} |
| 142 | </div> |
| 143 | |
| 144 | <div style="width: 59%; display: inline-block;" class="dash stream"> |
| 145 | ${!doneLoading ? `<div style="margin: 75px 25px 10px 75px;"><div class="spinner"></div></div>` : ""} |
| 146 | ${dtps.rightDashboard.map(dashboardItem => { |
| 147 | return dashboardContainerHTML(dashboardItem); |
| 148 | }).join("")} |
| 149 | </div> |
| 150 | `); |
| 151 | } |
| 152 | |
| 153 | //Render updates stream |
| 154 | dtps.renderUpdates(); |
| 155 | |
| 156 | //Render upcoming assignments stream |
| 157 | dtps.renderUpcoming(); |
| 158 | |
| 159 | //Render calendar |
| 160 | dtps.calendar(); |
| 161 | |
| 162 | //Render due today |
| 163 | dtps.renderDueToday(); |
| 164 | } |
| 165 | |
| 166 | /** |
| 167 | * Compiles and displays due today / to-do stream |
| 168 | */ |
| 169 | dtps.renderDueToday = function () { |
| 170 | //Combine class stream arrays |
| 171 | var combinedStream = []; |
| 172 | if (dtps.classes) { |
| 173 | dtps.classes.forEach(course => { |
| 174 | if (course.assignments) { |
| 175 | //If course has assignments, add them to the combined stream array |
| 176 | course.assignments.forEach(assignment => { |
| 177 | //Only assignments that are due today |
| 178 | if (dtps.isToday(assignment.dueAt)) { |
| 179 | combinedStream.push(assignment); |
| 180 | } |
| 181 | }) |
| 182 | } |
| 183 | }) |
| 184 | } |
| 185 | |
| 186 | //Sort combined stream by date |
| 187 | combinedStream.sort(function (a, b) { |
| 188 | var keyA = new Date(a.dueAt).getTime(), |
| 189 | keyB = new Date(b.dueAt).getTime(); |
| 190 | |
| 191 | // Compare the 2 dates |
| 192 | if (keyA > keyB) return 1; |
| 193 | if (keyA < keyB) return -1; |
| 194 | return 0; |
| 195 | }); |
| 196 | |
| 197 | //Get due today stream HTML |
| 198 | var combinedHTML = combinedStream.map(assignment => { |
| 199 | return dtps.renderAssignment(assignment); |
| 200 | }).join(""); |
| 201 | |
| 202 | if (combinedStream.length == 0) { |
| 203 | //Nothing due today |
| 204 | combinedHTML = `<p style="text-align: center;margin: 10px 25px 10px 75px; font-size: 18px;"><i class="material-icons">done</i> Nothing due today</p>`; |
| 205 | } else { |
| 206 | //Add header |
| 207 | combinedHTML = /*html*/` |
| 208 | <h5 style="text-align: center; margin: 10px 25px 10px 75px; font-weight: bold;">Due today</h5> |
| 209 | ` + combinedHTML; |
| 210 | } |
| 211 | |
| 212 | if (dtps.selectedClass == "dash") { |
| 213 | jQuery(".classContent .dash .dueToday").html(combinedHTML); |
| 214 | } |
| 215 | } |
| 216 | |
| 217 | /** |
| 218 | * Compiles and displays upcoming assignments stream |
| 219 | */ |
| 220 | dtps.renderUpcoming = function () { |
| 221 | //Combine class stream arrays |
| 222 | var combinedStream = []; |
| 223 | if (dtps.classes) { |
| 224 | dtps.classes.forEach(course => { |
| 225 | if (course.assignments) { |
| 226 | //If course has assignments, add them to the combined stream array |
| 227 | course.assignments.forEach(assignment => { |
| 228 | //Only include upcoming assignments that aren't due today |
| 229 | if ((new Date(assignment.dueAt) > new Date()) && !dtps.isToday(assignment.dueAt)) { |
| 230 | combinedStream.push(assignment); |
| 231 | } |
| 232 | }) |
| 233 | } |
| 234 | }) |
| 235 | } |
| 236 | |
| 237 | //Sort combined stream by date |
| 238 | combinedStream.sort(function (a, b) { |
| 239 | var keyA = new Date(a.dueAt).getTime(), |
| 240 | keyB = new Date(b.dueAt).getTime(); |
| 241 | |
| 242 | // Compare the 2 dates |
| 243 | if (keyA > keyB) return 1; |
| 244 | if (keyA < keyB) return -1; |
| 245 | return 0; |
| 246 | }); |
| 247 | |
| 248 | //Render upcoming assignments stream |
| 249 | var combinedHTML = combinedStream.map(assignment => { |
| 250 | return dtps.renderAssignment(assignment); |
| 251 | }).join(""); |
| 252 | |
| 253 | //No upcoming assignments |
| 254 | if (combinedStream.length == 0) { |
| 255 | combinedHTML = ""; |
| 256 | } |
| 257 | |
| 258 | if (dtps.selectedClass == "dash") { |
| 259 | jQuery(".classContent .dash .assignmentStream").html(combinedHTML); |
| 260 | } |
| 261 | } |
| 262 | |
| 263 | /** |
| 264 | * Renders updates stream (recently graded & announcements) |
| 265 | * |
| 266 | * @todo pending v3 support |
| 267 | */ |
| 268 | dtps.renderUpdates = function () { |
| 269 | /*var context = []; |
| 270 | for (var i = 0; i < dtps.classes.length; i++) { |
| 271 | if (fluid.get("pref-hideClass" + dtps.classes[i].id) !== "true") { |
| 272 | if (!context.length) { context.push("?context_codes[]=course_" + dtps.classes[i].id) } else { context.push("&context_codes[]=course_" + dtps.classes[i].id) } |
| 273 | } |
| 274 | } |
| 275 | dtps.webReq("canvas", "/api/v1/announcements" + context.join(""), function (resp) { |
| 276 | var ann = JSON.parse(resp); |
| 277 | var updates = []; |
| 278 | for (var i = 0; i < ann.length; i++) { |
| 279 | var dtpsClass = null; |
| 280 | for (var ii = 0; ii < dtps.classes.length; ii++) { |
| 281 | if (dtps.classes[ii].id == ann[i].context_code.split("_")[1]) { |
| 282 | dtpsClass = ii; |
| 283 | } |
| 284 | } |
| 285 | updates.push({ |
| 286 | type: "announcement", |
| 287 | date: ann[i].posted_at, |
| 288 | dom: `<div onclick="$(this).toggleClass('open');" style="cursor: pointer; padding: 20px;" class="announcement card color ` + dtps.classes[dtpsClass].col + `"> |
| 289 | <div class="className">` + ann[i].title + `</div>` + ann[i].message + ` |
| 290 | </div> |
| 291 | ` |
| 292 | }); |
| 293 | } |
| 294 | if (dtps.recentlyGraded) { |
| 295 | dtps.recentlyGraded.forEach(grade => { |
| 296 | updates.push({ |
| 297 | type: "grade", |
| 298 | date: grade.date, |
| 299 | dom: `<div onclick="dtps.assignment('` + grade.id + `', '` + grade.class + `')" class="card ` + dtps.classes[grade.class].col + ` recentGrade"> |
| 300 | <div style="float: right; margin-left: 10px;" class="earned outcomes">` + dtps.renderOutcomeScore(grade.rubric).join("") + `</div> |
| 301 | <h5>` + grade.name + `</h5> |
| 302 | <p>Graded at ` + (new Date(grade.date).toDateString().slice(0, -5) + ", " + dtps.ampm(new Date(grade.date))) + `</p> |
| 303 | </div>` |
| 304 | }) |
| 305 | }) |
| 306 | } |
| 307 | updates.sort((a, b) => { |
| 308 | return new Date(b.date) - new Date(a.date); |
| 309 | }) |
| 310 | if ((dtps.selectedClass == "dash") && (dtps.masterContent == "assignments")) { |
| 311 | jQuery(".dash .updatesStream").html(updates.map(update => update.dom).join("")); |
| 312 | } |
| 313 | });*/ |
| 314 | } |
| 315 | |
| 316 | |
| 317 | /** |
| 318 | * Compiles and displays the assignment calendar |
| 319 | */ |
| 320 | dtps.calendar = function () { |
| 321 | if (dtps.selectedClass == "dash") { |
| 322 | //Calendar events array |
| 323 | var calEvents = []; |
| 324 | |
| 325 | //Add assignments from every class to calEvents array |
| 326 | dtps.classes.forEach((course, courseIndex) => { |
| 327 | if (course.assignments) { |
| 328 | //Class has assignments |
| 329 | course.assignments.forEach(assignment => { |
| 330 | calEvents.push({ |
| 331 | title: assignment.title, |
| 332 | start: moment(new Date(assignment.dueAt)).toISOString(true), |
| 333 | allDay: false, |
| 334 | color: course.color, |
| 335 | classNum: courseIndex, |
| 336 | assignmentID: assignment.id |
| 337 | }); |
| 338 | }); |
| 339 | } |
| 340 | }); |
| 341 | |
| 342 | //Render calendar |
| 343 | if ($.fullCalendar !== undefined) { |
| 344 | $('#calendar').fullCalendar({ |
| 345 | events: calEvents, |
| 346 | header: { |
| 347 | left: 'title', |
| 348 | right: 'prev,next' |
| 349 | }, |
| 350 | eventClick: function (calEvent, jsEvent, view) { |
| 351 | dtps.assignment(calEvent.assignmentID, calEvent.classNum); |
| 352 | }, |
| 353 | eventAfterAllRender: function () { |
| 354 | $(".fc-prev-button").html(`<i class="material-icons">keyboard_arrow_left</i>`); |
| 355 | $(".fc-next-button").html(`<i class="material-icons">keyboard_arrow_right</i>`); |
| 356 | } |
| 357 | }); |
| 358 | } |
| 359 | $(".fc-prev-button").html(`<i class="material-icons">keyboard_arrow_left</i>`); |
| 360 | $(".fc-next-button").html(`<i class="material-icons">keyboard_arrow_right</i>`); |
| 361 | |
| 362 | } |
| 363 | } |
| 364 | |
| 365 | /** |
| 366 | * Shows the assignments stream for a class |
| 367 | * |
| 368 | * @param {string} classID The class ID to show assignments for |
| 369 | */ |
| 370 | dtps.classStream = function (classID) { |
| 371 | //Get class index and set as selected class |
| 372 | var classNum = dtps.classes.map(course => course.id).indexOf(classID); |
| 373 | dtps.selectedClass = classNum; |
| 374 | |
| 375 | //Set stream as the selected content |
| 376 | dtps.selectedContent = "stream"; |
| 377 | $("#dtpsTabBar .btn").removeClass("active"); |
| 378 | $("#dtpsTabBar .btn.stream").addClass("active"); |
| 379 | |
| 380 | //Load class color, name, etc. |
| 381 | dtps.presentClass(classNum); |
| 382 | |
| 383 | //Ensure classes are shown in the sidebar |
| 384 | dtps.showClasses(); |
| 385 | |
| 386 | if (classNum == -1) { |
| 387 | //Class does not exist |
| 388 | dtps.error("The selected class doesn't exist", "classNum check failed @ dtps.classStream"); |
| 389 | } |
| 390 | |
| 391 | //Render assignments |
| 392 | if (!dtps.classes[dtps.selectedClass].assignments) { |
| 393 | //Assignments are still loading |
| 394 | jQuery(".classContent").html(`<div class="spinner"></div>`); |
| 395 | } else if (dtps.classes[dtps.selectedClass].assignments.length == 0) { |
| 396 | //This class doesn't have any assignments |
| 397 | $(".classContent").html(`<div style="cursor: auto;" class="card assignment"><h4>No assignments</h4><p>There aren't any assignments in this class yet</p></div>`); |
| 398 | } else { |
| 399 | //Sort assignments |
| 400 | dtps.classes[dtps.selectedClass].assignments.sort(function (a, b) { |
| 401 | var keyA = new Date(a.dueAt).getTime(), |
| 402 | keyB = new Date(b.dueAt).getTime(); |
| 403 | |
| 404 | var now = new Date().getTime(); |
| 405 | |
| 406 | //Put assignments without a due date at the end |
| 407 | if (!a.dueAt) { keyA = 0; } |
| 408 | if (!b.dueAt) { keyB = 0; } |
| 409 | |
| 410 | //Put upcoming assignments at the top |
| 411 | if ((keyA < now) || (keyB < now)) { |
| 412 | // Sort upcoming assignments from earliest -> latest |
| 413 | if (keyA < keyB) return 1; |
| 414 | if (keyA > keyB) return -1; |
| 415 | return 0; |
| 416 | } else { |
| 417 | // Sort old assignments from latest -> earliest |
| 418 | if (keyA > keyB) return 1; |
| 419 | if (keyA < keyB) return -1; |
| 420 | return 0; |
| 421 | } |
| 422 | }); |
| 423 | |
| 424 | //Render assignments |
| 425 | var streamHTML = dtps.classes[dtps.selectedClass].assignments.map(assignment => { |
| 426 | return dtps.renderAssignment(assignment); |
| 427 | }).join(""); |
| 428 | |
| 429 | //Add stream header with class info buttons and search box |
| 430 | streamHTML = dtps.renderClassTools(classNum, "stream") + streamHTML; |
| 431 | |
| 432 | $(".classContent").html(streamHTML); |
| 433 | } |
| 434 | } |
| 435 | |
| 436 | /** |
| 437 | * Shows details for an assignment given the assignment ID and class number |
| 438 | * |
| 439 | * @param {string} id Assignment ID |
| 440 | * @param {number} classNum Assignment class number |
| 441 | * @param {boolean} [submissions] If true, assignment submissions will be shown |
| 442 | * @todo Support numerical grades |
| 443 | */ |
| 444 | dtps.assignment = function (id, classNum, submissions) { |
| 445 | //Get assignment from the id prop |
| 446 | var assignmentIDs = dtps.classes[classNum].assignments.map(assignment => assignment.id); |
| 447 | var assignment = dtps.classes[classNum].assignments[assignmentIDs.indexOf(id)]; |
| 448 | |
| 449 | if (submissions) { |
| 450 | //Render assignment submissions |
| 451 | $(".card.details").css("background-color", "white"); |
| 452 | $(".card.details").css("color", "black") |
| 453 | $(".card.details").html(`<i style="color: black !important;" onclick="fluid.cards.close('.card.details')" class="material-icons close">close</i> |
| 454 | <i style="left: 0; right: auto; color: black !important;" onclick="dtps.assignment(` + id + `, ` + classNum + `)" class="material-icons close">arrow_back</i> |
| 455 | <br /><br /> |
| 456 | <iframe style="width: 100%; height: calc(100vh - 175px); border: none;" src="` + assignment.submissions + `"></iframe> |
| 457 | `); |
| 458 | } else { |
| 459 | //Render assignment |
| 460 | |
| 461 | //The assignment body is rendered in an iFrame to keep its content and styling isolated from the rest of the page |
| 462 | var assignmentBodyURL = null; |
| 463 | if (assignment.body) { |
| 464 | //Get computed background and text color to style the iFrame with |
| 465 | var computedBackgroundColor = getComputedStyle($(".card.details")[0]).getPropertyValue("--cards"); |
| 466 | var computedTextColor = getComputedStyle($(".card.details")[0]).getPropertyValue("--text"); |
| 467 | |
| 468 | //Generate a blob with the assignment body and get its data URL |
| 469 | var blob = new Blob([` |
| 470 | <base target="_blank" /> |
| 471 | <link type="text/css" rel="stylesheet" href="https://cdn.jottocraft.com/CanvasCSS.css" media="screen,projection"/> |
| 472 | <style>body {background-color: ${computedBackgroundColor}; color: ${computedTextColor};</style> |
| 473 | ${assignment.body} |
| 474 | `], { type: 'text/html' }); |
| 475 | assignmentBodyURL = window.URL.createObjectURL(blob); |
| 476 | } |
| 477 | |
| 478 | //Get assignment rubric HTML |
| 479 | var assignmentRubricHTML = ""; |
| 480 | if (assignment.rubric) { |
| 481 | var assignmentRubricHTML = assignment.rubric.map(function (rubricItem) { |
| 482 | return /*html*/` |
| 483 | <div class="dtpsAssignmentRubricItem"> |
| 484 | <h5>${rubricItem.title}</h5> |
| 485 | <div class="score"> |
| 486 | <p style="color: ${rubricItem.color ? rubricItem.color : "var(--secText)"};" class="scoreName"> |
| 487 | ${rubricItem.score ? rubricItem.scoreName || "" : "Not assessed"} |
| 488 | |
| 489 | <div class="points"> |
| 490 | <p class="earned">${rubricItem.score || ""}</p> |
| 491 | <p class="possible">${"/" + rubricItem.value}</p> |
| 492 | </div> |
| 493 | </p> |
| 494 | </div> |
| 495 | </div> |
| 496 | ` |
| 497 | }).join(""); |
| 498 | } |
| 499 | |
| 500 | //Get assignment feedback HTML |
| 501 | var assignmentFeedbackHTML = ""; |
| 502 | if (assignment.feedback) { |
| 503 | var assignmentFeedbackHTML = assignment.feedback.map(feedback => { |
| 504 | return /*html*/` |
| 505 | <div class="dtpsSubmissionComment"> |
| 506 | ${feedback.author ? /*html*/` |
| 507 | <img src="${feedback.author.photoURL}" /> |
| 508 | <h5>${feedback.author.name}</h5> |
| 509 | ` : ``} |
| 510 | |
| 511 | <p>${feedback.comment}</p> |
| 512 | </div> |
| 513 | ` |
| 514 | }).join(""); |
| 515 | } |
| 516 | |
| 517 | //Get assignment score HTML |
| 518 | var scoreHTML = ""; |
| 519 | |
| 520 | //Use rubric score over points score if possible |
| 521 | if (assignment.rubric) { |
| 522 | var rubricHTML = []; |
| 523 | |
| 524 | //Loop over every rubric item to get HTML for each |
| 525 | assignment.rubric.forEach(rubricItem => { |
| 526 | if (rubricItem.score) { |
| 527 | rubricHTML.push(/*html*/` |
| 528 | <div class="assignmentChip" title="${rubricItem.title}" style="color: ${rubricItem.color || "var(--text)"}; font-weight: bold;"> |
| 529 | ${rubricItem.score} |
| 530 | </div> |
| 531 | `); |
| 532 | } |
| 533 | }); |
| 534 | |
| 535 | scoreHTML = rubricHTML.join(""); |
| 536 | } |
| 537 | |
| 538 | //Render assignment details |
| 539 | $(".card.details").html(/*html*/` |
| 540 | <i onclick="fluid.cards.close('.card.details'); $('.card.details').html('');" class="material-icons close">close</i> |
| 541 | |
| 542 | <h4 style="font-weight: bold;">${assignment.title}</h4> |
| 543 | |
| 544 | <div> |
| 545 | ${assignment.dueAt ? `<div class="assignmentChip"><i class="material-icons">alarm</i><span>Due ${dtps.formatDate(assignment.dueAt)}</span></div>` : ""} |
| 546 | ${assignment.turnedIn ? `<div title="Assignment submitted" class="assignmentChip" style="color: #0bb75b"><i class="material-icons">assignment_turned_in</i></div>` : ""} |
| 547 | ${assignment.missing ? `<div title="Assignment is missing" class="assignmentChip" style="color: #c44848"><i class="material-icons">remove_circle_outline</i></div>` : ""} |
| 548 | ${assignment.late ? `<div title="Assignment is late" class="assignmentChip" style="color: #c44848"><i class="material-icons">assignment_late</i></div>` : ""} |
| 549 | ${assignment.locked ? `<div title="Assignment submissions are locked" class="assignmentChip" style="color: var(--secText, gray);"><i style="font-family: 'Material Icons Extended';" class="material-icons">lock_outline</i></div>` : ""} |
| 550 | ${scoreHTML} |
| 551 | </div> |
| 552 | |
| 553 | <div style="margin-top: 20px;" class="assignmentBody"> |
| 554 | ${assignment.body ? `<iframe id="assignmentIframe" onload="dtps.iframeLoad('assignmentIframe')" style="margin: 10px 0px; width: 100%; border: none; outline: none;" src="${assignmentBodyURL}" />` : ""} |
| 555 | </div> |
| 556 | |
| 557 | ${assignment.body ? `<div style="margin: 5px 0px; background-color: var(--darker); height: 1px; width: 100%;" class="divider"></div>` : ""} |
| 558 | |
| 559 | <div style="width: calc(40% - 2px); margin-top: 20px; display: inline-block; overflow: hidden; vertical-align: top;"> |
| 560 | ${assignment.publishedAt ? `<p style="color: var(--secText); margin: 5px 0px;"><i style="vertical-align: middle;" class="material-icons">add_box</i> Published: ${dtps.formatDate(assignment.publishedAt)}</p>` : ""} |
| 561 | ${assignment.dueAt ? `<p style="color: var(--secText); margin: 5px 0px;"><i style="vertical-align: middle;" class="material-icons">alarm</i> Due: ${dtps.formatDate(assignment.dueAt)}</p>` : ""} |
| 562 | ${assignment.value ? `<p style="color: var(--secText); margin: 5px 0px;"><i style="vertical-align: middle;" class="material-icons">bar_chart</i> Point value: ${assignment.value}</p>` : ""} |
| 563 | ${assignment.grade ? `<p style="color: var(--secText); margin: 5px 0px;"><i style="vertical-align: middle;" class="material-icons">assessment</i> Points earned: ${assignment.grade}</p>` : ""} |
| 564 | ${assignment.letter ? `<p style="color: var(--secText); margin: 5px 0px;"><i style="vertical-align: middle;" class="material-icons">font_download</i> Letter grade: ${assignment.letter}</p>` : ""} |
| 565 | ${assignment.category ? `<p style="color: var(--secText); margin: 5px 0px;"><i style="vertical-align: middle;" class="material-icons">category</i> Category: ${assignment.category}</p>` : ""} |
| 566 | ${assignment.rubric ? assignment.rubric.map(function (rubricItem) { return `<p style="color: var(--secText); margin: 5px 0px;"><i style="vertical-align: middle;" class="material-icons">adjust</i> ${rubricItem.title}</p>`; }).join("") : ""} |
| 567 | <p style="color: var(--secText); margin: 5px 0px;"><i style="vertical-align: middle;" class="material-icons">class</i> Class: ${dtps.classes[assignment.class].subject}</p> |
| 568 | <p style="color: var(--secText); margin: 5px 0px;"><i style="vertical-align: middle;" class="material-icons">bug_report</i> Assignment ID: ${assignment.id}</p> |
| 569 | |
| 570 | <br /> |
| 571 | <div class="row"> |
| 572 | <div class="btn small outline" onclick="dtps.assignment('${assignment.id}', ${classNum}, true)"><i class="material-icons">assignment</i> Submissions</div> |
| 573 | <div class="btn small outline" onclick="window.open('${assignment.url}')"><i class="material-icons">open_in_new</i> Open in ${dtpsLMS.shortName || dtpsLMS.name}</div> |
| 574 | </div> |
| 575 | </div> |
| 576 | |
| 577 | <div style="width: calc(60% - 7px); margin-top: 20px; margin-left: 5px; display: inline-block; overflow: hidden; vertical-align: middle;"> |
| 578 | ${assignmentFeedbackHTML} |
| 579 | |
| 580 | ${assignmentRubricHTML} |
| 581 | </div> |
| 582 | `); |
| 583 | } |
| 584 | |
| 585 | //Close other active cards and open the assignment details card |
| 586 | fluid.cards.close(".card.focus"); |
| 587 | fluid.modal(".card.details"); |
| 588 | } |
| 589 | |
| 590 | /** |
| 591 | * Searches the assignment stream for a keyword using Fuse.js |
| 592 | * |
| 593 | * @todo pending v3 support |
| 594 | */ |
| 595 | dtps.search = function () { |
| 596 | alert("This feature has not been implemented yet"); |
| 597 | throw "DTPS v3 IMPLEMENTATION ERR"; |
| 598 | if (dtps.selectedClass == "dash") { |
| 599 | if ($("input.search").val() == "") { |
| 600 | jQuery(".classContent .stream").html(dtps.renderStream(dtps.latestStream, "")) |
| 601 | } else { |
| 602 | jQuery(".classContent .stream").html(dtps.renderStream(dtps.fuse.search($("input.search").val()), $("input.search").val())) |
| 603 | } |
| 604 | $(".card.assignment").addClass("color"); |
| 605 | } else { |
| 606 | if ($("input.search").val() == "") { |
| 607 | jQuery(".classContent").html(dtps.renderStream(dtps.latestStream, "")) |
| 608 | } else { |
| 609 | jQuery(".classContent").html(dtps.renderStream(dtps.fuse.search($("input.search").val()), $("input.search").val())) |
| 610 | } |
| 611 | } |
| 612 | } |
| 613 | |
| 614 | /** |
| 615 | * Fetches module stream for a class |
| 616 | * |
| 617 | * @param {number} num Class number to fetch modules for |
| 618 | * @todo pending v3 support |
| 619 | */ |
| 620 | dtps.moduleStream = function (num) { |
| 621 | alert("This feature has not been implemented yet"); |
| 622 | throw "DTPS v3 IMPLEMENTATION ERR"; |
| 623 | dtps.selectedContent = "moduleStream"; |
| 624 | var moduleRootHTML = dtps.renderClassTools(num, false, true); |
| 625 | if (dtps.selectedContent == "moduleStream") jQuery(".classContent").html(moduleRootHTML + `<div class="spinner"></div>`); |
| 626 | streamData = []; |
| 627 | dtps.webReq("canvas", "/api/v1/courses/" + dtps.classes[num].id + "/modules?include[]=items&include[]=content_details", function (resp) { |
| 628 | dtps.webReq("canvas", "/courses/" + dtps.classes[num].id + "/modules/progressions", function (progResp) { |
| 629 | var data = JSON.parse(resp); |
| 630 | var progData = JSON.parse(progResp); |
| 631 | var collapsed = {}; |
| 632 | for (var i = 0; i < progData.length; i++) { |
| 633 | collapsed[progData[i].context_module_progression.context_module_id] = progData[i].context_module_progression.collapsed; |
| 634 | } |
| 635 | for (var i = 0; i < data.length; i++) { |
| 636 | var subsetData = []; |
| 637 | for (var ii = 0; ii < data[i].items.length; ii++) { |
| 638 | var icon = "star_border"; |
| 639 | if (data[i].items[ii].type == "ExternalTool") icon = "insert_link"; |
| 640 | if (data[i].items[ii].type == "ExternalUrl") icon = "open_in_new"; |
| 641 | if (data[i].items[ii].type == "Assignment") icon = "assignment"; |
| 642 | if (data[i].items[ii].type == "Page") icon = "insert_drive_file"; |
| 643 | if (data[i].items[ii].type == "Discussion") icon = "forum"; |
| 644 | if (data[i].items[ii].type == "Quiz") icon = "assessment"; |
| 645 | if (data[i].items[ii].type == "SubHeader") icon = "format_size"; |
| 646 | var open = `window.open('` + data[i].items[ii].html_url + `')`; |
| 647 | if (data[i].items[ii].type == "ExternalTool") open = `$('#moduleIFrame').attr('src', ''); fluid.cards('.card.moduleURL'); $.getJSON('` + data[i].items[ii].url + `', function (data) { $('#moduleIFrame').attr('src', data.url); });` |
| 648 | if (data[i].items[ii].type == "Assignment") open = `dtps.assignment(` + data[i].items[ii].content_id + `, dtps.selectedClass);` |
| 649 | if (data[i].items[ii].type == "Page") open = `dtps.getPage(dtps.classes[dtps.selectedClass].id, '` + data[i].items[ii].page_url + `', true)` |
| 650 | if (data[i].items[ii].type == "SubHeader") { |
| 651 | subsetData.push(`<h5 style="font-size: 22px;padding: 2px 10px;">` + data[i].items[ii].title + `</h5>`); |
| 652 | } else { |
| 653 | subsetData.push(`<div onclick="` + open + `" style="color: var(--lightText); padding:10px;font-size:17px;border-radius:15px;margin:5px 0;margin-left: ` + (data[i].items[ii].indent * 15) + `px; cursor: pointer;"> |
| 654 | <i class="material-icons" style="vertical-align: middle; margin-right: 10px;">` + icon + `</i>` + data[i].items[ii].title + `</div>`); |
| 655 | } |
| 656 | } |
| 657 | streamData.push(`<div class="card ` + (collapsed[data[i].id] ? "collapsed" : "") + `"> |
| 658 | <h4 style="margin: 5px 2px; font-size: 32px; font-weight: bold;"> |
| 659 | <i onclick="dtps.moduleCollapse(this, '` + dtps.classes[num].id + `', '` + data[i].id + `');" style="cursor: pointer; vertical-align: middle; color:var(--lightText);" class="material-icons collapseIcon">` + (collapsed[data[i].id] ? "keyboard_arrow_right" : "keyboard_arrow_down") + `</i> |
| 660 | ` + data[i].name + `</h4> |
| 661 | <div class="moduleContents" style="padding-top: 10px;"> |
| 662 | ` + subsetData.join("") + ` |
| 663 | </div> |
| 664 | </div>`) |
| 665 | } |
| 666 | if (dtps.selectedContent == "moduleStream") jQuery(".classContent").html(moduleRootHTML + streamData.join("")); |
| 667 | }); |
| 668 | }); |
| 669 | } |
| 670 | |
| 671 | /** |
| 672 | * Collapses a module |
| 673 | * |
| 674 | * @param {Element} ele Element of the module collapse arrow |
| 675 | * @param {string} classID Class ID |
| 676 | * @param {string} modID Module ID of the module to collapse |
| 677 | * @todo pending v3 support |
| 678 | */ |
| 679 | dtps.moduleCollapse = function (ele, classID, modID) { |
| 680 | alert("This feature has not been implemented yet"); |
| 681 | throw "DTPS v3 IMPLEMENTATION ERR"; |
| 682 | $(ele).parents('.card').toggleClass('collapsed'); |
| 683 | if ($(ele).parents('.card').hasClass('collapsed')) { |
| 684 | dtps.webReq("canCOLLAPSE", "/courses/" + classID + "/modules/" + modID + "/collapse", undefined, { collapse: 1, forceLoad: true }) |
| 685 | $(ele).html('keyboard_arrow_right'); |
| 686 | } else { |
| 687 | dtps.webReq("canCOLLAPSE", "/courses/" + classID + "/modules/" + modID + "/collapse", undefined, { collapse: 0, forceLoad: true }) |
| 688 | $(ele).html('keyboard_arrow_down'); |
| 689 | } |
| 690 | |
| 691 | } |
| 692 | |
| 693 | /** |
| 694 | * Gets stream tools HTML (search box, class info, and modules/assignment switcher) |
| 695 | * |
| 696 | * @param {number} num Class number |
| 697 | * @param {string} type Class content these tools are for (e.g. "stream") |
| 698 | * @param {boolean} [modulesSelector] True if the class supports modules |
| 699 | * @return {string} Stream tools HTML |
| 700 | */ |
| 701 | dtps.renderClassTools = function (num, type, modulesSelector) { |
| 702 | return /*html*/` |
| 703 | <div style="position: absolute;display:inline-block;margin: ${modulesSelector ? "82px" : "38px 82px"};"> |
| 704 | |
| 705 | ${dtps.classes[num].teacher ? /*html*/` |
| 706 | <div class="acrylicMaterial" style="border-radius: 20px; display: inline-block; margin-right: 5px;"> |
| 707 | <img src="${dtps.classes[num].teacher.photoURL}" style="width: 40px; height: 40px; border-radius: 50%;vertical-align: middle;"> |
| 708 | <div style="font-size: 16px;display: inline-block;vertical-align: middle;margin: 0px 10px;">${dtps.classes[num].teacher.name}</div> |
| 709 | </div>` : `` |
| 710 | } |
| 711 | |
| 712 | <div onclick="dtps.classInfo(${num})" class="acrylicMaterial" style="border-radius: 50%; height: 40px; width: 40px; text-align: center; display: inline-block; vertical-align: middle; cursor: pointer; margin-right: 3px;"> |
| 713 | <i style="line-height: 40px;" class="material-icons">info</i> |
| 714 | </div> |
| 715 | |
| 716 | ${dtps.classes[num].defaultView == "wiki" ? /*html*/` |
| 717 | <div onclick="dtps.classHome(${num})" class="acrylicMaterial" style="border-radius: 50%; height: 40px; width: 40px; text-align: center; display: inline-block; vertical-align: middle; cursor: pointer;"> |
| 718 | <i style="line-height: 40px;" class="material-icons">home</i> |
| 719 | </div>` : "" |
| 720 | } |
| 721 | |
| 722 | </div> |
| 723 | |
| 724 | ${(type == "modules") || (type == "stream") ? /*html*/` |
| 725 | <div style="text-align: right;${modulesSelector ? "" : "margin-top: 20px;"}"> |
| 726 | |
| 727 | ${type == "stream" ? `<i class="inputIcon material-icons">search</i><input onchange="dtps.search()" class="search inputIcon shadow" placeholder="Search assignments" type="search" />` : ""} |
| 728 | |
| 729 | <br /> |
| 730 | ${modulesSelector ? /*html*/` |
| 731 | <div class="btns row small acrylicMaterial assignmentPicker" style="margin: ${type == "stream" ? `20px 80px 20px 0px !important` : `63px 80px 20px 0px !important`};"> |
| 732 | <button class="btn ${type == "stream" ? "active" : ""}" onclick="dtps.classStream(dtps.selectedClass);"><i class="material-icons">assignment</i>Assignments</button> |
| 733 | <button class="btn ${type == "modules" ? "active" : ""}" onclick="dtps.moduleStream(dtps.selectedClass);"><i class="material-icons">view_module</i>Modules</button> |
| 734 | </div> |
| 735 | ` : ``} |
| 736 | |
| 737 | </div>` : `` |
| 738 | } |
| 739 | `; |
| 740 | } |
| 741 | |
| 742 | /** |
| 743 | * Displays class info & syllabus card |
| 744 | * |
| 745 | * @param {number} num Class number to show info for |
| 746 | */ |
| 747 | dtps.classInfo = function (num) { |
| 748 | if ((dtps.classes[num].syllabus !== "") && dtps.classes[num].syllabus !== null) { |
| 749 | var blob = new Blob([`<base target="_blank" /> <link type="text/css" rel="stylesheet" href="https://cdn.jottocraft.com/CanvasCSS.css" media="screen,projection"/> |
| 750 | <style>body {background-color: ` + getComputedStyle($(".card.details")[0]).getPropertyValue("--cards") + `; color: ` + getComputedStyle($(".card.details")[0]).getPropertyValue("--text") + `}</style>` + dtps.classes[num].syllabus], { type: 'text/html' }); |
| 751 | var newurl = window.URL.createObjectURL(blob); |
| 752 | } |
| 753 | $(".card.details").html(`<i onclick="fluid.cards.close('.card.details')" class="material-icons close">close</i> |
| 754 | <h4 style="font-weight: bold;">` + dtps.classes[num].name + `</h4> |
| 755 | <p style="color: var(--secText)">` + (dtps.classes[num].description ? dtps.classes[num].description : "") + `</p> |
| 756 | <div class="assignmentChip"><i class="material-icons">group</i><span>` + dtps.classes[num].numStudents + ` students</span></div> |
| 757 | <div class="assignmentChip"><i class="material-icons">bug_report</i><span>Class ID: ` + dtps.classes[num].id + `</span></div> |
| 758 | ` + (dtps.classes[num].favorite ? `<div title="Favorited class" class="assignmentChip" style="background-color: #daa520"><i style="color:white;font-family: 'Material Icons Outline'" class="material-icons">star_border</i></div>` : "") + ` |
| 759 | <br /> |
| 760 | <div style="margin-top: 20px;" class="syllabusBody">` + ((dtps.classes[num].syllabus !== "") && dtps.classes[num].syllabus !== null ? `<iframe id="syllabusIframe" onload="dtps.iframeLoad('syllabusIframe')" style="margin: 10px 0px; width: 100%; border: none; outline: none;" src="` + newurl + `" />` : "") + `</div> |
| 761 | `) |
| 762 | fluid.modal(".card.details") |
| 763 | } |
| 764 | |
| 765 | /** |
| 766 | * Displays the class homepage |
| 767 | * |
| 768 | * @param {number} num Class number to show the homepage for |
| 769 | */ |
| 770 | dtps.classHome = function (num) { |
| 771 | //Render loading screen |
| 772 | $(".card.details").html(/*html*/` |
| 773 | <i onclick="fluid.cards.close('.card.details')" class="material-icons close">close</i> |
| 774 | <h4 style="font-weight: bold;">${dtps.classes[num].subject} Homepage</h4> |
| 775 | |
| 776 | <br /> |
| 777 | <p>Loading...</p> |
| 778 | `); |
| 779 | |
| 780 | dtps.webReq("canvas", "/api/v1/courses/" + dtps.classes[num].id + "/front_page", function (resp) { |
| 781 | var data = JSON.parse(resp); |
| 782 | if (!data.message) { |
| 783 | var blob = new Blob([`<base target="_blank" /> <link type="text/css" rel="stylesheet" href="https://cdn.jottocraft.com/CanvasCSS.css" media="screen,projection"/> |
| 784 | <style>body {background-color: ` + getComputedStyle($(".card.details")[0]).getPropertyValue("--cards") + `; color: ` + getComputedStyle($(".card.details")[0]).getPropertyValue("--text") + `}</style>` + data.body], { type: 'text/html' }); |
| 785 | var newurl = window.URL.createObjectURL(blob); |
| 786 | $(".card.details").html(`<i onclick="fluid.cards.close('.card.details')" class="material-icons close">close</i> |
| 787 | <h4 style="font-weight: bold;">` + data.title + `</h4> |
| 788 | <br /> |
| 789 | <div style="margin-top: 20px;" class="homepageBody"><iframe id="homepageIframe" onload="dtps.iframeLoad('homepageIframe')" style="margin: 10px 0px; width: 100%; border: none; outline: none;" src="` + newurl + `" /></div> |
| 790 | `) |
| 791 | fluid.modal(".card.details") |
| 792 | } else { |
| 793 | alert("Error: No homepage found for this class") |
| 794 | fluid.cards.close('.card.details') |
| 795 | } |
| 796 | }) |
| 797 | } |
| 798 | |
| 799 | //Fluid UI screen definitions |
| 800 | fluid.externalScreens.dashboard = () => { |
| 801 | dtps.masterStream(); |
| 802 | } |
| 803 | |
| 804 | fluid.externalScreens.stream = (courseID) => { |
| 805 | dtps.classStream(courseID); |
| 806 | } |
| 807 | |
| 808 | //Type definitions |
| 809 | |
| 810 | /** |
| 811 | * @typedef {Object} Assignment |
| 812 | * @description Defines assignments objects in DTPS |
| 813 | * @property {string} title Title of the assignment |
| 814 | * @property {string} [body] HTML of the assignment's body |
| 815 | * @property {string} id Assignment ID |
| 816 | * @property {Date} [dueAt] Assignment due date |
| 817 | * @property {string} url Assignment URL |
| 818 | * @property {AssignmentFeedback[]} [feedback] Feedback / private comments for this assignment |
| 819 | * @property {User} [grader] Assignment grader |
| 820 | * @property {boolean} [turnedIn] True if the assignment is turned in |
| 821 | * @property {boolean} [late] True if the assignment is late |
| 822 | * @property {boolean} [missing] True if the assignment is missing |
| 823 | * @property {boolean} [locked] True if assignment submissions are locked |
| 824 | * @property {string} [category] Assignment category |
| 825 | * @property {Date} [publishedAt] Date for when the assignment was published |
| 826 | * @property {Date} [gradedAt] Date for when the assignment was graded |
| 827 | * @property {number} [grade] Points earned on this assignment |
| 828 | * @property {string} [letter] Letter grade on this assignment |
| 829 | * @property {number} [value] Total amount of points possible for this assignment |
| 830 | * @property {RubricItem[]} [rubric] Assignment rubric |
| 831 | */ |
| 832 | |
| 833 | /** |
| 834 | * @typedef {Object} AssignmentFeedback |
| 835 | * @description Defines assignment feedback objects in DTPS |
| 836 | * @property {string} comment Feedback comment |
| 837 | * @property {User} [author] Feedback author |
| 838 | */ |
| 839 | |
| 840 | /** |
| 841 | * @typedef {Object} RubricItem |
| 842 | * @description Defines rubric item objects in DTPS |
| 843 | * @property {string} title Title of the rubric item |
| 844 | * @property {string} id Rubric item ID (does NOT have to be unique) |
| 845 | * @property {number} value Total amount of points possible |
| 846 | * @property {string} [outcome] The ID of the outcome this rubric item is assessing. This is only used for grade calculation. |
| 847 | * @property {string} [description] Rubric item description |
| 848 | * @property {number} [score] Rubric assessment score in points |
| 849 | * @property {string} [scoreName] Rubric assessment score name |
| 850 | * @property {string} [scoreColor] Score color in CSS color format |
| 851 | */ |
| 852 | |
| 853 | /** |
| 854 | * @typedef {Object} DashboardItem |
| 855 | * @description Defines dashboard items in DTPS |
| 856 | * @property {string} name Dashbord item name |
| 857 | * @property {string} id Unique dashboard item ID |
| 858 | * @property {string} icon Dashboard item icon |
| 859 | * @property {boolean} supportsCompactMode True if this dashboard item supports compact mode |
| 860 | * @property {number} size The approximate size of this dashboard item relative to other dashboard items. Should be no less than 20. |
| 861 | * @property {string} defaultSide The default side of this dashboard item. Either "right" or "left". |
| 862 | * @property {boolean} compact True if the user has turned on compact mode for this item. |
| 863 | */</code></pre> |
| 864 | </article> |
| 865 | </section> |
| 866 | |
| 867 | |
| 868 | |
| 869 | |
| 870 | </div> |
| 871 | |
| 872 | <nav> |
| 873 | <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> |
| 874 | </nav> |
| 875 | |
| 876 | <br class="clear"> |
| 877 | |
| 878 | <footer> |
| 879 | Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.4</a> on Sun Jun 07 2020 14:02:58 GMT-0700 (Pacific Daylight Time) |
| 880 | </footer> |
| 881 | |
| 882 | <script> prettyPrint(); </script> |
| 883 | <script src="scripts/linenumber.js"> </script> |
| 884 | </body> |
| 885 | </html> |