Skip to content

Instantly share code, notes, and snippets.

@weiland
Last active July 3, 2019 16:24
Show Gist options
  • Save weiland/3d28880e64ed5e04d4e80d93028affbb to your computer and use it in GitHub Desktop.
Save weiland/3d28880e64ed5e04d4e80d93028affbb to your computer and use it in GitHub Desktop.
EvaSys Auto-Completer - Automatische Ausfüllen / Ergänzen einer EvaSys Umfrage / Evaluation

EvaSys Completion Helper

Script collection to easily submit EvaSys questionnaires.

Simplifies life when always entering repeated information.

Hot to use

Have a look at index.js.

First, you will need a survey e.g. something like https://evaluation.A-UNIVERSITY.edu/evasys/online.php?p=[YOUR-CODE]

Most likely it won't offer an accessible questionnaire, so you have to find the Normal/Old Version Link. (There is a small piece of script for that.)

Being on the accessible page, you can fill out all the shiny radio-buttons.

Make sure to adjust your information.

Disclaimer

Maybe it's a better idea to fill out the questionnaire individually. Zwinkersmiley.

This was just a proof of concept to demonstrate that one can write a script faster than completing the questionnaire by hand.

function getNormalOnlineView() {
const links = document.getElementsByClassName('OldOnlineViewLink');
if (links.length === 0) threw new Error('Normal/Old Online View Link was not found.');
return links[0].href;
}
function checkRadio(radio) {
radio.setAttribute('checked', true);
}
const chosenIds = [
// 1.1: Informatik
'fld_287020-0',
// 1.3: B.Sc/B.A
'fld_287022-0',
// 1.4: 2.
'fld_287023-1',
// 1.5: männlich
'fld_287024-1',
// 1.6: Deutschland
'fld_287025-0',
// 1.7: ja
'fld_287026-0',
// 1.8: 1.
'fld_287027-0',
// 1.9: 0 x
'fld_287028-0',
// 2.1: 100%
'fld_287029-10',
// 3: trifft zu
// 3.1
'fld_287040_0',
'fld_287041_0',
'fld_287042_0',
'fld_287043_0',
'fld_287044_0',
'fld_287045_0',
'fld_287046_0',
'fld_287047_0',
'fld_287048_0',
'fld_287049_0',
'fld_287053_0',
'fld_287054_0',
'fld_287055_0',
// 4. Lehrkraft
'fld_287057_0',
'fld_287058_0',
'fld_287059_0',
'fld_287060_0',
'fld_287061_0',
'fld_287062_0',
'fld_287063_0',
'fld_287064_0',
'fld_287065_0',
// 5. Freie Fragen (alle mit k.A beantworten)
'fld_287067_-1',
'fld_287068_-1',
// 6
// 6.1 Zeitaufwand (mehr als 5h)
'fld_287069-7',
// 6.2 Geschwindigkeit
'fld_287071_1',
// 6.3 Niveau
'fld_287072_1',
// 6.4 Arbeitsaufwand
'fld_287073_1',
// 6.5 Gesamtnote (2)
'fld_287075_1'
];
function complete() {
chosenIds.forEach(id => checkRadio(document.getElementById(id)));
}
function submit() {
// document.getElementsByName('btnsubmit')[0].submit();
// without confimation:
document.forms[0].submit();
}
function redirectToNormalVersion() {
location.href = getNormalOnlineView();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment