Adds a button to help fill out PUP faculty evaluation surveys with organic randomization
This script helps PUP students automate faculty evaluations by setting survey ratings to achieve a desired average score. It dynamically adjusts responses, ensures accuracy, and works for any number of questions, saving time and simplifying the feedback process.
Ctrl + Shift + J (Windows/Linux) or Cmd + Option + J (Mac).Ctrl + Shift + K (Windows/Linux) or Cmd + Option + K (Mac). window.se = (a = prompt("Avg?")) => {
q = document.querySelectorAll('input[name^="q"]').length / 5;
h = Math.ceil(a);
l = Math.floor(a);
n = Math.round(a * q) - l * q;
for (i = 1; i <= q; i++)
document.getElementById("q" + i + (i <= n ? h : l)).checked = 1;
};
Enter to execute the script.[!NOTE] If the console blocks pasting, type
allow pastingand pressEnter.
For a better experience, install the script permanently using a userscript manager. This way, the script will automatically run every time you visit the faculty evaluation page.
userscript.js file link in this gist (your userscript manager should automatically detect it and prompt you to install).Ctrl+Shift+E to quickly apply your last used rating