Skip to content

Instantly share code, notes, and snippets.

@zaxoavoki
Last active January 4, 2022 12:56
Show Gist options
  • Save zaxoavoki/7c508b3454ad4b4cd5a5e303576c298e to your computer and use it in GitHub Desktop.
Save zaxoavoki/7c508b3454ad4b4cd5a5e303576c298e to your computer and use it in GitHub Desktop.
Średnia ocena wszystkich kursów

Count your average courses mark

  1. Open JSOS website and go to the "Indeks" page https://jsos.pwr.edu.pl/index.php/student/indeksOceny/oceny/1.
  2. Click "Pobierz więcej..."
  3. Open Developer Console and insert this script:
const [sumMark, ects] = [...document.getElementsByTagName('tr')]
  .filter(e => e.classList.contains('data'))
  .map(e => [parseInt(e.children[7].innerHTML), parseFloat(e.children[5].innerHTML) || 3])
  .filter(e => e[1] > 2)
  .reduce((a, [ec, mk]) => [a[0] + ec*mk, a[1] + ec], [0, 0]);
console.log(sumMark / ects);
  1. The result is your average mark for all courses.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment