This is the 29th day of my participation in the August More Text Challenge

Preface:

Teachers teaching evaluation is an important content of teaching quality evaluation, with the speeding up of education informationization, how to use the network technology in the traditional teaching to evaluate teachers’ teaching quality and teaching quality of how to evaluate teachers in network teaching environment, is the difficulty of teaching management, also is a key problem in the development of network teaching. Teacher teaching evaluation is a complex system engineering, which needs to invest a lot of manpower, material resources and financial resources. With the help of teacher teaching evaluation system, the network management and implementation of evaluation can be realized. Through the use of the system to obtain a large amount of statistical data, will provide a basis for in-depth analysis and decision-making.

Functional design:

Administrator role: login, administrator management, teacher management add, delete, change and check, curriculum management add, delete, change and check, teaching indicators, students add, delete, check and evaluation functions. Teacher role: login, course management, teaching index management, student management, received evaluation and other functions. Student role: Login, modify personal information, start scoring, select courses for evaluation, view scoring, scoring and other functions.

Function screenshots:

User login:

System Home page:

Administrator management:

Teacher management:

Add teacher:

Course Management:

Add courses:

Index management:

 

Student Management:

Evaluation management:

Scoring process:

Logout exit:

Teacher homepage:

Student Homepage:

 

Key code:

Login:


<div class="wrapper">

    <div class="froyo-frame login-body">
        <div class="admin-face">
            <div class="face-img">
                <img src="${ctxStatic}/images/editor.png" alt="logo">
            </div>
        </div>
        <h1 class="admin-login-tittle">Course grading management system</h1>
        <div class="admin-login-form">
            <form class="form" action="${ctx}/login" method="post" autocomplete="off">
                <div class="admin-name"><input name="username" type="text" placeholder="Username"></div>
                <div class="admin-password"><input name="password" type="password" placeholder="Password"></div>
                <div class="admin-button"><button type="submit" id="login-button">The login</button></div>
            </form>
            <div class="admin-button"><a id="login-button" href="${ctx}/index">Return to the home page</a></div>
</div>
<script type="text/javascript" src="${ctxStatic}/plugins/layui/layui.js"></script>
<script type="text/javascript">
    layui.use('layer'.function() {
        var $ = layui.jquery,
            layer = layui.layer;
        //login-button click event..
        $('#login-button').click(function (event) {
            event.preventDefault();
            if(! $("input[name=username]").val()) {
                layer.msg("User name cannot be empty");
                return false;
            } else if(! $("input[name=password]").val()) {
                layer.msg("Password cannot be empty.");
                return false;
            } else{$('form').fadeOut(500);
                $('.wrapper').addClass('form-success');
                $('.form').submit(); }});</script>
</body>
</html>
Copy the code

After receiving the login request from the front end, the background Controller verifies the parameters, verifies the user name, password and user role transmitted from the front end, invokes the loginController. login method to verify user login, queries whether the current account and password of the database are correct, and returns the status code to the front end and the front end Status code for relative page jumps and data effects.

   /** * Login authentication **@param user
     * @param map
     * @return* /
    @PostMapping("/login")
    public String login(User user, ModelMap map) {
        if(user ! =null) {
            if (StringUtils.isBlank(user.getUsername()) || StringUtils.isBlank(user.getPassword())) {
                return Views.LOGIN;
            }
            AuthenticationToken token = new UsernamePasswordToken(user.getUsername(), user.getPassword(), true);
            if (token == null) {
                map.put("message"."Wrong username or password");
                return Views.LOGIN;
            }
            / / remember me
            ((UsernamePasswordToken) token).setRememberMe(true);
            try {
                SecurityUtils.getSubject().login(token);
                return Views.REDIRECT_ADMIN;
            } catch (AuthenticationException e) {
                if (e instanceof UnknownAccountException) {
                    map.put("message"."User does not exist");
                } else if (e instanceof LockedAccountException) {
                    map.put("message"."Account not active");
                    map.put("status".2);
                    map.put("user", user);
                } else if (e instanceof DisabledAccountException) {
                    map.put("message"."Account not enabled");
                }
                e.printStackTrace();
                map.put("message"."User authentication failed");
            }
            return Views.LOGIN;
        } else {
            map.put("message"."Unknown exception");
            returnViews.LOGIN; }}}Copy the code

Subscribe to download the source code 

In general, this project is relatively simple and excellent, suitable for beginners as a reference for course design and graduation design

In addition, we need white piao Java learning materials including “JVM, Netty, Mysql, Mybatis, Redis, Dubbo, Nginx, design mode” and other 10G information package, you can see my home page or private blog

Clocking Java projects updated 29/100 days

Everyone can like, favorites, follow, comment on me, the following vote can also be actively interactive yo