欢迎光临
我们一直在努力

正方教务系统 V-9.0 自动评教 JS代码

这是针对 正方教务系统 V-9.0 的自动评教 JS,完全在前端执行,等同于手动点击。

🌈 功能说明

  • 自动将每一门课的评价项选为「优秀」
  • 随机将 1 项改为「良好」,防止全优秀被抽查
  • 自动填写评语
  • 自动触发提交按钮
  • 提交成功后自动切换下一门课程,直至所有课程评完

⚠️ 本工具 仅模拟手动点击,不涉及抓包、篡改请求或绕过权限,风险最低。

🔧 使用方法

  1. 打开【学生评价】页面,左侧能看到课程列表
  2. 点击第一门课程
  3. F12 → Console
  4. 粘贴下面 JS 代码 → 回车
  5. 不要操作页面,等待自动完成

💻 自动评教 JS(稳定版)

(async function () {
    console.log("🚀 自动评教(V9.0 修复提交版)启动");

    const commentText = "教师教学认真负责,教学内容安排合理,讲解清晰,课堂氛围良好。";
    const wait = ms => new Promise(r => setTimeout(r, ms));

    function selectRadios() {
        let goodList = [], excellentList = [];

        $("tr").each(function () {
            const radios = $(this).find("input[type='radio']");
            if (radios.length) {
                radios.each(function () {
                    const txt = $(this).parent().text();
                    if (txt.includes("优秀")) excellentList.push(this);
                    if (txt.includes("良好")) goodList.push(this);
                });
            }
        });

        excellentList.forEach(r => $(r).prop("checked", true).trigger("change"));

        if (goodList.length) {
            const r = goodList[Math.floor(Math.random() * goodList.length)];
            $(r).prop("checked", true).trigger("change");
        }
    }

    function fillComment() {
        $("textarea").each(function () {
            if (!$(this).val()) $(this).val(commentText).trigger("change");
        });
    }

    function realSubmit() {
        const btn = document.getElementById("btn_tj");
        if (!btn) return console.warn("❌ 找不到提交按钮");

        const evts = $._data(btn, "events");
        if (evts && evts.click) {
            evts.click.forEach(e => e.handler.call(btn));
            console.log("✅ 已触发真实提交逻辑");
        } else btn.click();
    }

    function gotoNext() {
        const grid = $("#tempGrid");
        const ids = grid.jqGrid("getDataIDs");
        const cur = grid.jqGrid("getGridParam", "selrow");
        const idx = ids.indexOf(cur);

        if (idx >= 0 && idx < ids.length - 1) {
            grid.jqGrid("setSelection", ids[idx + 1], true);
            console.log("➡️ 下一门课程");
            return true;
        }
        return false;
    }

    while (true) {
        await wait(1200);
        selectRadios();
        fillComment();
        await wait(800);
        realSubmit();
        await wait(2500);

        if (!gotoNext()) {
            console.log("🎉 所有课程评教完成!");
            break;
        }
    }
})();

💡 温馨提示

  • 请确保在课程评价页面 左侧列表可见课程,才能顺利切换下一门课
  • 不建议调整页面或刷新,否则可能中断自动执行
  • 提前备份已填写的课程信息,以防误操作
赞(0)

评论 抢沙发

评论前必须登录!

立即登录   注册