Skip to content

Instantly share code, notes, and snippets.

@themegabyte
Last active June 7, 2022 11:33
Show Gist options
  • Select an option

  • Save themegabyte/3b4df5fde3456fe9b7dee5f8142619af to your computer and use it in GitHub Desktop.

Select an option

Save themegabyte/3b4df5fde3456fe9b7dee5f8142619af to your computer and use it in GitHub Desktop.
// Course Eval
// Set all to 5
let myElem = document.querySelector("#divStudentCouseForm");myElem.children[0].childNodes[1].childNodes.forEach((e)=>{console.log(e.childNodes[2]);if (e.childNodes[2] && e.childNodes[2].children[0]) console.log(e.childNodes[6].childNodes[0].checked = true)})
// Set all to 1
let myElem = document.querySelector("#divStudentCouseForm");myElem.children[0].childNodes[1].childNodes.forEach((e)=>{console.log(e.childNodes[2]);if (e.childNodes[2] && e.childNodes[2].children[0]) console.log(e.childNodes[2].childNodes[0].checked = true)})
// Teacher Eval
// Set all to 5
let myElem = document.querySelector("#divTeacherEvaluationForm");myElem.children[0].childNodes[1].childNodes.forEach((e)=>{if (e.childNodes[2].children[0]) console.log(e.childNodes[2].childNodes[0].checked = true)})
// Set all to 1
let myElem = document.querySelector("#divTeacherEvaluationForm");myElem.children[0].childNodes[1].childNodes.forEach((e)=>{if (e.childNodes[2].children[0]) console.log(e.childNodes[6].childNodes[0].checked = true)})
// Please go do something useful after you saved 10min on this equally "useful" Evaluation forms :')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment