(Source code attached) PHP Student Score Management System Computer Graduation Design 48726

Summary

Since the 1920s, computers have appeared crazily in people's lives and work, becoming a good helper for people's lives and work. Computers have penetrated into every household. Online offices and online teaching have replaced the traditional manual record management methods. , using computers to work does not have to be limited to a fixed time and a fixed location, and cross-regional communication can be easily achieved through computer systems. With the popularization of higher education, the number of students has continued to increase. Recently, due to the impact of the epidemic, traditional query and management of student scores have become increasingly inconvenient, and manual query management has also reduced work efficiency and increased the number of teachers. and the workload of the school, and it is not convenient for students to make inquiries, so this student performance management system was developed.

This system is developed with practical application as the background. Through the system administrator, all students, teachers and other personnel, as well as some courses, grades and other data information related to students can be unified managed to facilitate the retention of data. Teachers and students can register and then log in to the system to query and manage information such as courses, students, grades and average data. In general, the front-end of the system is displayed through a PHP page, the back-end uses the ThinkPHP framework, and the database uses the currently popular open source relational database MYSQL. This system uses the currently popular vue.js in the front-end technology to make the page display more neat and beautiful.

Keywords: student performance management; PHP; ThinkPHP; MYSQL

Abstract

Since the 1920s, computers have crazily appeared in people's lives and work, becoming a good helper for people's lives and work. Computers have penetrated into every household, and online work and teaching have replaced traditional manual record management methods. Using computers to work can be done without being limited to fixed times and locations, and cross regional communication can be easily achieved through computer systems. With the popularization of higher education, the number of students is also continuously increasing. Recently, due to the impact of the epidemic, the traditional query management of student grades has become increasingly inconvenient. Moreover, manual query management has reduced work efficiency, increased the workload of teachers and schools, and is not convenient for students to query. Therefore, the development of student grade management has been carried out.

This system is developed with practical application as the background. Through the system administrator, all students, teachers and other personnel, as well as some related course and grade data information of students, can be uniformly managed, facilitating the retention of information. Teachers and students can register and log in to the system to query and manage information such as courses, students, grades, and average data. In general, the foreground of the system is displayed through the PHP page, the background uses the ThinkPaPHP framework, and the database uses the popular open-source relational database MYSQL. This system uses the currently popular Vue.js technology in the front-end, making the page appear more neat and beautiful.

Keywords: Student performance management; PHP; ThinkPHP; MYSQL

Table of contents

Summary

Abstract

Chapter 1 Introduction  

1.1 Research background and significance 

1.2 Development status 

1. 3 ThinkPHP framework 

1. 4  Thesis structure arrangement

Chapter 2 Needs Analysis for Student Performance Management

2.1  System feasibility analysis

2.1.1  Technical feasibility analysis

2.1.2  Economic feasibility analysis

2.1.3  Operation feasibility analysis

2.2  System requirements analysis

2.2.1  Functional requirements analysis

2.2.2  Non-functional requirements analysis

2.3  System use case analysis

Chapter 3 Overall Design of Student Performance Management

3.1  System function module design

3.2  Database design

3.2.1  Database conceptual structure design

3.2.2  Database logical structure design

Chapter 4 Design and Implementation of Key Modules

4.1  Login module

4.2  Registration module

4.3 System user management module 

4.4 Course Information Module 

4.5 Student Information Module 

4. 6 Student Performance Module 

4. 7 Average Data Module 

Chapter 5 System Experiment and Result Analysis

5.1  Purpose of testing

5.2  System part test

5.3  System test results

Chapter 6 Conclusion

references

Acknowledgments

  • Chapter 1 Introduction
    1. research background and meaning

In the scientific and technological era of the 21st century, science and technology are advancing by leaps and bounds. Computers are not only used in science and technology, but also widely used in life. Nowadays, whether it is primary schools, junior high schools, high schools, or even many universities, student performance analysis is basically managed manually. However, as time changes and the scale of schools expands, the work of student performance analysis and the amount of data involved As the number of schools grows larger and larger, most schools have to rely on increasing manpower, material and financial resources to manage student performance. However, manual management of grade files has factors such as low efficiency, troublesome search, low reliability, and low confidentiality. Therefore, it is necessary to develop a student performance management system that is suitable for middle schools.

Develop a student performance management system and use computers to process student performance, further improving school efficiency and modernization levels. Improve work efficiency for teachers and students, and realize the systematization, standardization and automation of student performance information management workflow. Nowadays, the management level of student achievement files in middle schools in my country is generally not very high, and some are still based on using all paper media. This management method can no longer adapt to the development of the times and the needs of society, because it wastes a lot of manpower and material resources. , there are also many deficiencies. In today's information age, this traditional management method will inevitably be replaced by computer-based information management systems. An efficient student performance management system can store previous student performance files. It does not require a lot of manpower. It only requires a few dedicated entry clerks to operate the system. It saves a lot of manpower and can quickly find the required information. It is efficient and safe for students. You can easily check your results.

    1. Development status

Student performance management is one of the main daily management tasks of each school, involving many aspects of the school, department, teachers, and students. With the continuous reform of the teaching system, especially the development and deepening of the credit system and course selection system, student performance management daily Management work and preservation management are becoming increasingly arduous and complex. There is an urgent need to develop a student performance management system that is powerful, easy to operate, and user-friendly.

In foreign schools, unlike domestic schools, they generally have a large and stable technical team to provide services and technical support. However, the information construction of domestic schools started relatively late. In the process of gradually applying the digital campus theory, on the one hand, each school continues to invest in the purchase of various hardware, system software and networks, on the other hand, it also continuously develops and implements various teaching, scientific research, office management and other application systems, forming a certain A large-scale information construction system. However, due to the relative backwardness of the overall informatization level, shortage of funds, and incomplete theoretical systems, domestic school academic management systems have certain gaps compared with foreign schools in terms of institutional setup, service scope, service quality, and personnel requirements.  

Looking at the current domestic research status, there are certain deficiencies in terms of security and information updating. Each existing system data is established separately and has poor sharing. In the manager-centered approach, information selection depends on the manager's understanding of the information. Cognition and preferences make it difficult to grasp the real needs of users, and therefore cannot fully meet the needs of users. Therefore, educational management software should fully rely on the campus network to realize centralized management, decentralized operation, and information sharing of educational information, so that traditional educational management can develop in the direction of digitization, paperless, intelligent, and comprehensive, and provide a basis for further improvement. A good foundation has been laid for the computer academic management system and the school-wide information system.

    1. ThinkPHP framework

ThinkPHP was born to simplify enterprise-level application development and agile WEB application development. It was first born in early 2006, and was officially renamed ThinkPHP on New Year's Day 2007, and was released under the Apache2 open source agreement . ThinkPHP has been adhering to the simple and practical design principle since its birth. While maintaining excellent performance and minimal code, it also focuses on ease of use. And it has many original functions and features. With the active participation of the community team, it is continuously optimized and improved in terms of ease of use, scalability and performance. [1] 

ThinkPHP is a fast, compatible and simple lightweight domestic PHP development framework . It was born in early 2006. It was originally named FCS. It was officially renamed ThinkPHP on New Year's Day in 2007. It is released in accordance with the Apache2 open source agreement. It was transplanted from the Struts structure and made improvements and improvements. At the same time, it also draws on many excellent foreign frameworks and patterns, uses object-oriented development structure and MVC pattern , and integrates the ideas of Struts and TagLib ( tag library ), RoR's ORM mapping and ActiveRecord pattern.

ThinkPHP can support server environments such as windows/ Unix /Linux. The official version requires PHP 5.0 or above. It supports MySql , PgSQL , Sqlite databases and PDO extensions. The ThinkPHP framework itself has no special module requirements and specific application system operating environment requirements. Depending on the modules involved in development.

As an overall development solution, ThinkPHP can solve most needs in application development because it includes the underlying architecture, compatibility processing, base class library , database access layer, template engine , caching mechanism, plug-in mechanism, role authentication, form Processing and other commonly used components, and it is more convenient for cross-version, cross-platform and cross-database transplantation. And each component is carefully designed and perfected, and the application development process only needs to focus on your business logic.

    1. Thesis structure arrangement

The paper will be arranged hierarchically. In addition to the abstract, table of contents, acknowledgments, and literature reference sections, the main text will also analyze the website requirements, elaborate on the general design and implemented functions, and finally list some commissioning records. The paper mainly The architecture is as follows:

Chapter 1 explains the background of the project and the practical significance of development.

Chapter 2 analyzes the feasibility and functional requirements of this system.

Chapter 3 explains the overall design of the project.

Chapter 4 clarifies the implementation of detailed functions of student performance management, mainly based on technical functional module functions.

Chapter 5 lists some system debugging and testing records.

Chapter 6 introduces the conclusions of student performance management.

The MySQL database used for student performance management storage and development tools such as phpstorm and Tomcat are used in development, which can bring a lot of convenience to our writing work. The system is developed using the ThinkPHP framework, which makes the system more scalable and maintainable, reduces PHP configuration code, and simplifies programming code. Currently, the ThinkPHP framework is also one of the frameworks chosen by many companies.

      1. Economic feasibility analysis

The development software used in the development of student performance management, such as phpstorm development tools , Tomcat8.0 server, MySQL5.7 database, Photoshop image processing software, etc., are all open source and free. These environments have been systematically studied in the school. You can operate it independently without any additional cost, and the system development tools can be downloaded directly from the Internet, so it is economically feasible.

      1. Operational feasibility analysis

When designing this project, I referred to many successful cases of similar systems, systematically analyzed their operation interfaces and functions, and combined many cases together to highlight people-oriented and simplified operations, so people with basic computer knowledge can Operate this project. Therefore, there is no problem with operational feasibility.

    1. System Requirements Analysis
      1. Functional requirements analysis

The design and implementation of student performance management is to make it easier for school users to manage some information related to students . It can save a lot of time and energy when users search and manage, and effectively reduce unnecessary search time. The system is functionally divided into three parts: student end , teacher end and administrator end.

Student side:

(1) Registration and login: When students want to query and manage the functions implemented in the system , they must log in to the system. If they do not have an account, on the login interface, click the "Register" button to jump to In the registration interface, fill in the registration information according to the prompts, add and submit, the student's information is added to the database, and then enter the filled in account number and password to log in ;

(2) Personal information: Students can update their personal avatar, nickname, mobile phone number and other information by clicking the "Personal Information" button.

(3) Change password: Students can change the login password by clicking the "Change Password" button. First enter the original password, then enter the new password and confirm the password. When the original password is correct and the new password is consistent twice, the change is successful. , otherwise an error message will be given.

(4) Student information: Click the "Student Information" button to view all student information submitted by you. It supports querying student information by student number, name or gender. If you want to add new student information, click "Add" " button and then enter the student information according to the prompts. After clicking "Submit", the newly added student information will be displayed on the student information interface. You can click on a certain student information to view the details of the student information, or you can directly click "Delete" to delete the student. information;

(5) Course information: Click the "Course Information" menu to view all added course information in the system. It supports querying course information by course name. If you want to know the detailed information of a certain course, click " Details" will enter the details interface;

(6) Student Scores: Click the "Student Scores" button to view the student scores submitted by you. It supports querying student scores through the student's student ID number or name or class name. If you want to know the detailed information of a certain course selection, click below "View" will enter the details interface, and also supports deleting the results you selected;

Administrator side:

(1) Personal information: The administrator clicks the "Personal Information" button to update the individual's avatar, nickname, mobile phone number and other information.

(2) Modify password: The administrator clicks the "Modify Password" button to change the login password. First enter the original password, then enter the new password and confirm the password. When the original password is correct and the new password is consistent twice, then modify it. Successful, otherwise an error message will be given.

(3) System users: Administrators can control all user roles in the system, including administrators, students, and teachers. If you need to add a new user, click the "Add" button on the page and enter according to the prompts. Go to the user information and click "Submit" to view it on the corresponding user interface. You can click the "Delete" button behind the user to directly delete a user.

(4) Course information: Click the "Course Information" button to view all course information in the system. It supports querying course information by course name or cover or class. If you want to add new course information, click "Add" button and then enter the course information according to the prompts. After clicking "Submit", the newly added course information will be displayed on the course information interface. You can click on a certain course information to view the details of the course information, or you can directly click "Delete" to delete the health declaration. ;

(5) Student information: Click the "Student Information" button to view all student information in the system. It supports querying student information by student number or name. If you want to add a new student, click the "Add" button. Then fill in the student's specific information according to the prompts, click Submit, and the added student information will be saved in the database. At the same time, you can click the "Publish Results" button to enter the student information for submission, or you can select the student to be deleted and click directly. "Delete button" to delete students.

(6) Student scores: Click the "Student Scores" button to view the scores of all students. It supports querying student score information by student number or name, and the added student scores can be deleted at the same time;

(7) Average data: Click the "Average data" menu to view all the average data information added in the system. It supports querying the average data information through the student's student number or name. If you want to add new For average data, click the "Add" button, enter the average data information according to the prompts, click the "Submit" button, the new average data information will be displayed in the system, and the added average data information can also be deleted;

      1. Non-functional requirements analysis

Non-functional requirements for student performance management include the security, reliability, performance, scalability, etc. of self-service student performance management . The details can be expressed in the following 3-1 table:

Table 2.1 Non-functional requirements table for student performance management

safety

Mainly refers to the installation of the student performance management database, the use of the database and the setting of passwords must comply with standards.

reliability

Reliability means that student performance management can be operated according to user instructions. After testing, the reliability is over 90%.

performance

Performance is a necessary condition for student performance management to occupy the market, so it is best to have good performance.

Scalability

For example, the database reserves multiple attributes, such as the use of interfaces, to ensure the non-functional requirements of the system.

Ease of use

Users only need to follow the content displayed on the student performance management page and operate.

maintainability

The maintainability of student performance management development is very important. After testing, there is no problem with maintainability.

    1. System use case analysis

The use case diagram of student role in student performance management is shown in Figure 2.1:

Figure 2.1 Student role use case diagram

The use case diagram of the student performance management teacher role is shown in Figure 2.2:

Figure 2.2 Teacher role use case diagram

The use case diagram of the administrator role in student performance management is shown in Figure 2.3:

Figure 2.3 Administrator role use case diagram

  • Chapter 3 Overall Design of Student Performance Management

After analyzing the background, significance and feasibility of project development, the next step is to discuss the functional division of the project and the design of various tables in the project database during specific implementation. In this chapter, a systematic introduction will be made.

    1. System function module design

The design of the functional module is to create a system architecture based on the specific functions that the system is to implement and how the functions are divided. It is displayed in the form of a module diagram to facilitate us to list and involve the functions . In terms of system functions, the project is divided into three modules: administrator + teacher + student. Each module logs in and corresponds to the corresponding function. The specific function module diagram is shown in Figure 3.1.

Figure 3.1 Student performance management function module diagram

    1. Database Design

The design of the database carries various data of the system. In a system, all kinds of data require a special container. The database is this container. When establishing the database, it mainly consists of two parts: the design of the database model and the design of each database table. .

      1. Database conceptual structure design

The following is the total ER entity relationship diagram of the main database tables in the entire student performance management.

Figure 3.2 Total ER relationship diagram of student performance management

      1. Database logical structure design

From the previous ER diagram, you can see that the project requires the creation of many data tables. The following is the relational model of the main database tables in the project:

Table average_data (average data)

serial number

name

type of data

length

Decimal places

Allow null values

primary key

default value

illustrate

1

average_data_id

int

10

0

N

Y

Average data ID

2

title

varchar

64

0

Y

N

title

3

account_name

varchar

64

0

Y

N

Subject name

4

class_name

varchar

64

0

Y

N

class name

5

total_score_of_grades

int

10

0

Y

N

0

Total score

6

number_of_students

int

10

0

Y

N

0

Number of students

7

average_value

varchar

64

0

Y

N

average value

8

remarks

varchar

64

0

Y

N

Remark

9

recommend

int

10

0

N

N

0

Intelligent Recommendation

10

create_time

datetime

19

0

N

N

CURRENT_TIMESTAMP

creation time

11

update_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

Update time

Table course_information (course information)

serial number

name

type of data

length

Decimal places

Allow null values

primary key

default value

illustrate

1

course_information_id

int

10

0

N

Y

Course information ID

2

course_name

varchar

64

0

Y

N

Course Title

3

cover

varchar

255

0

Y

N

cover

4

class

varchar

64

0

Y

N

class

5

class_time

datetime

19

0

Y

N

class time

6

teacher_no

int

10

0

Y

N

0

Teacher number

7

teacher_name

varchar

64

0

Y

N

Teacher name

8

course_introduction

longtext

2147483647

0

Y

N

Course Introduction

9

recommend

int

10

0

N

N

0

Intelligent Recommendation

10

create_time

datetime

19

0

N

N

CURRENT_TIMESTAMP

creation time

11

update_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

Update time

Table student (student)

serial number

name

type of data

length

Decimal places

Allow null values

primary key

default value

illustrate

1

student_id

int

10

0

N

Y

Student ID

2

student_no

varchar

64

0

N

N

Student ID number

3

full_name

varchar

64

0

Y

N

Name

4

gender

varchar

64

0

Y

N

gender

5

examine_state

varchar

16

0

N

N

passed

Approval Status

6

recommend

int

10

0

N

N

0

Intelligent Recommendation

7

user_id

int

10

0

N

N

0

User ID

8

create_time

datetime

19

0

N

N

CURRENT_TIMESTAMP

creation time

9

update_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

Update time

Table student_grades (student grades)

serial number

name

type of data

length

Decimal places

Allow null values

primary key

default value

illustrate

1

student_grades_id

int

10

0

N

Y

Student Grade ID

2

student_no

int

10

0

Y

N

0

Student ID number

3

full_name

varchar

64

0

Y

N

Name

4

class_name

varchar

64

0

Y

N

class name

5

professional_name

varchar

64

0

Y

N

professional title

6

teacher_no

int

10

0

Y

N

0

Teacher number

7

account_name

varchar

64

0

Y

N

Subject name

8

subject_grades

int

10

0

Y

N

0

Subject results

9

annotation_notes

varchar

64

0

Y

N

Annotation instructions

10

recommend

int

10

0

N

N

0

Intelligent Recommendation

11

create_time

datetime

19

0

N

N

CURRENT_TIMESTAMP

creation time

12

update_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

Update time

Table student_information (student information)

serial number

name

type of data

length

Decimal places

Allow null values

primary key

default value

illustrate

1

student_information_id

int

10

0

N

Y

Student information ID

2

student_no

int

10

0

Y

N

0

Student ID number

3

full_name

varchar

64

0

Y

N

Name

4

gender

varchar

64

0

Y

N

gender

5

class_name

varchar

64

0

Y

N

class name

6

professional_name

varchar

64

0

Y

N

professional title

7

department_name

varchar

64

0

Y

N

Department name

8

teacher_no

int

10

0

Y

N

0

Teacher number

9

teacher_name

varchar

64

0

Y

N

Teacher name

10

recommend

int

10

0

N

N

0

Intelligent Recommendation

11

create_time

datetime

19

0

N

N

CURRENT_TIMESTAMP

creation time

12

update_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

Update time

Table teacher (teacher)

serial number

name

type of data

length

Decimal places

Allow null values

primary key

default value

illustrate

1

teacher_id

int

10

0

N

Y

Teacher ID

2

teacher_no

varchar

64

0

N

N

Teacher number

3

teacher_name

varchar

64

0

Y

N

Teacher name

4

gender

varchar

64

0

Y

N

gender

5

teaching_subjects

varchar

64

0

Y

N

Subjects taught

6

department_name

varchar

64

0

Y

N

Department name

7

examine_state

varchar

16

0

N

N

passed

Approval Status

8

recommend

int

10

0

N

N

0

Intelligent Recommendation

9

user_id

int

10

0

N

N

0

User ID

10

create_time

datetime

19

0

N

N

CURRENT_TIMESTAMP

creation time

11

update_time

timestamp

19

0

N

N

CURRENT_TIMESTAMP

Update time

  • Chapter 4Design and implementation of key modules
    1. Login module

Administrators, teachers and students enter their account number + password on the login interface and click the "Login" button. The system will match the accounts of the administrator, teacher and student in the user database table. If the account number + password are correct, they will log in to the system. The main management interface of each user, otherwise the corresponding information will be prompted and the user will return to the login interface. The main interface is displayed as shown in Figure 4.1 below.

Figure 4.1 Login interface diagram

The main codes for logging into the system are as follows.

public function login()

    {

        if (Request::isPost()) {

            $request = Request::param();

            $result = $this->validate($request, $this->validate);

            if (true !== $result) {

                //Output error message if verification fails

                $data['error'] = 30000;

                $data['message'] = $result;

            } else {

                $request['password'] = md5($request['password']);

                $result = $this->model->login($request, $this->table);

                $data = $result;

            }

        } else {

            $data['error'] = 30000;

            $data['message'] = "The value of field cannot be empty!";

        }

        return json_encode($data);

    }

public function login($request=[],$table_name = ''){

        $username = $request['username'];

        $password = $request['password'];

        $bol = $this->where(['username'=>$username])->find();

        if ($bol){

            $password = md5($password);

            if ($request['password']==$bol['password']) {

                //Add token information

                $access_token['create_time'] = date('Y-m-d H:i:s');

                $access_token['update_time'] = date('Y-m-d H:i:s');

$access_token['info'] = json_encode($bol);

                // $access_token['info'] = $bol;

                $access_token['token'] = md5(date('Y-m-d H:i:s'));

                $bol_token = Db::name('AccessToken')->insert($access_token);

                if ($bol_token){

                    $data['obj'] = $bol;

                    $data['obj']['token'] = $access_token['token'];

                    return ['result' => $data];

                }else{

                    return ['error' => ['code' => 5000, 'message' => '登录失败,token生成失败']];

                }

            } else {

                return ['error' => ['code' => 5000, 'message' => '登录失败,密码不正确']];

            }

        }else{

            return ['error' => ['code' => 5000, 'message' => '登录失败,账号不存在']];

        }

    }

    1. 注册模块

注册模块满足学生这部分,当学生想要进行学生相关信息的查询管理的时候,就必须进行登录,如果没有账号的话,在登录界面,点击“注册”按钮就会跳转到注册的界面,根据提示填写好注册信息,添加提交,注册的信息在数据库中就添加完成了,然后再输入填写好的账号和密码进行登录,其主界面展示如下图4.2所示。

图4.2 注册界面图

注册逻辑关键代码如下所示。

public function register()

    {

        if (Request::isPost()) {

            $request = Request::param();

            $request['create_time'] = isset($request['create_time']) ? $request['create_time'] : date('Y-m-d H:i:s');

            $request['update_time'] = isset($request['update_time']) ? $request['update_time'] : date('Y-m-d H:i:s');

            $result = $this->validate($request, $this->validate);

            if (true !== $result) {

                // 验证失败 输出错误信息

                $data['error'] = 30000;

                $data['message'] = $result;

            } else {

                $request['password'] = md5($request['password']);

                $result = $this->model->register($request, $this->table);

                $data = $result;

            }

        } else {

            $data['error'] = 30000;

            $data['message'] = "field的值不能为空!";

        }

        return json_encode($data);

    }

public function register($request=[],$table_name = ''){

        $username = $request['username'];

        $bol = $this->where(['username'=>$username])->find();

        if (!$bol){

            $result = self::allowField(true)->save($request);

            if ($result) {

                return ['result' => 1];

            } else {

                return ['error' => ['code' => 3000, 'message' => '注册失败']];

            }

        }else{

            return ['error' => ['code' => 3000, 'message' => '注册失败,账号已存在']];

        }

    }

    1. 系统用户管理模块

管理员可以对系统中所有的用户角色进行管控,包含了管理员、学生以及教师这三种角色,如果需要添加新的用户,点击页面中的“添加”按钮根据提示输入上用户信息,点击“提交”以后在对应的用户界面就可以查看到了,可以点击用户后面的“删除”按钮直接删除某一用户,这里以学生用户为例。界面如下图4.3所示。

图4.3 系统用户管理界面图

系统用户管理代码如下。

public function get_list($request=[],$table_name = '',$table_id = ''){

        $page = 1;

        $size = $table_name == "auth" ? 100 : 10;

        $where = [];

        $order = $table_id.'_id desc';

        $field = '*';

//        echo $order;exit;

        $columns = Db::query( "show COLUMNS FROM `".$table_name."`");

        foreach($columns as $key=>$val){

            $field_name = $val['Field'];

            if(isset($request['like'])){

                if ($request['like']==true){

                    //字段模糊查询

                    if(isset($request[$field_name])){

                        $where[] = [$field_name, '=', $request[$field_name]];

                    }

                }else{

                    //字段模糊查询

                    if(isset($request[$field_name])){

                        $where[] = [$field_name, 'like', '%' . $request[$field_name] . '%'];

                    }

                }

            }else{

                //字段模糊查询

                if(isset($request[$field_name])){

                    $where[] = [$field_name, 'like', '%' . $request[$field_name] . '%'];

                }

            }

            //范围查询

            if(isset($request[$field_name.'_min'])){

                $where[] = [$field_name, '>=', $request[$field_name.'_min']];

            }

            if(isset($request[$field_name.'_max'])){

                $where[] = [$field_name, '<=', $request[$field_name.'_max']];

            }

        }

        //分页

        if (isset($request['page'])){

            $page = $request['page'];

        }

        if (isset($request['size'])){

            $size = $request['size'];

        }

        //排序

        if (isset($request['order'])){

            $order = $request['order'];

        }

        //查询字段

        if (isset($request['field'])){

            $field = $request['field'];

        }

        //模糊查询

        $list= $this->where($where)->order($order)->field($field)->page($page, $size)->select()->toArray();

        foreach($list as &$l){

         foreach($l as &$o){

         if(strpos($o,$_SERVER['HTTP_HOST']) === false){

         $o = str_replace('upload','http://'.$_SERVER['HTTP_HOST'].'/upload',$o);

         }

         }

        }

        return $list;

    }

    1. 课程信息模块

管理员和学生点击“课程信息”这个按钮可以查看到系统中的课程信息,支持通过课程名称或者上课班级进行查询课程信息,如果想要添加新的课程信息,点击“添加”按钮然后根据提示输入课程信息,点击“提交”后,在课程信息界面就会显示新增的课程信息,可以点击某一课程信息查看课程信息的详情,也可以直接点击“删除”进行删除课程信息。界面如下图4.4所示。

图4.4 课程信息界面图

课程信息逻辑代码如下所示。

public function add()

    {

        if (Request::isPost()) {

            $request = Request::param();

            $request['create_time'] = isset($request['create_time']) ? $request['create_time'] : date('Y-m-d H:i:s');

            $request['update_time'] = isset($request['update_time']) ? $request['update_time'] : date('Y-m-d H:i:s');

            $result = $this->validate($request, $this->validate);

            if (true !== $result) {

                // 验证失败 输出错误信息

                $data['error'] = 30000;

                $data['message'] = $result;

            } else {

if($this->table == 'user'){

$request['password'] = md5($request['password']);

}

$res = $this->add_before($request, $this->table, $this->table_id);

if($res['code'] == 200){

$result = $this->model->add($request, $this->table, $this->table_id);

$this->add_after($this->table);

$data = $result;

}else{

$data['error'] = $res;

}

            }

        } else {

            $data['error']['code'] = 30000;

            $data['error']['message'] = "field的值不能为空!";

        }

        return json_encode($data);

    }

    1. 学生信息模块

点击“学生信息”这个菜单,可以查看到系统中所有添加的学生信息,支持通过学生学号或者姓名或者性别对学生信息进行查询,如果想要了解某一学生的详细信息,点击后面的“详情”会进入详情界面,教师和管理员如果想要选择某一学生,点击“发布成绩”按钮,根据提示填写对应的信息,点击“提交”按钮,信息没有错误在数据库就会提交成功,发布成绩成功。界面如下图4.5所示。

图4.5 学生信息界面图

    1. 学生成绩模块

点击“学生成绩”这个按钮可以查看到自己所有的学生的成绩,支持通过学生学号或者班级名称进行查询学生成绩信息,管理员和教师可以对所添加的学生成绩进行删除。界面如下图4.6所示。

图4.6 学生成绩界面图

学生成绩逻辑代码如下所示。

public function del()

    {

        $request = Request::param();

        $result = $this->model->del_data($request, $this->table, $this->table_id);

        $data = $result;

        return json_encode($data);

}

    1. 平均值数据模块

点击“平均值数据”这个菜单,可以查看到系统中所有添加的平均值数据信息,支持通过学生学号或者姓名或者班级名称对平均值数据信息进行查询,只有管理员用户可以添加新的平均值数据,点击“添加”按钮,根据提示输入平均值数据信息,点击“提交”按钮,新的平均值数据信息就在系统中显示出来了,也可以对添加的平均值数据信息进行删除。界面如下图4.7所示。

图4.7 平均值数据界面图

通过前面章节的介绍,我们可以看到本学生成绩管理已经完成了,但是能不能投入使用还是未知,因为在每个项目正式使用之前必须对开发的项目进行测试,如果不进行测试一旦投入使用可能会出现很多未可知的问题,比如使用人数太多导致系统瘫痪,比如某一功能存在bug信息填写错误等等,这些错误将给使用者带来很多的困扰,甚至造成更大的损失,因此测试是项目投入使用的最后一步,为用户提供一个运行顺畅、完美的项目也就是我们进行最后测试的目的。

    1. 系统部分测试

用户登录功能测试:

表5.1 用户登录功能测试表

测试名称

测试功能

操作过程

预期结果

测试结果

用户登录模块测试

用户登录成功的情况

点击前登录界面输入账号和密码分别输入admin和admin后点击“登录”按钮。

登录成功并调整到用户界面

正确

学生信息添加功能测试:

表5.2 学生信息添加功能测试表

测试名称

测试功能

操作过程

预期结果

测试结果

学生添加模块测试

学生添加成功的情况

在学生的页面中将点击添加,输入学生关信息,输入正确的信息后然后点击“提交”按钮。

提示添加成功

正确

学生添加模块测试

学生添加失败的情况

在学生页面中不填写的学生学号,其他信息正常输入“提交”按钮。

提示“添加失败,信息不能为空”

正确

查询学生成绩信息功能模块测试:

表5.3 查询学生成绩信息功能测试表

测试名称

测试功能

操作过程

预期结果

测试结果

查询学生成绩信息功能测试

查询成功的情况

在学生成绩界面输入课程名称或者学生学号进行查询

查询成功

正确

平均值数据信息添加功能测试:

表5.4 平均值数据添加功能测试表

测试名称

测试功能

操作过程

预期结果

测试结果

平均值数据添加模块测试

平均值数据添加成功的情况

在平均值数据的页面中将点击添加,输入平均值数据相关信息,输入正确的信息后然后点击“提交”按钮。

提示添加成功

正确

平均值数据添加模块测试

平均值数据添加失败的情况

在平均值数据页面中不填写的标题、科目名称,其他信息正常输入“提交”按钮。

提示“添加失败,信息不能为空”

正确

    1. 系统测试结果

通过编写学生成绩管理的测试用例,已经检测完毕用户的登录模块、学生信息添加模块、查询学生成绩模块、平均值数据添加模块的功能测试,在对以上功能得测试过程中,发现了系统中的很多漏送并进行了完善,经过多人在线进行测试,系统完全可以正常运行,当然在后期的维护中系统将不断完善。

  • 6 章 结论

在开发本学生成绩管理之前我胸有成竹,觉得很简单,但在实际的开发中我发现了自身的很多问题,许多编程思想和方法都还没有掌握牢靠,比如Jquery、AJAX 、ThinkPHP等许多PHP Web开发技术,通过开发这个学生成绩管理我成长了很多,懂得了做什么事情都要脚踏实地,不能眼高手低,在本次学生成绩管理的开发中我逐渐掌握逐渐熟悉的技术。

本次学生成绩管理的开发中我还学会了例如良好的编程思想和完善的规划思想。在着手编程之前需要罗列出程序框架的大概,脑海中构建出程序的主题框架。做好这一步我们才能胸有成竹的经行开发项目。当设计框架了熟于心之后,需要思考本次编程所需的主要知识点和技术点,并充分学习。如此一来项目的开发才能循序渐进、如丝般顺滑,长久以往就能养成良好的开发习惯。一个程序好不好还要看出的bug多不多,如果在项目完成前做好bug的查验与预防可能发生的事故才能保证程序的稳定长久性运行。如果项目在完工后出现各种问题自己,那么在进入社会后,不仅会给公司团队带来麻烦和增加不必要的工作,还会导致客户流失,公司对自己的评价下降。

在本次项目中我也暴露了诸多问题。对于PHP的编程知识有所欠缺,环境配置和算法上出现诸多问题,时常导致项目运行出错,或者目标的实现有问题。或者实现想法时算法未优化,使得代码冗长,程序运行不顺畅。

参考文献

[1]张丽景,张文川.基于对比分析法的高职“MySQL数据库”课程设计——以兰州石化职业技术大学为例[J].现代信息科技,2022,6(21):188-191.DOI:10.19850/j.cnki.2096-4706.2022.21.046.

[2] Yang Yifan. Design of online monitoring system serving MySQL database [J]. Automation Technology and Application, 2022, 41(10):179-182.DOI:10.20033/j.1003-7241.(2022)10-0179 -04.

[3] Lin Jiayi. Practical research on hybrid teaching in MySQL database courses in higher vocational colleges [J]. Computer Knowledge and Technology, 2022, 18(26): 133-135.DOI: 10.14004/j.cnki.ckt.2022.1737 .

[4] Jia Shuai. A student performance management system based on multiple digital signatures [P]. Shanxi Province: CN113160006A, 2021-07-23.

[5] Shi Guotao, Li Zehua, Li Yong, Ling Hongwei, Wang Zhengrong. Research on the design and development of student performance management system [J]. Modern Information Technology, 2020, 4(19): 48-52. DOI: 10.19850/j .cnki.2096-4706.2020.19.012.

[6] Ma Tingting, Li Haofeng. Design and implementation of student performance management system [J]. Computer Knowledge and Technology, 2020, 16(24): 81-82+88.DOI: 10.14004/j.cnki.ckt.2020.2678.

[7] Lu Shuang, College Student Innovation and Entrepreneurship Practical Guidance Course Resource Management Platform V1.0. Hebei Province, Huaxin College of Hebei University of Geosciences, 2020-07-01.

[8] Zhou Rui. Thoughts and suggestions on student performance management in colleges and universities [J]. Education and Teaching Forum, 2020(23):15-16.

[9] Lin Yue, Song Shuang, Wang Wenning. Research on student performance management system based on SSH+MySQL [J]. Southern Agricultural Machinery, 2020, 51(09):234.

[10] Duan Huijun. Research on the application of EXCEL functions in student performance management analysis [J]. Fujian Tea, 2020, 42(04): 179-180.

[11] Jing Guangjun, Hao Moxuan. Site navigation system developed based on PHP language [J]. Information and Computers (Theoretical Edition), 2020, 32(08): 88-92.

[12] Xie Xiaoke. Construction of campus student performance management system based on WeChat platform [J]. Digital Communication World, 2020(04):207.

[13] Yuan Ronglian. Analysis on the current situation and countermeasures of student performance management in higher vocational colleges [J]. Guangxi Education, 2020(07):22-23.

[14] Liu Wenjuan. Research and analysis of Wenhua College student performance management system [D]. Yunnan University, 2019.

[15]Rotmianto Mohamad,Wahyudi Eko. Developing Plugin e-DDC as an Additional Application for Senayan Library Management System with PHP Language Programming and MySQL Database[J]. Record and Library Journal,2018,2(1).

[16] Yu Ting. Lessons from the work of a class teacher - the practice and exploration of scientific and dynamic management of student performance [C]//Basic Education Curriculum Reform Research Center of the Ministry of Education. 2017 Research Seminar on the Integration of Regional High-Quality Education Resources Collection of Results. 2017 Collection of results of the annual research seminar on the integration of regional high-quality educational resources, 2017: 492.

Acknowledgments

This concludes the paper, thank you for reading. I would like to express my special thanks to my supervisor. Although I was very busy during my internship and often made corrections while writing my thesis, my supervisor was still very responsible and asked me about the progress of my tasks from time to time and followed up. As for the progress of my thesis, with the help of my advisor, I gradually completed my thesis and procedures. I also learned a lot of knowledge and experience from my advisor, which benefited me a lot. At the same time, I also saw my own shortcomings from my mentor, whether it was on a technical level or in terms of attitude towards work. The mentor was like a mirror that reflected my shortcomings and shortcomings. In addition, I would also like to thank my classmates and people in society who helped me with my papers and programs during my internship. I didn’t know much about the ThinkPHP framework before, but they gave me a lot of help when I was writing programs. The inspiration and reflections also helped me debug and detect the program. Without them, I would not have been able to successfully complete this graduation project. At this point, my graduation project has come to a successful conclusion.

Please follow and like + privately message the blogger to receive the project source code for free

Guess you like

Origin blog.csdn.net/Q_3461074420/article/details/135411871