-
-
Save shorti1996/9ddafed3ff6c5eba395bdc562d183198 to your computer and use it in GitHub Desktop.
Skrypt obliczający średnią ważoną w systemie https://jsos.pwr.edu.pl. Skrypt automatycznie usuwa wpisy z oceną 2.0. Aby obliczyć należy wcisnąć F12 w przeglądarce, otworzyć wkładkę Console i wstawić skrypt. Następnie wcisnąć Enter.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $('td:contains("2.0")').parent().remove(); // usunięcie wpisów z oceną 2 | |
| $('td:contains("---")').parent().remove(); // usunięcie niewystawionych ocen | |
| $('td:contains("(E)")').text((index, text) => text.replace('(E)', '')); // usunięcie tych śmiesznych (E) za egzamin | |
| var sum=0; //suma ECTS | |
| var mulSum=0; // suma ECTS * ocena | |
| $('td[title="ocena"]').each(function(){ | |
| mulSum += parseFloat($(this).text()) * parseFloat($(this).next().next().text()); | |
| sum += parseFloat($(this).next().next().text()); | |
| console.log(parseFloat($(this).text()), parseFloat($(this).next().next().text())); | |
| }); | |
| console.log(mulSum, sum, mulSum/sum); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment