| 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: Namespace: gradeCalc</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: gradeCalc</h1> | ||||
| 21 | |||||
| 22 | |||||
| 23 | |||||
| 24 | |||||
| 25 | |||||
| 26 | |||||
| 27 | <section> | ||||
| 28 | |||||
| 29 | <header> | ||||
| 30 | |||||
| 31 | <h2> | ||||
| 32 | <span class="ancestors"><a href="dtps.html">dtps</a>.</span>gradeCalc</h2> | ||||
| 33 | |||||
| 34 | |||||
| 35 | </header> | ||||
| 36 | |||||
| 37 | <article> | ||||
| 38 | <div class="container-overview"> | ||||
| 39 | |||||
| 40 | |||||
| 41 | <div class="description">Grade calculation object for DTPS</div> | ||||
| 42 | |||||
| 43 | |||||
| 44 | |||||
| 45 | |||||
| 46 | |||||
| 47 | <h5 class="subsection-title">Properties:</h5> | ||||
| 48 | |||||
| 49 | |||||
| 50 | |||||
| 51 | <table class="props"> | ||||
| 52 | <thead> | ||||
| 53 | <tr> | ||||
| 54 | |||||
| 55 | <th>Name</th> | ||||
| 56 | |||||
| 57 | |||||
| 58 | <th>Type</th> | ||||
| 59 | |||||
| 60 | |||||
| 61 | |||||
| 62 | |||||
| 63 | |||||
| 64 | <th class="last">Description</th> | ||||
| 65 | </tr> | ||||
| 66 | </thead> | ||||
| 67 | |||||
| 68 | <tbody> | ||||
| 69 | |||||
| 70 | |||||
| 71 | <tr> | ||||
| 72 | |||||
| 73 | <td class="name"><code>letters</code></td> | ||||
| 74 | |||||
| 75 | |||||
| 76 | <td class="type"> | ||||
| 77 | |||||
| 78 | |||||
| 79 | <span class="param-type">Array.<string></span> | ||||
| 80 | |||||
| 81 | |||||
| 82 | |||||
| 83 | </td> | ||||
| 84 | |||||
| 85 | |||||
| 86 | |||||
| 87 | |||||
| 88 | |||||
| 89 | <td class="description last">An array of letters that can be returned from highest -> lowest</td> | ||||
| 90 | </tr> | ||||
| 91 | |||||
| 92 | |||||
| 93 | |||||
| 94 | <tr> | ||||
| 95 | |||||
| 96 | <td class="name"><code>percentageEq</code></td> | ||||
| 97 | |||||
| 98 | |||||
| 99 | <td class="type"> | ||||
| 100 | |||||
| 101 | |||||
| 102 | <span class="param-type">Array.<number></span> | ||||
| 103 | |||||
| 104 | |||||
| 105 | |||||
| 106 | </td> | ||||
| 107 | |||||
| 108 | |||||
| 109 | |||||
| 110 | |||||
| 111 | |||||
| 112 | <td class="description last">The percentage equivalent of each letter for visual representations of grades</td> | ||||
| 113 | </tr> | ||||
| 114 | |||||
| 115 | |||||
| 116 | |||||
| 117 | <tr> | ||||
| 118 | |||||
| 119 | <td class="name"><code>params</code></td> | ||||
| 120 | |||||
| 121 | |||||
| 122 | <td class="type"> | ||||
| 123 | |||||
| 124 | |||||
| 125 | <span class="param-type">object</span> | ||||
| 126 | |||||
| 127 | |||||
| 128 | |||||
| 129 | </td> | ||||
| 130 | |||||
| 131 | |||||
| 132 | |||||
| 133 | |||||
| 134 | |||||
| 135 | <td class="description last">Parameters for each type of grade calculation, such as requirements for each criteria</td> | ||||
| 136 | </tr> | ||||
| 137 | |||||
| 138 | |||||
| 139 | </tbody> | ||||
| 140 | </table> | ||||
| 141 | |||||
| 142 | |||||
| 143 | |||||
| 144 | |||||
| 145 | <dl class="details"> | ||||
| 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 | <dt class="tag-source">Source:</dt> | ||||
| 173 | <dd class="tag-source"><ul class="dummy"><li> | ||||
| 174 | <a href="core.js.html">core.js</a>, <a href="core.js.html#line207">line 207</a> | ||||
| 175 | </li></ul></dd> | ||||
| 176 | |||||
| 177 | |||||
| 178 | |||||
| 179 | |||||
| 180 | |||||
| 181 | |||||
| 182 | |||||
| 183 | <dt class="tag-todo">To Do:</dt> | ||||
| 184 | <dd class="tag-todo"> | ||||
| 185 | <ul> | ||||
| 186 | <li>pending v3 support</li> | ||||
| 187 | </ul> | ||||
| 188 | </dd> | ||||
| 189 | |||||
| 190 | </dl> | ||||
| 191 | |||||
| 192 | |||||
| 193 | |||||
| 194 | |||||
| 195 | </div> | ||||
| 196 | |||||
| 197 | |||||
| 198 | |||||
| 199 | |||||
| 200 | |||||
| 201 | |||||
| 202 | |||||
| 203 | |||||
| 204 | |||||
| 205 | |||||
| 206 | |||||
| 207 | |||||
| 208 | |||||
| 209 | |||||
| 210 | |||||
| 211 | |||||
| 212 | <h3 class="subsection-title">Methods</h3> | ||||
| 213 | |||||
| 214 | |||||
| 215 | |||||
| 216 | |||||
| 217 | |||||
| 218 | |||||
| 219 | |||||
| 220 | <h4 class="name" id=".average"><span class="type-signature">(static) </span>average<span class="signature">(array)</span><span class="type-signature"> → {number}</span></h4> | ||||
| 221 | |||||
| 222 | |||||
| 223 | |||||
| 224 | |||||
| 225 | |||||
| 226 | |||||
| 227 | <div class="description"> | ||||
| 228 | A simple average function | ||||
| 229 | </div> | ||||
| 230 | |||||
| 231 | |||||
| 232 | |||||
| 233 | |||||
| 234 | |||||
| 235 | |||||
| 236 | |||||
| 237 | |||||
| 238 | |||||
| 239 | <h5>Parameters:</h5> | ||||
| 240 | |||||
| 241 | |||||
| 242 | <table class="params"> | ||||
| 243 | <thead> | ||||
| 244 | <tr> | ||||
| 245 | |||||
| 246 | <th>Name</th> | ||||
| 247 | |||||
| 248 | |||||
| 249 | <th>Type</th> | ||||
| 250 | |||||
| 251 | |||||
| 252 | |||||
| 253 | |||||
| 254 | |||||
| 255 | <th class="last">Description</th> | ||||
| 256 | </tr> | ||||
| 257 | </thead> | ||||
| 258 | |||||
| 259 | <tbody> | ||||
| 260 | |||||
| 261 | |||||
| 262 | <tr> | ||||
| 263 | |||||
| 264 | <td class="name"><code>array</code></td> | ||||
| 265 | |||||
| 266 | |||||
| 267 | <td class="type"> | ||||
| 268 | |||||
| 269 | |||||
| 270 | <span class="param-type">Array.<number></span> | ||||
| 271 | |||||
| 272 | |||||
| 273 | |||||
| 274 | </td> | ||||
| 275 | |||||
| 276 | |||||
| 277 | |||||
| 278 | |||||
| 279 | |||||
| 280 | <td class="description last">Array of numbers to average</td> | ||||
| 281 | </tr> | ||||
| 282 | |||||
| 283 | |||||
| 284 | </tbody> | ||||
| 285 | </table> | ||||
| 286 | |||||
| 287 | |||||
| 288 | |||||
| 289 | |||||
| 290 | |||||
| 291 | |||||
| 292 | <dl class="details"> | ||||
| 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 | <dt class="tag-source">Source:</dt> | ||||
| 320 | <dd class="tag-source"><ul class="dummy"><li> | ||||
| 321 | <a href="core.js.html">core.js</a>, <a href="core.js.html#line256">line 256</a> | ||||
| 322 | </li></ul></dd> | ||||
| 323 | |||||
| 324 | |||||
| 325 | |||||
| 326 | |||||
| 327 | |||||
| 328 | |||||
| 329 | |||||
| 330 | </dl> | ||||
| 331 | |||||
| 332 | |||||
| 333 | |||||
| 334 | |||||
| 335 | |||||
| 336 | |||||
| 337 | |||||
| 338 | |||||
| 339 | |||||
| 340 | |||||
| 341 | |||||
| 342 | |||||
| 343 | |||||
| 344 | |||||
| 345 | |||||
| 346 | <h5>Returns:</h5> | ||||
| 347 | |||||
| 348 | |||||
| 349 | <div class="param-desc"> | ||||
| 350 | Average of the numbers in the array | ||||
| 351 | </div> | ||||
| 352 | |||||
| 353 | |||||
| 354 | |||||
| 355 | <dl> | ||||
| 356 | <dt> | ||||
| 357 | Type | ||||
| 358 | </dt> | ||||
| 359 | <dd> | ||||
| 360 | |||||
| 361 | <span class="param-type">number</span> | ||||
| 362 | |||||
| 363 | |||||
| 364 | </dd> | ||||
| 365 | </dl> | ||||
| 366 | |||||
| 367 | |||||
| 368 | |||||
| 369 | |||||
| 370 | |||||
| 371 | |||||
| 372 | |||||
| 373 | |||||
| 374 | |||||
| 375 | |||||
| 376 | |||||
| 377 | |||||
| 378 | |||||
| 379 | <h4 class="name" id=".getLetter"><span class="type-signature">(static) </span>getLetter<span class="signature">(allOutcomeAvgs, formula)</span><span class="type-signature"> → {object}</span></h4> | ||||
| 380 | |||||
| 381 | |||||
| 382 | |||||
| 383 | |||||
| 384 | |||||
| 385 | |||||
| 386 | <div class="description"> | ||||
| 387 | Calculates a letter grade from an array of outcome averages | ||||
| 388 | </div> | ||||
| 389 | |||||
| 390 | |||||
| 391 | |||||
| 392 | |||||
| 393 | |||||
| 394 | |||||
| 395 | |||||
| 396 | |||||
| 397 | |||||
| 398 | <h5>Parameters:</h5> | ||||
| 399 | |||||
| 400 | |||||
| 401 | <table class="params"> | ||||
| 402 | <thead> | ||||
| 403 | <tr> | ||||
| 404 | |||||
| 405 | <th>Name</th> | ||||
| 406 | |||||
| 407 | |||||
| 408 | <th>Type</th> | ||||
| 409 | |||||
| 410 | |||||
| 411 | |||||
| 412 | |||||
| 413 | |||||
| 414 | <th class="last">Description</th> | ||||
| 415 | </tr> | ||||
| 416 | </thead> | ||||
| 417 | |||||
| 418 | <tbody> | ||||
| 419 | |||||
| 420 | |||||
| 421 | <tr> | ||||
| 422 | |||||
| 423 | <td class="name"><code>allOutcomeAvgs</code></td> | ||||
| 424 | |||||
| 425 | |||||
| 426 | <td class="type"> | ||||
| 427 | |||||
| 428 | |||||
| 429 | <span class="param-type">Array.<number></span> | ||||
| 430 | |||||
| 431 | |||||
| 432 | |||||
| 433 | </td> | ||||
| 434 | |||||
| 435 | |||||
| 436 | |||||
| 437 | |||||
| 438 | |||||
| 439 | <td class="description last">Array of outcome averages to use for letter grade calculation</td> | ||||
| 440 | </tr> | ||||
| 441 | |||||
| 442 | |||||
| 443 | |||||
| 444 | <tr> | ||||
| 445 | |||||
| 446 | <td class="name"><code>formula</code></td> | ||||
| 447 | |||||
| 448 | |||||
| 449 | <td class="type"> | ||||
| 450 | |||||
| 451 | |||||
| 452 | <span class="param-type">string</span> | ||||
| 453 | |||||
| 454 | |||||
| 455 | |||||
| 456 | </td> | ||||
| 457 | |||||
| 458 | |||||
| 459 | |||||
| 460 | |||||
| 461 | |||||
| 462 | <td class="description last">Formula to use for grade calculation</td> | ||||
| 463 | </tr> | ||||
| 464 | |||||
| 465 | |||||
| 466 | </tbody> | ||||
| 467 | </table> | ||||
| 468 | |||||
| 469 | |||||
| 470 | |||||
| 471 | |||||
| 472 | |||||
| 473 | |||||
| 474 | <dl class="details"> | ||||
| 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 | <dt class="tag-source">Source:</dt> | ||||
| 502 | <dd class="tag-source"><ul class="dummy"><li> | ||||
| 503 | <a href="core.js.html">core.js</a>, <a href="core.js.html#line397">line 397</a> | ||||
| 504 | </li></ul></dd> | ||||
| 505 | |||||
| 506 | |||||
| 507 | |||||
| 508 | |||||
| 509 | |||||
| 510 | |||||
| 511 | |||||
| 512 | </dl> | ||||
| 513 | |||||
| 514 | |||||
| 515 | |||||
| 516 | |||||
| 517 | |||||
| 518 | |||||
| 519 | |||||
| 520 | |||||
| 521 | |||||
| 522 | |||||
| 523 | |||||
| 524 | |||||
| 525 | |||||
| 526 | |||||
| 527 | |||||
| 528 | <h5>Returns:</h5> | ||||
| 529 | |||||
| 530 | |||||
| 531 | <div class="param-desc"> | ||||
| 532 | Letter grade calculation results | ||||
| 533 | </div> | ||||
| 534 | |||||
| 535 | |||||
| 536 | |||||
| 537 | <dl> | ||||
| 538 | <dt> | ||||
| 539 | Type | ||||
| 540 | </dt> | ||||
| 541 | <dd> | ||||
| 542 | |||||
| 543 | <span class="param-type">object</span> | ||||
| 544 | |||||
| 545 | |||||
| 546 | </dd> | ||||
| 547 | </dl> | ||||
| 548 | |||||
| 549 | |||||
| 550 | |||||
| 551 | |||||
| 552 | |||||
| 553 | |||||
| 554 | |||||
| 555 | |||||
| 556 | |||||
| 557 | |||||
| 558 | |||||
| 559 | |||||
| 560 | |||||
| 561 | <h4 class="name" id=".run"><span class="type-signature">(static) </span>run<span class="signature">(outcomes, formula<span class="signature-attributes">opt</span>)</span><span class="type-signature"> → {object}</span></h4> | ||||
| 562 | |||||
| 563 | |||||
| 564 | |||||
| 565 | |||||
| 566 | |||||
| 567 | |||||
| 568 | <div class="description"> | ||||
| 569 | Runs grade calculation | ||||
| 570 | </div> | ||||
| 571 | |||||
| 572 | |||||
| 573 | |||||
| 574 | |||||
| 575 | |||||
| 576 | |||||
| 577 | |||||
| 578 | |||||
| 579 | |||||
| 580 | <h5>Parameters:</h5> | ||||
| 581 | |||||
| 582 | |||||
| 583 | <table class="params"> | ||||
| 584 | <thead> | ||||
| 585 | <tr> | ||||
| 586 | |||||
| 587 | <th>Name</th> | ||||
| 588 | |||||
| 589 | |||||
| 590 | <th>Type</th> | ||||
| 591 | |||||
| 592 | |||||
| 593 | <th>Attributes</th> | ||||
| 594 | |||||
| 595 | |||||
| 596 | |||||
| 597 | |||||
| 598 | <th class="last">Description</th> | ||||
| 599 | </tr> | ||||
| 600 | </thead> | ||||
| 601 | |||||
| 602 | <tbody> | ||||
| 603 | |||||
| 604 | |||||
| 605 | <tr> | ||||
| 606 | |||||
| 607 | <td class="name"><code>outcomes</code></td> | ||||
| 608 | |||||
| 609 | |||||
| 610 | <td class="type"> | ||||
| 611 | |||||
| 612 | |||||
| 613 | <span class="param-type">Array.<object></span> | ||||
| 614 | |||||
| 615 | |||||
| 616 | |||||
| 617 | </td> | ||||
| 618 | |||||
| 619 | |||||
| 620 | <td class="attributes"> | ||||
| 621 | |||||
| 622 | |||||
| 623 | |||||
| 624 | |||||
| 625 | |||||
| 626 | </td> | ||||
| 627 | |||||
| 628 | |||||
| 629 | |||||
| 630 | |||||
| 631 | <td class="description last">Array of outcomes to use for grade calculation</td> | ||||
| 632 | </tr> | ||||
| 633 | |||||
| 634 | |||||
| 635 | |||||
| 636 | <tr> | ||||
| 637 | |||||
| 638 | <td class="name"><code>formula</code></td> | ||||
| 639 | |||||
| 640 | |||||
| 641 | <td class="type"> | ||||
| 642 | |||||
| 643 | |||||
| 644 | <span class="param-type">string</span> | ||||
| 645 | |||||
| 646 | |||||
| 647 | |||||
| 648 | </td> | ||||
| 649 | |||||
| 650 | |||||
| 651 | <td class="attributes"> | ||||
| 652 | |||||
| 653 | <optional><br> | ||||
| 654 | |||||
| 655 | |||||
| 656 | |||||
| 657 | |||||
| 658 | |||||
| 659 | </td> | ||||
| 660 | |||||
| 661 | |||||
| 662 | |||||
| 663 | |||||
| 664 | <td class="description last">Formula to use for grade calculation</td> | ||||
| 665 | </tr> | ||||
| 666 | |||||
| 667 | |||||
| 668 | </tbody> | ||||
| 669 | </table> | ||||
| 670 | |||||
| 671 | |||||
| 672 | |||||
| 673 | |||||
| 674 | |||||
| 675 | |||||
| 676 | <dl class="details"> | ||||
| 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 | <dt class="tag-source">Source:</dt> | ||||
| 704 | <dd class="tag-source"><ul class="dummy"><li> | ||||
| 705 | <a href="core.js.html">core.js</a>, <a href="core.js.html#line268">line 268</a> | ||||
| 706 | </li></ul></dd> | ||||
| 707 | |||||
| 708 | |||||
| 709 | |||||
| 710 | |||||
| 711 | |||||
| 712 | |||||
| 713 | |||||
| 714 | </dl> | ||||
| 715 | |||||
| 716 | |||||
| 717 | |||||
| 718 | |||||
| 719 | |||||
| 720 | |||||
| 721 | |||||
| 722 | |||||
| 723 | |||||
| 724 | |||||
| 725 | |||||
| 726 | |||||
| 727 | |||||
| 728 | |||||
| 729 | |||||
| 730 | <h5>Returns:</h5> | ||||
| 731 | |||||
| 732 | |||||
| 733 | <div class="param-desc"> | ||||
| 734 | Grade calculation results | ||||
| 735 | </div> | ||||
| 736 | |||||
| 737 | |||||
| 738 | |||||
| 739 | <dl> | ||||
| 740 | <dt> | ||||
| 741 | Type | ||||
| 742 | </dt> | ||||
| 743 | <dd> | ||||
| 744 | |||||
| 745 | <span class="param-type">object</span> | ||||
| 746 | |||||
| 747 | |||||
| 748 | </dd> | ||||
| 749 | </dl> | ||||
| 750 | |||||
| 751 | |||||
| 752 | |||||
| 753 | |||||
| 754 | |||||
| 755 | |||||
| 756 | |||||
| 757 | |||||
| 758 | |||||
| 759 | |||||
| 760 | |||||
| 761 | |||||
| 762 | |||||
| 763 | </article> | ||||
| 764 | |||||
| 765 | </section> | ||||
| 766 | |||||
| 767 | |||||
| 768 | |||||
| 769 | |||||
| 770 | </div> | ||||
| 771 | |||||
| 772 | <nav> | ||||
| 773 | <h2><a href="index.html">Home</a></h2><h3>Namespaces</h3><ul><li><a href="dtps.html">dtps</a></li><li><a href="dtps.gradeCalc.html">gradeCalc</a></li><li><a href="dtpsLMS.html">dtpsLMS</a></li></ul><h3><a href="global.html">Global</a></h3> | ||||
| 774 | </nav> | ||||
| 775 | |||||
| 776 | <br class="clear"> | ||||
| 777 | |||||
| 778 | <footer> | ||||
| 779 | Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.4</a> on Fri May 29 2020 18:46:27 GMT-0700 (Pacific Daylight Time) | ||||
| 780 | </footer> | ||||
| 781 | |||||
| 782 | <script> prettyPrint(); </script> | ||||
| 783 | <script src="scripts/linenumber.js"> </script> | ||||
| 784 | </body> | ||||
| 785 | </html> | ||||