🎓 GUET评教脚本分享 📝 前言 每学期学校的评教都非常折磨人:十几道题要一题一题点,点完还得打一大段课程评价和教师印象,费时又费心。于是自己写了两个脚本,一键自动完成评教,彻底解放双手。
本文分享的两个脚本仅针对 GUET(桂电)学生评教系统 。
⚠️ 使用须知
脚本仅供提高个人评教效率,请勿用于恶意或违规用途
默认评分:教师评教打 9~10 分 ,教材评教全部 8 分 ,可按个人意愿自行调整
若因评教页面改版导致脚本失效,可在控制台查看报错信息自行排查
🚀 快速上手
用浏览器打开评教页面
按 F12 打开开发者工具
切换到 Console(控制台) 选项卡
粘贴下方对应脚本,按 回车 即可自动执行
执行完稍等片刻,确认页面已提交成功
🧑🏫 一、教师评教脚本 自动点击所有选项、打分(默认 9~10 分)、填写课程评价与教师印象并提交。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 var optionBtn = document .getElementsByClassName ("el-input__inner" );for (var i = 0 ; i < optionBtn.length ; i += 1 ) { optionBtn[i].click (); } var cnt = 0 ;const innerElements = document .querySelectorAll ('.inner' );innerElements.forEach (element => { if (element.textContent .trim () === '9' && cnt===1 ) { element.classList .add ('selected' ); } else if (element.textContent .trim () === '10' && cnt===0 ){ cnt=1 ; element.classList .add ('selected' ); } }); const selectedElements = document .querySelectorAll ('.selected' );selectedElements.forEach (element => { const handleClick = ( ) => { console .log ('自动填写' ); }; element.addEventListener ('click' , handleClick); element.click (); }); var upup = document .getElementsByClassName ("foot-btn foot-btn-primary" );for (var y = 0 ; y < upup.length ; y += 1 ) { upup[y].click (); } const textareas = document .querySelectorAll ('.el-textarea__inner' );if (textareas.length >= 2 ) { textareas[0 ].value = "我非常认可这门课程的教学设计与实施。老师在教学引导方面表现出色,课堂氛围活跃,学习体验充实而有成就感,大家都能积极参与到课业活动中。通过这门课程,我不仅系统掌握了相关专业知识,还培养了独立思考和解决问题的能力." ; const courseEvent = new Event ('input' , { bubbles : true }); textareas[0 ].dispatchEvent (courseEvent); textareas[1 ].value = "我对这位老师的教学风格印象深刻,耐心细致地解答问题,并鼓励我们积极思考。" ; const teacherEvent = new Event ('input' , { bubbles : true }); textareas[1 ].dispatchEvent (teacherEvent); } const radioGroups = document .querySelectorAll ('.el-radio-group' );radioGroups.forEach (group => { const firstOption = group.querySelector ('.el-radio__input' ); if (firstOption) { const clickEvent = new MouseEvent ('click' , { bubbles : true , cancelable : true }); firstOption.dispatchEvent (clickEvent); } }); var ok = document .getElementsByClassName ("el-button submit-btn el-button--primary el-button--small" );if (ok.length > 0 ) { ok[0 ].click (); }
📚 二、教材评教脚本 自动为所有评价项勾选 8 分 、填写教材评价并提交。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 setTimeout (() => { const iframes = document .querySelectorAll ('iframe' ); let targetDoc = document ; for (let iframe of iframes) { try { const doc = iframe.contentDocument || iframe.contentWindow .document ; if (doc && doc.querySelectorAll ('.check-box' ).length > 0 ) { targetDoc = doc; break ; } } catch (e) {} } const items = targetDoc.querySelectorAll ('.check-box' ); if (items.length === 0 ) { console .log ('未找到评价项' ); return ; } items.forEach ((item, index ) => { if (index >= 10 ) return ; const options = item.querySelectorAll ('label, .el-radio, [role="radio"], input[type="radio"]' ); let radioOptions = options.length > 0 ? options : item.closest ('.el-form-item, .form-group, .question-item' )?.querySelectorAll ('label, .el-radio, [role="radio"], input[type="radio"]' ) || []; radioOptions.forEach (option => { let text = option.textContent || option.value || '' ; if (option.parentElement ) text = option.parentElement .textContent || text; if (option.type === 'radio' ) { text = option.value || text; const label = option.closest ('label' ) || option.parentElement ; if (label) text = label.textContent || text; } if (text.includes ('8' ) || text.trim () === '8' || option.value === '8' || option.getAttribute ('value' ) === '8' ) { try { option.click (); if (option.type === 'radio' ) { option.dispatchEvent (new Event ('change' , {bubbles : true })); option.dispatchEvent (new Event ('click' , {bubbles : true })); } if (option.tagName === 'LABEL' ) { const forId = option.getAttribute ('for' ); if (forId) { const input = targetDoc.getElementById (forId); if (input) input.click (); } } if (option.parentElement ) option.parentElement .click (); console .log (`✓ 第${index + 1 } 项已选8分` ); } catch (e) {} } }); }); const textarea = targetDoc.querySelector ('textarea' ); if (textarea) { textarea.value = '教材内容科学规范,结构合理,习题恰当,符合教学需求。' ; textarea.dispatchEvent (new Event ('input' , {bubbles : true })); } setTimeout (() => { const btns = targetDoc.querySelectorAll ('button' ); for (let btn of btns) { const text = btn.textContent .trim (); if (text.includes ('提交' ) || text.includes ('确定' ) || text.includes ('保存' )) { btn.click (); console .log ('已提交' ); break ; } } }, 1000 ); }, 2000 );
🎯 总结
脚本
功能
默认评分
教师评教
一键选分 + 填评价 + 提交
9~10 分
教材评教
全部勾选 + 填评价 + 提交
8 分
有了这两个脚本,每学期的评教几十秒就能搞定,再也不用一题一题点、一段一段打字了。如果你有更好的方法,欢迎分享!💬
适用学校 :GUET(桂电)适用平台 :基于 Element UI 的评教系统