The data processing of the lesson schedule
· Logging · 4 comments · 5,998 Views

The data processing of the lesson schedule

· Logging · 4 comments · 5,998 Views


Since I went to university, I've been trying to make some changes in the educational administration system of the University. However, the result is very uncomfortable - the Internet is not available So only in the school's educational administration website to download public schedule information to do a little action.
 Timetable data

Freshman - shotgun

When I was a freshman, I entered the Network Technology Department of the student union when I was young and ignorant. Although the work in the Department was busy and occupied most of the spare time, it was good to harvest a girlfriend. Of course, it doesn't matter. What I want to say is: at that time, a deputy department wanted to push a picture of the empty classroom every day in the public account to facilitate students to view it. After a few days, they asked me to discuss whether they could write an empty classroom query system, which would be more convenient. But then Knowledge level and cognitive scope In the face of the schedule of hundreds of classrooms in the school, I was at a loss. Finally, I asked other ministries and commissions of our ministry to sort out the data manually and then input the data into the database manually. I will not tell you that I have recorded the data for a week: (of course, I use the time in the evening to enter it every day. Freshman is really busy. However, no pains, no gains. The final use result is very satisfactory.
 Empty classroom team

Sophomore - Cannon

When I was a sophomore, I had to choose whether to stay in the student union. In my humble opinion, I thought that the students' Union could train their organizational ability. However, I prefer to study technology, so I quit the student union and study the front end. Later, phpexcel happened to be used in the "sign on" development. It was found that it was good to use this method to process excel. So I started to study this in my spare time, and finally realized the batch processing of the whole school's class, teachers and classroom timetable.

The process of dealing with the timetable

If I can't deal with the blank line in the morning and in the afternoon, I can only make a compromise between the class and the class in the afternoon. If I can't deal with the blank line in the afternoon, I can only make a compromise in the third line in the afternoon!

The above small problems are OK to say, but when dealing with the empty classroom, the problem comes again. At the beginning, I wanted to cycle the odd number once a week and even number every two weeks. After this processing, I went online to the small program. As a result, I received feedback that most of the classrooms had classes. I just reflected that I sorted "empty classrooms" into "classrooms with classes"! So I immediately went to the small program platform and returned the version to the version without empty classroom query function. After thinking about it, it was "reversed" and used it array_ diff Change the data with class to data without class. For details, see the code: /freeroom.php#L16-L36 ,ok! Finished processing.

Thanks to the PHP cli mode, you can loop through the data to the end without setting it set_ time_ limit It has to be said that PHP Dafa is good 2333: P


I think the processing method is not efficient enough, so those who are interested in this can visit Educational administration website Download the timetable data for processing, or in the Github It's up to you!

Add a new comment
  1. My guest, would you like to have a try at Amway's own colleges and universities at

    1. @Ji Changxin

      It's very interesting, but at present, the educational administration system of our school doesn't open the Internet, so many things can't be done. It's very sad

      1. Zhang Tianli

        Just use intranet penetration,

        1. @Zhang Tianli

          Yes, it's done now.