<commit_before>{% extends "layout.html" %}
{% block title %}验证学生身份 - 每课{% endblock %}
{% block body %}
    <div class="hero hero-homepage">
        <h1 class="hero-header" id="title">请稍候...</h1>

        <br><br>
        <h4 class="text-muted" id="message">正在验证你的学生身份，请勿关闭此页面。</h4>
        <br>

    </div>



{% endblock %}
{% block scripts %}
    <script type="text/javascript">
        $(document).ready(function () {
            var final = false;

            function getData() {
                $.getJSON('{{ url_for('user.register_by_password_status') }}', {'request': '{{ request_id }}'}, function (data) {
                    if (data.message === 'SUCCESS') {
                        window.location.href = "{{ url_for("user.register_by_password_success") }}";
                    } else if (data.message === "PASSWORD_WRONG") {
                        document.getElementById("title").innerHTML = "验证失败";
                        document.getElementById("message").innerHTML = "教务密码错误，请返回重试。";
                        final = true
                    } else if (data.message === "INTERNAL_ERROR") {
                        document.getElementById("title").innerHTML = "验证失败";
                        document.getElementById("message").innerHTML = "系统内部错误，请稍后重试。";
                        final = true
                    }
                })
            }

            setInterval(function () {
                if (!final) {
                    getData();
                }

            }, 2000);
        });
    </script>

{% endblock %}<commit_msg>密码验证失败时增加回到上一页按钮<commit_after>{% extends "layout.html" %}
{% block title %}验证学生身份 - 每课{% endblock %}
{% block body %}
    <div class="hero hero-homepage">
        <h1 class="hero-header" id="title">请稍候...</h1>

        <br><br>
        <h4 class="text-muted" id="message">正在验证你的学生身份，请勿关闭此页面。</h4>
        <br>
        <a href="javascript:" onclick="history.go(-1)" id="go-back-link" style="display:none">回到上一页</a>

    </div>



{% endblock %}
{% block scripts %}
    <script type="text/javascript">
        $(document).ready(function () {
            var final = false;

            function getData() {
                $.getJSON('{{ url_for('user.register_by_password_status') }}', {'request': '{{ request_id }}'}, function (data) {
                    if (data.message === 'SUCCESS') {
                        window.location.href = "{{ url_for("user.register_by_password_success") }}";
                    } else if (data.message === "PASSWORD_WRONG") {
                        document.getElementById("title").innerHTML = "验证失败";
                        document.getElementById("message").innerHTML = "教务密码错误，请返回重试。";
                        $("a#go-back-link").show();
                        final = true
                    } else if (data.message === "INTERNAL_ERROR") {
                        document.getElementById("title").innerHTML = "验证失败";
                        document.getElementById("message").innerHTML = "系统内部错误，请稍后重试。";
                        $("a#go-back-link").show();
                        final = true
                    }
                })
            }

            setInterval(function () {
                if (!final) {
                    getData();
                }

            }, 2000);
        });
    </script>

{% endblock %}
{'fraction_non_alphanumeric': 0.161212848994296, 'fraction_numerical': 0.005103572500750525, 'mean_word_length': 1.5690053970701618, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 27, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4889254', 'n_tokens_mistral': 1028, 'n_tokens_neox': 1012, 'n_words': 149}