UCAS SEP 系统自动教评

UCAS的SEP系统自动教评,此脚本能够帮助您自动评价,支持课程评价与教师评价

当前为 2020-12-04 提交的版本,查看 最新版本

您需要先安装一个扩展,例如 篡改猴Greasemonkey暴力猴,之后才能安装此脚本。

You will need to install an extension such as Tampermonkey to install this script.

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴Userscripts ,之后才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。

您需要先安装用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         UCAS SEP 系统自动教评
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  UCAS的SEP系统自动教评,此脚本能够帮助您自动评价,支持课程评价与教师评价
// @author       You
// @match        http://jwxk.ucas.ac.cn/evaluate/evaluateTeacher/*
// @match        http://jwxk.ucas.ac.cn/evaluate/evaluateCourse/*
// @require      http://libs.baidu.com/jquery/1.8.3/jquery.min.js
// @grant        none
// ==/UserScript==


/*
介绍:
纯JS打卡脚本,能够自动化完成教评全五星好评


V0.1 2020年12月04日
手动点击需要评价的课程或老师,即可自动评价并且跳转到未评价系统界面。

*/


(function() {
    'use strict';

    // Your code here...
    // 前期教评, 均5分
    $(document).ready(() => {
        console.log('Hello World!');
        const lst1 = document.querySelectorAll('[name^="item_"][value="5"]');
        console.log(lst1);
        for(let i=0; i<lst1.length; i++) {
            // console.log(i);
            // console.log(lst1[i]);
            lst1[i].checked = true;
        }
        // 五个意见栏
        const ta = document.querySelectorAll('textarea[name^="item_"]');
        for(let i=0; i<ta.length; i++) {
            const text = window.location.href.indexOf('evaluateTeacher')+1 ? "治学严谨、备课充分、讲课认真、因材施教" : "课程与作业(包括作业、报告、测验测试、论文等)有助于我的能力的提高"
            ta[i].innerText=text;
        }
        if (window.location.href.indexOf('evaluateCourse')+1) {
            // 教室情况和舒适度
            document.querySelectorAll('input[name^="radio_"]')[0].checked=true;
            // 修读原因
            document.querySelectorAll('input[name^="item_"][type="checkbox"]')[0].checked=true;
        }
        // 点击提交按钮
        document.getElementById('sb1').click();
    })
})();