UCAS SEP 系统自动教评

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

目前為 2020-12-04 提交的版本,檢視 最新版本

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

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

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 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();
    })
})();