Credit Transfer and Academic Planning SystemChapter 2 gives an overall description of the project...

83
Credit Transfer and Academic Planning System Haotian Shi u6158063 Supervised by Dr. Ramesh Sankaranarayana A report submitted for the degree of Master of Computing The Australian National University May 2019

Transcript of Credit Transfer and Academic Planning SystemChapter 2 gives an overall description of the project...

Page 1: Credit Transfer and Academic Planning SystemChapter 2 gives an overall description of the project and presents the stakeholders as well as the objectives. Chapter 3 introduces the

Credit Transfer and AcademicPlanning System

Haotian Shiu6158063

Supervised byDr. Ramesh Sankaranarayana

A report submitted for the degree ofMaster of Computing

The Australian National University

May 2019

Page 2: Credit Transfer and Academic Planning SystemChapter 2 gives an overall description of the project and presents the stakeholders as well as the objectives. Chapter 3 introduces the

Except where otherwise indicated, this report is my own original work.

Haotian Shi31 May 2019

Page 3: Credit Transfer and Academic Planning SystemChapter 2 gives an overall description of the project and presents the stakeholders as well as the objectives. Chapter 3 introduces the

Dedicated to my parents, Zengcheng Shi and Aiqin Meng.

Page 4: Credit Transfer and Academic Planning SystemChapter 2 gives an overall description of the project and presents the stakeholders as well as the objectives. Chapter 3 introduces the

Acknowledgments

For Ramesh Sankaranarayana,who gave me a lot of advice and strong support on the project.

For Shayne Flint,who helped me revise the data models.

For Johan Arnberg,who gave me feedback and helped me seek technical support.

For Paul Melloy,who gave me feedback and advice.

For Robert Edwards,who offered support on setting up the server of the college.

For Qing Wang,who introduced me to this project.

For my parents,who are proud of me and enable me to get here.

For Yuke Lu,who always believes in me and brings me inspirations.

iii

Page 5: Credit Transfer and Academic Planning SystemChapter 2 gives an overall description of the project and presents the stakeholders as well as the objectives. Chapter 3 introduces the

Abstract

The College of Engineering and Computer Science of the Australian National Uni-versity (ANU) partners with many educational institutions in Australia, China, India,Indonesia and so on, which enables the students to continue their academic careers inAustralia’s top university. If a student have completed studies relevant to the coursesof an ANU program, the student may be able to apply credit transfer (also known asadvanced standing), that can then be accredited towards the program. However, it isinconveniently for the students to obtain detailed information about credit transferand recommended study plans. In addition, it is inefficiently for the ANU staff tomaintain the relevant documents. This report presents a web application that helpsthe students know the credit transfer information and plan their academic career inANU, and enables the relevant information to be managed easily.

Keywords: credit transfer, advanced standing, study plan, academic planning

iv

Page 6: Credit Transfer and Academic Planning SystemChapter 2 gives an overall description of the project and presents the stakeholders as well as the objectives. Chapter 3 introduces the

Contents

Acknowledgments iii

Abstract iv

1 Introduction 11.1 Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.2 Motivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.3 Report Outline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

2 Project Overview 32.1 Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32.2 Stakeholders . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32.3 Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42.4 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

3 Design and Implementation 63.1 Development Methodology . . . . . . . . . . . . . . . . . . . . . . . . . . 63.2 Technology Stack . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73.3 Data Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83.4 Data Model Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123.5 Import Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153.6 Working Mechanism . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

3.6.1 URL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183.6.2 View . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193.6.3 Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193.6.4 Template . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

3.7 Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203.8 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

4 Application Features 224.1 Advanced Standing Site . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

4.1.1 Appearance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 224.1.2 Redirection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254.1.3 Cache . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

4.2 Administration Site . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264.2.1 Authorization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264.2.2 Chained Dropdown List . . . . . . . . . . . . . . . . . . . . . . . . 27

v

Page 7: Credit Transfer and Academic Planning SystemChapter 2 gives an overall description of the project and presents the stakeholders as well as the objectives. Chapter 3 introduces the

Contents vi

4.2.3 Search . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294.2.4 Filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 304.2.5 Bold Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 304.2.6 Change History . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32

4.3 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32

5 Deployment and Testing 335.1 Deployment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 335.2 Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

5.2.1 Speed Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 355.2.2 Stress Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36

5.3 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36

6 Conclusion 376.1 Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 376.2 Future Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38

Appendix 45

Page 8: Credit Transfer and Academic Planning SystemChapter 2 gives an overall description of the project and presents the stakeholders as well as the objectives. Chapter 3 introduces the

List of Figures

3.1 The iterative process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73.2 Articulation between BIT and Bachelor of Engineering (Honours) of

ANU . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93.3 Sample study plans for the students of Beijing Institute of Technology . 93.4 Advanced standing details for an articulation of Universitas Indonesia . 103.5 Required courses for an articulation of Universitas Indonesia . . . . . . 103.6 Equivalent courses between ANU and Universitas Indonesia . . . . . . 103.7 UML diagram of advanced standing, made with StarUML . . . . . . . . 123.8 UML diagram of authentication, generated by Navicat Premium . . . . 143.9 Function for importing the data of ANU_Program to the database . . . 163.10 Function for refreshing partner institution badges . . . . . . . . . . . . . 173.11 The MVT working mechanism of a Django application . . . . . . . . . . 18

4.1 The appearance of index.html . . . . . . . . . . . . . . . . . . . . . . . . . 234.2 Tables cropped from articulation.html . . . . . . . . . . . . . . . . . . . . 234.3 Advanced standing details, cropped from articulation.html . . . . . . . 244.4 A study plan cropped from study_plan.html . . . . . . . . . . . . . . . . 244.5 Memcached setting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264.6 Choose permissions for a group in the authorization system . . . . . . . 274.7 The chained dropdown lists . . . . . . . . . . . . . . . . . . . . . . . . . . 284.8 An example of information intensive page . . . . . . . . . . . . . . . . . 294.9 Search a keyword in the change list page of articulations . . . . . . . . . 294.10 Use filters in the right sidebar . . . . . . . . . . . . . . . . . . . . . . . . . 304.11 Required fields in bold . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 314.12 An error message for the empty required field . . . . . . . . . . . . . . . 314.13 Change history of Nanyang Polytechnic . . . . . . . . . . . . . . . . . . . 32

5.1 Structure of the production server . . . . . . . . . . . . . . . . . . . . . . 345.2 Stress test by LoadImpact . . . . . . . . . . . . . . . . . . . . . . . . . . . 36

vii

Page 9: Credit Transfer and Academic Planning SystemChapter 2 gives an overall description of the project and presents the stakeholders as well as the objectives. Chapter 3 introduces the

List of Tables

3.1 Unspecified courses and exemption case . . . . . . . . . . . . . . . . . . 153.2 Templates of the advanced standing site . . . . . . . . . . . . . . . . . . . 20

5.1 PageSpeed Insights scoring . . . . . . . . . . . . . . . . . . . . . . . . . . 35

viii

Page 10: Credit Transfer and Academic Planning SystemChapter 2 gives an overall description of the project and presents the stakeholders as well as the objectives. Chapter 3 introduces the

Chapter 1

Introduction

1.1 Background

The ANU College of Engineering and Computer Science (CECS) partners with avariety of international universities in China, India, Indonesia, Malaysia, Singaporeand so on, which gives students an opportunity to study at Australia’s top university.

Advanced standing (or "credit transfer") is the recognition of students’ prior stud-ies completed at other universities that have equivalence to the studies at ANU. Ad-vanced standing can only be awarded on the basis that the finished courses havesimilar learning outcomes with an ANU course. If students have completed someyears’ studies at ANU partner institutions, generally they are eligible to apply forcredit transfer before starting academic careers in ANU. Once the credits are granted,a student will not be required to study those courses.

The College welcomes students seeking to obtain credits into the Bachelor ofEngineering, Bachelor of Advanced Computing, Bachelor of Software Engineering,Bachelor of Information Technology as well as some master programs.

1.2 Motivation

The relevant information of advanced standing is located in the official website ofCECS. The detailed information for each partner institutions was provided in PDFdocuments at the bottom of the page. In addition, Dr. Ramesh Sankaranarayana, theAssociate Director (Educational Partnerships) of ANU Research School of ComputerScience, maintains a website of more detailed advanced standing information onlyfor computer science students.

However, the information sources above have some drawbacks:

• The information is not easy to find by the students who would like to getadvanced standing.

• The advanced standing details in the two websites are inconsistent, which mayresult in confusion.

1

Page 11: Credit Transfer and Academic Planning SystemChapter 2 gives an overall description of the project and presents the stakeholders as well as the objectives. Chapter 3 introduces the

§1.3 Report Outline 2

• The structures of the PDF documents are inconsistent. Some documents are toosimple and potentially miss some information.

• For some ANU partner institutions, the information in the two websites arecomplementary to each other.

• It is inconvenient and inefficient for the ANU staff to maintain and update a lotof PDF documents.

• The website of Dr Sankaranarayana cannot be maintained by non-technicalANU staff.

To resolve the issues above, we decided to design and develop a website thatintegrates all the information of advanced standing and provides more user-friendlyexperience.

1.3 Report Outline

The rest of the report is organized as follows:

Chapter 2 gives an overall description of the project and presents the stakeholdersas well as the objectives.

Chapter 3 introduces the development methodology, the technology stack ap-plied, how the data model was designed according to data analysis, how the realworld data was imported, and the working mechanism of the web application.

Chapter 4 describes the key features of the application and briefly explains whythey were developed.

Chapter 5 demonstrates how the application was deployed and how it performedin speed test and stress test.

Chapter 6 summarizes the report, presents some limitations of the project andindicates possible future work.

Page 12: Credit Transfer and Academic Planning SystemChapter 2 gives an overall description of the project and presents the stakeholders as well as the objectives. Chapter 3 introduces the

Chapter 2

Project Overview

This chapter will introduce the project at a high-level, present the related stakehold-ers, main objectives and some detailed requirements.

2.1 Description

The Credit Transfer and Academic Planning System is a web-based application thatcaptures the details of academic articulation arrangements between CECS and ANUpartner institutions. The information can be accessed by students to know theiradvanced standing (credit transfer) details and get sample study plans; by relevantANU academic staff (such as the Associate Directors and Program Convenors) andstudent administrators to advice students; by CECS Marketing and external agentsfor marketing and advice; and by the other educational institutions for information.

The site has two entry points, one is used for displaying the information and theother one (administration site) is used for managing the data. The administrationsite can only be accessed by specific people.

2.2 Stakeholders

The main stakeholders involved in this project are:

• Students who are going to apply ANU degrees

• CECS Associate Directors (Educational Partnerships) and Program Convenors

• ANU Student Service staff

• ANU Marketing staff

Before the project started, I talked to the stakeholders to identify the require-ments. As the concepts of advanced standing are hard to designed as data models,I had to keep in touch with the stakeholders while designing and implementing tomake sure they are satisfied with my work.

3

Page 13: Credit Transfer and Academic Planning SystemChapter 2 gives an overall description of the project and presents the stakeholders as well as the objectives. Chapter 3 introduces the

§2.3 Objectives 4

2.3 Objectives

The Credit Transfer and Academic Planning System integrates all the informationabout advanced standing and sample study plans with proper navigation so that thestakeholders could easily find the information they need.

In the administration site, the information can be updated by specific people suchas the Associate Directors (Educational Partnerships) and specific staff in StudentService or Marketing. Some of the information may only be available to specifiedstakeholders, which means that the administrators have different privileges towardsdifferent data entities.

The main tasks can be summarized as the following:

1. Display the information about advanced standing and sample study plans in asub-site (called "advanced standing site").

2. Grant authorizations to specific ANU staff to manage the information in an-other sub-site (called "administration site").

3. Engage the stakeholders in the process of design and implementation for feed-back and evaluation.

Some other requirements raised by the stakeholders are:

1. The courses in the pages should be clickable and could redirect the viewer tocorresponding ANU course pages.

2. Make a dropdown list for academic year located at the top right corner of thearticulation page, so that the viewer could conveniently check the informationfor different year.

3. For clarity, use bullet points before each course in the sample study plan tables.

4. Make the course mappings editable with plain text for the ANU partner insti-tutions.

From my perspective, the following items should be tried to implemented tobenefit the stakeholders:

1. All the information that displayed in tables should follow an uniform style forconsistency.

2. Although the stakeholders did not raise any requirements for user interface, itwould be better if the look and feel of the website is consistent with CECS style.

3. It can be predicted that there would be too much information in the admin-istration site. Some features for finding particular records efficiently might bevery useful.

Page 14: Credit Transfer and Academic Planning SystemChapter 2 gives an overall description of the project and presents the stakeholders as well as the objectives. Chapter 3 introduces the

§2.4 Summary 5

4. Some hint messages in the administration site would be helpful.

5. Display "Last update time" for the articulation arrangements and sample studyplans.

6. As suggested on the CECS advanced standing site, it is a studentâAZs responsi-bility to ensure the information is correct and satisfies the degree requirementsof the program. The page should remind the users that it is only a guide toassist students with their enrolment planning.

7. The images of the website should be compressed for better loading speed.

2.4 Summary

This chapter describes an overview of the Credit Transfer and Academic PlanningSystem which is a web-based application with two entry points (sub-sites). It alsotalks about the stakeholders of the project and how do I meet the requirements ofthem. Finally, I summarized the general objectives of the product as well as somespecial requirements that raised by the stakeholders. In the next chapter, I will ex-plain how the application was designed and implemented.

Page 15: Credit Transfer and Academic Planning SystemChapter 2 gives an overall description of the project and presents the stakeholders as well as the objectives. Chapter 3 introduces the

Chapter 3

Design and Implementation

In this chapter, I will explain the development methodology and technology stackused, and why they were determined. Then the process design and implementationof the data models and how the data can be imported will be discussed. In addition,the working mechanism of the application and the security considerations will bedemonstrated.

3.1 Development Methodology

This project is my individual project so I have to do requirements analysis, designing,coding, testing, deploying, document writing all by myself. As it is discussed inSection 2.2, the stakeholders involved in this project are students, CECS AssociateDirectors, Program Convenors, ANU Student Service staff and ANU Marketing staff,so it is hard to know all the requirements from the start. Under such circumstances,I determined to use the agile software development methodology.

As Abbas et al. demonstrate in [1] [2], agile is a development methodology basedon adaptive, iterative and incremental approach. The project was developed in mul-tiple small working cycles called iterations, which is illustrated in Figure 3.1 made byZinchenko [3]. Each iteration includes requirements analysis, design, coding, testingand evaluation. In addition, the project is growing incrementally as new functionalityrequired by the stakeholders or figured out by myself is added within each iteration.

6

Page 16: Credit Transfer and Academic Planning SystemChapter 2 gives an overall description of the project and presents the stakeholders as well as the objectives. Chapter 3 introduces the

§3.2 Technology Stack 7

Figure 3.1: The iterative process

According to Kotaiah et al. [4], the agile methodology is aimed at involving theclients with developer and removing the communication gap between them. Thus, inthe whole process of the development, I communicated with the stakeholders face-to-face every one or two weeks as well as responded to their feedback and evaluationabout my work of every iteration. By listening to the suggestions of the stakeholders,I could get back to the right track when the new functionality worked not as theyexpected. Also, this methodology enabled me to focus on people and developmentitself, rather than documentations writing.

3.2 Technology Stack

The technology stack for this project and the rationale is listed as follows:

• Python: an interpreted, high-level, general-purpose programming language.The project is built on Python version 3.6.

• Django: as stated by Django Software Foundation [5], Django is a high-levelPython Web framework that encourages rapid development and clean, prag-matic design. Built by experienced developers, it takes care of much of thehassle of web development, so I can focus on writing my application withoutneeding to reinvent the wheel. The release used in this project is 2.2 LTS, whichbelongs to a long-term support release series. This release will get securityand data loss fixes applied until April 2022, guaranteed by Django SoftwareFoundation.

Page 17: Credit Transfer and Academic Planning SystemChapter 2 gives an overall description of the project and presents the stakeholders as well as the objectives. Chapter 3 introduces the

§3.3 Data Analysis 8

• PostgreSQL: as stated by the PostgreSQL Global Development Group [6], Post-greSQL is an open source object-relational database system with over 30 yearsof active development that has earned it a strong reputation for reliability, fea-ture robustness, and performance. This relational database is widely used inANU, so it would be easy for ANU technical staff to maintain in the future.

• Bootstrap: a free front-end framework for faster web development. Based onBootstrap 4, I can design and implement the user interface of the project thatconforms to the style of CECS website.

• Ubuntu Server: an open source software operating system. The product willbe deployed on the Server Edition of Ubuntu 18.04 LTS.

• Gunicorn: a Python Web Server Gateway Interface (WSGI) HTTP server, whichis used for translating HTTP requests from the clients to Python calls that theapplication can process.

• Nginx: a free, open-source, high-performance HTTP server and reverse proxy.NGINX Inc. [7] claims that Nginx is famous for its high performance, stability,rich feature set, simple configuration, and low resource consumption. It isset up in front of Gunicorn as a reverse proxy to take advantage of its highperformance connection handling mechanisms and the security features.

3.3 Data Analysis

The data sources for this project is the advanced standing site of CECS and thearticulation site maintained by Dr. Ramesh Sankaranarayana. The data of the firstdata source is a lot of documents in PDF format while the data of the second datasource is the contents of HTML pages. To analyze the data structure, I took somerepresentative screenshots from the data sources. The tables of articulation, samplestudy plans, advanced standing details, required courses of partner institution areillustrated in Figure 3.2, Figure 3.3, Figure 3.4 and Figure 3.5 respectively, retrievedfrom the first data source. The table of equivalent courses illustrated in Figure 3.6 isretrieved from the second data source.

Page 18: Credit Transfer and Academic Planning SystemChapter 2 gives an overall description of the project and presents the stakeholders as well as the objectives. Chapter 3 introduces the

§3.3 Data Analysis 9

Cropped from ANU & Beijing Institute of Technology advanced standing reference guide [8]

Figure 3.2: Articulation between BIT and Bachelor of Engineering (Honours) of ANU

(a) A sample study plan for Bachelor of Advanced Computing

(b) A sample study plan for Bachelor of Software Engineering

Cropped from ANU & BIT Bachelor of Advanced Computing (Honours) Sample Study Plan [9] andANU & BIT Bachelor of Software Engineering (Honours) Sample Study Plan [10] respectively

Figure 3.3: Sample study plans for the students of Beijing Institute of Technology

Page 19: Credit Transfer and Academic Planning SystemChapter 2 gives an overall description of the project and presents the stakeholders as well as the objectives. Chapter 3 introduces the

§3.3 Data Analysis 10

Cropped from ANU & UI Sample Study Plan, BAC, Even Year, Intelligent Systems Specialisation [11]

Figure 3.4: Advanced standing details for an articulation of Universitas Indonesia

Cropped from ANU & UI Sample Study Plan, BAC, Even Year, Intelligent Systems Specialisation [11]

Figure 3.5: Required courses for an articulation of Universitas Indonesia

Cropped from Rational for advanced standing towards the Bachelor of Advanced ComputingProgram [12]

Figure 3.6: Equivalent courses between ANU and Universitas Indonesia

Page 20: Credit Transfer and Academic Planning SystemChapter 2 gives an overall description of the project and presents the stakeholders as well as the objectives. Chapter 3 introduces the

§3.3 Data Analysis 11

By observing the advanced standing information in the data sources and thefigures above, I summarized a collection of features listed as follows:

1. Each country or region has at least one partner institution.

2. Each institution has at least one articulation arrangement with ANU on eithercomputer science or engineering.

3. Each articulation arrangement is a relationship between an ANU degree and apartner institution degree.

4. An ANU degree consists of one ANU program and some majors or specializa-tions. The number of major or specialization can be zero because some ANUprograms do not hold any major or specialization.

5. A partner institution degree consists of one partner program and at least onemajor.

6. For all the existed articulations, the time that the students should study at ANUvaries from 1 year to 3 years.

7. An articulation may associated with some sample study plans.

8. For some articulations, the sample study plans are different in semester 1(February) intake and semester 2 (July) intake. In this case, the navigationfor the sample study plans can have two options.

9. For some articulations, the sample study plans vary in both commencementyear (odd year or even year) and intake semester (February or July). In this case,the navigation for the sample study plans can have four options. Consequently,if I make a table for displaying the study plan, it should have 2 columns forsemesters and 3 rows for years at most (except the headings).

10. For some ANU programs, the students are required to complete 60 days ofrelevant industrial experience as part of the requirements for their degree (e.g.the sample study plan in Figure 3.3(b)). In this case, there should have an extrarow under the first year.

11. The advanced standing details in Figure 3.4 are a list of ANU courses fromwhich the students can receive credits. The table of equivalent courses in Fig-ure 3.6 describes the equivalent courses between ANU and a partner university.The tables of advanced standing details and equivalent courses have some in-formation in common and can be merged into one table.

12. The partner universities may have multiple courses that are equivalent to oneANU course.

Page 21: Credit Transfer and Academic Planning SystemChapter 2 gives an overall description of the project and presents the stakeholders as well as the objectives. Chapter 3 introduces the

§3.4 Data Model Design 12

3.4 Data Model Design

The project was logically divided into two subsystems, the advanced standing systemand the authentication system. The first subsystem covers all the relevant informa-tion about advanced standing (credit transfer) and sample study plans. The secondsubsystem involves user accounts and privileges mentions in section 2.3.

Based on the analysis towards the data sources, the data models of advancedstanding are designed and the corresponding UML diagram is shown in Figure 3.7.

Figure 3.7: UML diagram of advanced standing, made with StarUML

There are 11 classes in the diagram in which Partner_Program and ANU_Programextend Program. Thus, 10 tables were established for advanced standing. As it hasbeen mentioned in section 2.3, the stakeholders required that the names of ANUprograms, courses, majors and specialisations in the pages should be clickable andlead the visitors to the pages of ANU official. However, it is noticeable that noURL field contained in ANU_Course, ANU_Mjor_or_Specialisation and ANU_Program.As suggested by Dr. Ramesh Sankaranarayana, the URLs for the instances of theseclasses are constructed by some URL prefixes and their codes. I observed the URLsof the items in ANU Programs and Courses Catalogues and found that the URLsfollow such patterns:

Page 22: Credit Transfer and Academic Planning SystemChapter 2 gives an overall description of the project and presents the stakeholders as well as the objectives. Chapter 3 introduces the

§3.4 Data Model Design 13

• Base URL: programsandcourses.anu.edu.au/

• Program URL: [Base URL] + program/ + [program code]

• Course URL: [Base URL] + course/ + [course code]

• Major URL: [Base URL] + major/ + [major code]

• Specialisation URL: [Base URL] + specialisation/ + [specialisation code]

The constructed URLs always redirect to the pages of the latest year. It is unlikelythat ANU changes the URL patterns for programs and courses, but if it happens,we can simply modify our base URL parameters to make it work again. The URLconstruction is processed by the application, with the most efficient way of Pythonstring concatenation.

Django has in-built support for user accounts, groups, permissions and cookie-based user sessions. The django.contrib.auth module contains the core of theauthentication system which handles both authentication and authorization. Briefly,authentication is about validating a user’s credentials like username and passwordto verify the identity, and authorization determines what an authenticated user isallowed to do. The UML diagram of the authentication system is shown in Figure3.8. For more details, see [13].

Page 23: Credit Transfer and Academic Planning SystemChapter 2 gives an overall description of the project and presents the stakeholders as well as the objectives. Chapter 3 introduces the

§3.4 Data Model Design 14

Figure 3.8: UML diagram of authentication, generated by Navicat Premium

Page 24: Credit Transfer and Academic Planning SystemChapter 2 gives an overall description of the project and presents the stakeholders as well as the objectives. Chapter 3 introduces the

§3.5 Import Data 15

The main elements of the authentication system are:

• Users: Administrators of the admin site. The project is designed to have twosuperusers with all permissions.

• Permissions: Boolean value (True/False) indicates whether a user is able toperform a certain operation.

• Groups: A group consists a label and a collection of permissions. The groupsshould be created based on staff roles and responsibilities. Assigning users togroups is more preferred than assigning permissions to users directly.

3.5 Import Data

The data of the database was half imported by my Python scripts and half importedmanually. I had developed three Python scripts for importing data when the web-site was initially set up, which will make the administrator’s work easier. All thescripts and data files are located at the import_data directory under the applicationdirectory. To run anyone of the scripts, we can just call python [filename] in theterminal.

As this project is designed for CECS, an overwhelming number of courses in-volved in advanced standing are computer science courses (course codes start withCOMP) and engineering courses (course codes start with ENGN). Meanwhile, a fewnumber of courses are math courses (course codes start with MATH), physics courses(course codes start with PHYS) and statistics courses (course codes start with STAT).Consequently, we should import all the COMP and ENGN courses but only a few ofspecific MATH, PHYS, STAT courses to the database. Otherwise, there would be toomuch irrelevant courses that distract the users when selecting courses in the multipleselection form. In addition, there are some unspecified courses and exemption casesin advanced standing. Some examples are shown in Table 3.1.

Code Name

UNSP-IT-0306 6 units of unspecified 3000-level IT electivesUNSP-NONIT-0112 12 units of unspecified 1000-level non-IT electives

EXEMPT-MATH1005 Exemption from MATH1005 Discrete Mathematical Models

Table 3.1: Unspecified courses and exemption case

These concepts are regarded as ANU courses in this project for convenientlyediting the advanced standing details and equivalent courses. It is very easy todifferentiate the special courses from the course dataset because the course code ofany special course is very long (at least 8 characters) while the course code of a realcourse is 4 letters followed by 4 digits. The information of MATH, PHYS, STAT andspecial courses was saved in a file called anu_course.txt.

Page 25: Credit Transfer and Academic Planning SystemChapter 2 gives an overall description of the project and presents the stakeholders as well as the objectives. Chapter 3 introduces the

§3.5 Import Data 16

The first script is extract_anu_courses.py which is used for extracting thecodes and names of ANU courses to data files in plain text format. This scriptuses Beautiful Soup, a HTML and XML documents parser, to parse the COMPand ENGN course pages downloaded from ANU Programs and Courses Catalogueand extract the course information. The data would be saved in comp_courses.txtand engn_courses.txt respectively. In the data files, the lines start with a # (sharpsymbol) are regarded as comments and will be skipped when reading by the scripts.

The second script is import_data.py which is aimed at importing the data ofCountry, ANU_Program, ANU_Major_or_Specialisation, ANU_Course and Partnerfrom text files to the database. An object relational mapper (ORM) is a mechanismthat automatically converts the data stored in relational databases tables into ob-jects that are commonly used in programming, which enables us to interact withthe database easier. As mentioned in [14], to connect the database using the DjangoORM module without starting the application, the project settings need to be config-ured and setup first. For each data model, the terminal would display the statisticalinformation about how many records found in the data file and how many recordsare added to the database. A code snippet for importing ANU programs is shown inFigure 3.9.

1 def persist_anu_major_or_specialisation():2 print(’[ANU_Major_or_Specialisation]: \3 Begin persisting majors and specialisations...’)4 with open(’anu_major_or_spec.txt’, ’r’, encoding=’utf-8’) as f:5 add = 0 # the number of records being added to the database6 records = 0 # the number of valid records7 for line in f:8 line = line.strip()9 # skip the comments

10 if not line or line.startswith(’#’):11 continue12 records += 113 code, name, career = line.split(’;’)14 # if not existed in the database15 if not ANUMajorOrSpecialisation.objects.filter(code=code, career=career)16 .exists():17 m = ANUMajorOrSpecialisation(code=code, name=name, career=career)18 m.save()19 add += 120 # count the number of records in the database21 total = ANUMajorOrSpecialisation.objects.all().count()22 print(’[ANU_Major_or_Specialisation]: \23 {} records found in the data file.’.format(records))24 print(’[ANU_Major_or_Specialisation]: \25 Persisting data finished. {} records in total. {} new records added.\n’26 .format(total, add))

Figure 3.9: Function for importing the data of ANU_Program to the database

Page 26: Credit Transfer and Academic Planning SystemChapter 2 gives an overall description of the project and presents the stakeholders as well as the objectives. Chapter 3 introduces the

§3.5 Import Data 17

The PostgreSQL Global Development Group [15] and Ellingwood [16] indicatethat it is easy to back up the database to files or restore a database from the data filesof PostgreSQL. However, the images of the institution badges cannot be restoredfrom the data files. To address this issue, the last script, refresh_badges.py, is usedto upload the images for existed partner institutions after the restore operation. Thecode checks whether the badge field of a Partner record is flagged as "True". If so, itgenerates an universally unique identifier as the file name of the image and links itto the corresponding Partner record. As before, the Django settings are configuredand setup in this script. The sample code can be seen in Figure 3.10.

1 def persist_partners():2 print(’[Partner]: Begin refreshing badge images...’)3 badge_base_path = ’badges/’4 with open(’partner.txt’, ’r’, encoding=’utf-8’) as f:5 add = 0 # the number of records being added to the database6 records = 0 # the number of valid records7 for line in f:8 line = line.strip()9 # skip the comments

10 if not line or line.startswith(’#’):11 continue12 records += 113

14 # Standard format for values: country;name;abbr;description;url;badge15 # Note that the delimiter is |16 # Use ’\\’ to separate paragraphs in description field17 values = line.split(’|’)18

19 if Partner.objects.filter(name__iexact=values[1]).exists():20 p = Partner.objects.get(name__iexact=values[1])21 if values[5]:22 # refresh the images for existed partner institution23 with open(badge_base_path + values[5], ’rb’) as badge:24 p.badge.save(values[5], File(badge))25 add += 126 p.save()27 print(’[Partner]: The badge of {} has been refreshed.’28 .format(values[1]))29

30 total = Partner.objects.all().count()31 print(’[Partner]: {} records found in the data file.’.format(records))32 print(’[Partner]: Refreshing badge images finished. \33 {} records in total. {} new images added.\n’.format(total, add))

Figure 3.10: Function for refreshing partner institution badges

Page 27: Credit Transfer and Academic Planning SystemChapter 2 gives an overall description of the project and presents the stakeholders as well as the objectives. Chapter 3 introduces the

§3.6 Working Mechanism 18

3.6 Working Mechanism

In a data-driven website, a web application runs on a server and waits for HTTPrequests from the clients. When the application receives a request, it might interactwith the database and process the retrieved data to satisfy the request. Then theapplication will return a response to the client. As for a Django web application, ituses the Model-View-Template (MVT) mechanism. Django organizes the code thatprocesses the requests into four files illustrated in Figure 3.11.

The diagram is from [17]

Figure 3.11: The MVT working mechanism of a Django application

3.6.1 URL

Berners-Lee [18], the inventor of World Wide Web, argues that it is essential for ahigh quality web application to have clear and elegant URL patterns. In urls.py Idefined the mappings between URL path expressions (URL patterns) to correspond-ing Python functions (the views). Each URL pattern has a name which is used toidentify a view. When the application receives a HTTP request, Django consults eachURL pattern in order and tries to match the URL request. If no pattern matched, itwould return a HTTP 404 not found error. Otherwise, the matched view would takeover and process the request.

Page 28: Credit Transfer and Academic Planning SystemChapter 2 gives an overall description of the project and presents the stakeholders as well as the objectives. Chapter 3 introduces the

§3.6 Working Mechanism 19

3.6.2 View

A view is a request handler function, which receives HTTP requests from web clientsand returns HTTP responses. The view can query the database via models if neces-sary to satisfy the request. Generally, the response is a HTML document of a webpage or a HTTP 404 error if the requested resources cannot be found on the server.The views of the application are written in views.py.

3.6.3 Model

The Django model is an implementation of the ORM concept mentioned in Section3.5. The structure of the application’s data is defined by models which are Pythonobjects in models.py. A class in UML diagram is represented by a model that notonly contains the essential fields but also the behaviors of the entity. Generally, eachmodel is mapped to a single table in the database and each attribute of the modelrepresents a database field. The models’ general business logics (adding, updatingand deleting operations) had been predefined by Django and some of them are over-ride by me. The special behaviours of a model are defined by in-class methods withthe @property decorator. With all of this, Django can automatically generate andupdate the tables, migrate the data, and provide us a convenient way to manipulatethe data via Python objects.

For each model, the sorting order had been designated on some fields as meta-data, so that I did not have to order the data when a list of records was retrieved.For example, the ordering of PartnerProgram was set as on partner and name. As aconsequence, in the partner program list, the records were grouped and ordered bypartner name, then ordered by program name alphabetically.

3.6.4 Template

The template layer of Django separates Python code and HTML files, the Python codegoes in views and HTML goes in templates. The templates enable the applicationgenerate HTML dynamically. A template is generally a HTML file with placeholdersfor inserting dynamic content described in Django template language (DTL). Afterquerying the database by models, a view can dynamically create an HTML pageusing a template, rendering it with the query result.

I have defined 6 templates for the advanced standing site. Their names andpurposes are shown in Table 3.2.

Page 29: Credit Transfer and Academic Planning SystemChapter 2 gives an overall description of the project and presents the stakeholders as well as the objectives. Chapter 3 introduces the

§3.7 Security 20

Name Purpose

base.html A basic template to be extendedindex.html The index page

partners.html Display the partner institutions in a country/regionpartner_degrees.html Display the degrees of an ANU partner

articulations.html Display the articulation arrangementsstudy_plans.html Display the tables of sample study plans

Table 3.2: Templates of the advanced standing site

The Django templates engine enables us to reuse any templates by extendingthem in other templates, which means that we can use the same content and layoutin more than one place. base.html is a basic template to be extended by the othertemplates. It defines the basic page layout (header, footer, icons), includes some staticfiles (CSS files and fonts) and reserves some placeholders to be filled. The navigationand appearances of the other five templates will be shown in the next chapter.

3.7 Security

Website attacks and cyber attacks are growing in numbers every day. It is importantto consider the security issues for the interests of the stakeholders when developingthe website. To protect the application against malicious attacks, I had taken theadvantages of Django and Nginx on various aspects.

User password is the key to enter the administration site. When adding a newuser or changing a password, the application would be hashed by the pbkdf2_sha256algorithm for 150,000 iterations with random salt added. The raw passwords werenot stored in the database. More restrictions on the password will be covered inSection 4.2.1.

Cross site scripting (XSS) attack is a type of injection, in which malicious scriptsinject into the web browser of a user. It can be achieved by getting the user toclick a link which will cause the malicious script to be executed by the web browser.Django template system could protect the application against the majority of XSSattacks by the auto-escaping mechanism. For example, it would convert the script<script>alert(’XSS’)</script> to plain text so that the alert box can not pop up.For more details, see [19].

Cross site request forgery (CSRF) attack enables a malicious user to performactions using the authentication of another user. This had been protected by DjangoCSRF middleware in the view layer. The administration site had activated the CSRFprotection mechanism and it should not be deactivated by any future developer.

Page 30: Credit Transfer and Academic Planning SystemChapter 2 gives an overall description of the project and presents the stakeholders as well as the objectives. Chapter 3 introduces the

§3.8 Summary 21

SQL injection is a type of attack where a malicious user is able to insert cus-tom SQL statements into an entry field for execution. In the model layer of thisapplication, all the queries are constructed with query parameterization to protectthem from injection, which means that the SQL statements are separated from theparameters.

Distributed denial of service (DDoS) attack is comprised of several infected sys-tems which all target a single system to make it out of service. It could be protectedby Nginx, a reverse proxy of the server, which will be discussed in Section 5.1.

SSL/HTTPS is important for the security of modern websites. Secure SocketsLayer (SSL) is the standard technology for keeping a connection secure and safe-guarding the sensitive data that is being transferred. Hyper Text Transfer ProtocolSecure (HTTPS) would appear in the URL field of a web browser when a website issecured by an SSL certificate. This was implemented by proper settings described in[20] and SSL certificate and private key files configured in Nginx.

3.8 Summary

This chapter introduces the agile development methodology and the technologystack used in this project and explains the rationale behind them. Then we builddata models based on the analysis of the data sources and discuss how the Pythonscripts for importing data is implemented. Also, the working mechanism of the webapplication is explained with an illustration. Finally, the security issues are discussed.In the next chapter, I will display some main features of the application.

Page 31: Credit Transfer and Academic Planning SystemChapter 2 gives an overall description of the project and presents the stakeholders as well as the objectives. Chapter 3 introduces the

Chapter 4

Application Features

This application has two entry points (sub-sites), one is the advanced standing sitefor display the information of articulation arrangements and sample study plans,the other one is administration site for managing the data. In this chapter, I willintroduce the features of the two sites. For some key features, I will also brieflyexplain why they were included and how they were implemented.

4.1 Advanced Standing Site

The advanced standing site is used for displaying the information of advanced stand-ing (credit transfer) and sample study plans. A browser can find a particular artic-ulation arrangement by selecting a country, an institution and a degree with somemajors.

4.1.1 Appearance

To make the look and feel be consistent with the style of CECS official site, I studythe layout and color scheme of the CECS site and then develop a CSS file for theadvanced standing site. The styles in my CSS file are applied in all the pages forconsistency. The index page and some tables cropped from articulation page andstudy plan page can be seen in Figure 4.1, Figure 4.2, Figure 4.3 and Figure 4.4respectively.

Credit is given to the sources used in the pages:

• The text in the index page and ANU logo located in banner was retrieved fromthe first data source mentioned in Section 3.3.

• The image located above the text was downloaded from the Facebook accountof CECS.

• The information presented in the site was produced according to the content ofthe data sources mentioned in Section 3.3.

22

Page 32: Credit Transfer and Academic Planning SystemChapter 2 gives an overall description of the project and presents the stakeholders as well as the objectives. Chapter 3 introduces the

§4.1 Advanced Standing Site 23

Figure 4.1: The appearance of index.html

Figure 4.2: Tables cropped from articulation.html

Page 33: Credit Transfer and Academic Planning SystemChapter 2 gives an overall description of the project and presents the stakeholders as well as the objectives. Chapter 3 introduces the

§4.1 Advanced Standing Site 24

Figure 4.3: Advanced standing details, cropped from articulation.html

Figure 4.4: A study plan cropped from study_plan.html

Page 34: Credit Transfer and Academic Planning SystemChapter 2 gives an overall description of the project and presents the stakeholders as well as the objectives. Chapter 3 introduces the

§4.1 Advanced Standing Site 25

4.1.2 Redirection

As required by the stakeholders, some specific text, such as courses and majors,should be clickable in order to redirect the browser to relevant pages of ANU officialwebsite. This feature was implemented by constructing URLs for the objects andmaking them in blue color. For example, clicking the ANU program in Figure 4.2,the courses in Figure 4.3 and Figure 4.4, the majors and specialisations in some otherpages will open a new tab in the web browser and take the view to correspondingpages of ANU. In addition, if the url field of a partner university has been filledcorrectly in the administration site, the viewers can click the name of an ANU partneruniversity to browse its official site.

With this feature, a student can easily access the official pages and get a betterunderstanding of the credit arrangement and sample study plans. An ANU staff canconveniently visit the official websites of ANU partner universities to check their lat-est information, and then update any content that has changed in the administrationsite.

4.1.3 Cache

Wong and Yeung [21] [22] emphasize that web cache is an effective approach to im-prove the performance of a web application and reduce the overall network activity.When receiving a request from a client, the web server has to do a lot of computation,such as querying the database, processing business logic, rendering the template, tocreate a page that the view sees. Thus, it is much slower to produce dynamic contentfor the requests than directly serving static content. To cache something is to save theresult of an expensive computation in a specific area so that the application does notneed to perform the computation next time. The cache system is basically workingin the following way:

• Given a URL, try to find that page in the cache

• Retrieve the cached page if it can be found in the cache

• Otherwise, compute the page and save it in the cache

According to Dormando [23], Memcached is a free, open source and high perfor-mance memory object cache system that can store the results of database calls, APIcalls or page rendering. It is purely a memory-based cache system and widely usedby some famous sites such as Wikipedia and Facebook to reduce database access andsignificantly improve the site performance. For more details, see [24]. The advancedstanding site uses Memcached as the cache backend to store the pages for 15 to 60minutes. The data is directly stored in memory which is allotted a specified amountof space. After installing python-memcached, a Memcached library for Python, thecache was set up by appending a code snippet (shown in Figure 4.5) to settings.pywhich is the global setting file of the project.

Page 35: Credit Transfer and Academic Planning SystemChapter 2 gives an overall description of the project and presents the stakeholders as well as the objectives. Chapter 3 introduces the

§4.2 Administration Site 26

1 CACHES = {2 ’default’: {3 ’BACKEND’: ’django.core.cache.backends.memcached.MemcachedCache’,4 ’LOCATION’: ’127.0.0.1:11211’,5 }6 }

Figure 4.5: Memcached setting

In order to let the administrators practice the data management operations andadd more data, the site should be able to show the changes instantly, so the cachesystem has been turned off by commenting the code above. The views for articulationpage and study plan page need to do more calculations than the others. The cachecan be turned on easily in the future when the data do not have frequent updates.

4.2 Administration Site

The administration site is used for managing the content presented in the advancedstanding site. It has some useful features that can make the administrators work effi-cient and convenient. Only ANU staff are permitted to access this site, but differentroles would have different privileges granted by the superusers towards the data.

4.2.1 Authorization

As demonstrated in Section 3.4, the authorization system is achieved by the con-cepts of permission, group and user. Each data model has four kinds of permissions,adding records, changing records, deleting records and viewing records. The supe-rusers always have all the permissions on all the data of the website. Generally, thegroups should only be added and updated by the superusers. I had created two su-perusers as the default users, in which one is for the Associate Director (EducationalPartnerships) and the other one is for the current developer. The superuser shouldcreate all the groups with proper permissions before setting up any users, such asStudent Service and Marketing. One group must have one name and a collectionof permissions that fit the responsibilities of the role. The page of adding group isshown in Figure 4.6.

Page 36: Credit Transfer and Academic Planning SystemChapter 2 gives an overall description of the project and presents the stakeholders as well as the objectives. Chapter 3 introduces the

§4.2 Administration Site 27

Figure 4.6: Choose permissions for a group in the authorization system

The multiple selection box on the left side is all the permissions available inthis website while the box on the right side displays the assigned permissions ofthe group. For example, we create a new group for ANU Student Service staff.This group could have all the permissions on the data of the advanced standing siteexcept the changing and deleting permissions on Country and Partner. One reasonis that these records are stable and usually do not need to be changed. The othermore important reason is to prevent any mistaken deleting. They are associatedwith many other data models, which means that deleting one record would resultin deleting many other records cascadingly. Although the administration site wouldshow confirmation message before any deleting, the superuser should follow theprinciple that only assign permissions with respect to responsibilities.

When adding a new user or changing the password, the new password mustconform to the following rules for security consideration:

1. It must not be too similar to username.

2. It must contain at least 8 characters.

3. It can not be a commonly used password, such as "sunshine", "password1".

4. It can not be entirely numeric.

4.2.2 Chained Dropdown List

In the data entities of the advanced standing site, one entity might associate withsome other entities. It is inconvenient to find the related records when adding anew record. For example, when the user adds a new record of sample study plan,it is quite hard to find a particular record of articulation in a long list where theinformation is intensive. To make this work easy and simple, chained dropdownlists were introduced.

Page 37: Credit Transfer and Academic Planning SystemChapter 2 gives an overall description of the project and presents the stakeholders as well as the objectives. Chapter 3 introduces the

§4.2 Administration Site 28

Chained dropdown lists mean that all the dropdown lists are chained. The chang-ing of the value of one list may affect the values in its chained list. This featurewas implemented by including django-smart-selects, a third-party Python libraryfor Django application. According to the jQuery Foundation [25], Ajax, short forasynchronous JavaScript and XML, is a set of web development techniques, whichenables a page to request data from the server without a browser page refresh.django-smart-selects uses Ajax to load the applicable chained data dynamicallywhen the value of a field changes. The library also has another useful feature thatit can automatically select an option if there is only one, otherwise the user has tomake a choice.

With the support of this library, some fields of the data models were set ascustom chained fields. As a result, multiple related fields were chained in a row.For example, the data model Partner_Degree has two chained fields, Partner andPartner_Program, so that a user can get a list of partner programs that only belongto the specified partner institution rather than searching visually from a long list ofpartner programs. In the case shown in Figure 4.7(a), the partner program was au-tomatically selected because there was only one program existed for Beijing Instituteof Technology. Another example is in the data model Study_Plan which has threechained fields, Partner, Partner_Degree, Articulation. As illustrated in Figure4.7(b), partner degrees would be filtered by a partner and articulations would befiltered by a partner degree, which makes the adding process easy.

(a) Two chained dropdown lists for Partner Degree

(b) Three chained dropdown lists for Study Plan

Figure 4.7: The chained dropdown lists

The original library has a fatal bug in a JavaScript file, which makes it cannotwork with Django 2.2. This bug had been fixed by replacing chainedfk.js with thecorrect file chainedfk.js located in a public repository on my Github.

Page 38: Credit Transfer and Academic Planning SystemChapter 2 gives an overall description of the project and presents the stakeholders as well as the objectives. Chapter 3 introduces the

§4.2 Administration Site 29

4.2.3 Search

As illustrated in Figure 4.8, some pages might contain too much information whichmakes it hard for an administrator to find particular records.

Figure 4.8: An example of information intensive page

The users can use the search box located at the top left corner of any change listpages to find records. All the key fields of the data entities can be searched. For eachsearching request, Django ORM generates a SQL query with the ILIKE keyword inthe WHERE clause of PostgreSQL, so the search is case-insensitive which would benefitthe users. For more details, see [26] [27]. Also, to get the records of an entity, a usercan search the key fields of its related entity (associated by foreign key). For example,the abbreviation field of Shandong University Weihai is "SDUW". As shown in Figure4.9 to get the Articulation records of this university, the feasible keywords couldbe "sd", "sdu", "weihai", "shandong" and so on.

Figure 4.9: Search a keyword in the change list page of articulations

Page 39: Credit Transfer and Academic Planning SystemChapter 2 gives an overall description of the project and presents the stakeholders as well as the objectives. Chapter 3 introduces the

§4.2 Administration Site 30

4.2.4 Filter

Filter is another feature for finding particular records. The filters for the entities aresupported by the list_filter attribute within class ModelAdmin of Django. Filtershad been activated in the right sidebar (illustrated in Figure 4.10) of the change listpage for all the entities of the advanced standing site. Some simple entities have oneor two filters, such as Partner and ANU_Program. The complicated entities have morethan three filters, such as Articulation and Study_Plan. As for the authorizationsystem, the filters for User had been activated by default. The records can be filteredby one or multiple filters. Thus, to get some specific records, the user can apply acombination of filters.

Figure 4.10: Use filters in the right sidebar

4.2.5 Bold Fields

Some fields of an entity are essential for adding new records. For an ANU partneruniversity, country, university name and general information are necessary, whileabbreviation, course mappings, official website and institution badge are optional.To ensure the required fields are filled, their labels are emphasized in bold font asshown in Figure 4.11, and the labels of the optional fields are still in normal font.

Page 40: Credit Transfer and Academic Planning SystemChapter 2 gives an overall description of the project and presents the stakeholders as well as the objectives. Chapter 3 introduces the

§4.2 Administration Site 31

Figure 4.11: Required fields in bold

The saving request will be denied by the application in case any of the requiredfields is neglected. An error message may appear near the empty field to remind theuser, which is shown in Figure 4.12.

Figure 4.12: An error message for the empty required field

The optional fields mean that they are temporarily unknown or they can be filledsoon later, rather than they are unimportant. The absence of these fields may lead topoor visual experience for the browsers. Also, as mentioned in Section 4.2.3, someoptional fields can be searched for finding records efficiently. The administratorsshould always try to make sure the information is accurate, complete and up-to-date.

Page 41: Credit Transfer and Academic Planning SystemChapter 2 gives an overall description of the project and presents the stakeholders as well as the objectives. Chapter 3 introduces the

§4.3 Summary 32

4.2.6 Change History

Any changes made to the records will be saved in the history for reference in thefuture. The history is always be accessible unless the corresponding records aredeleted. A user can view the change history of a record by clicking the "HISTORY"button at the top right corner of the editing page. The history will display the date,time, user and action for each change. An example of change history of NanyangPolytechnic is shown in Figure 4.13.

Figure 4.13: Change history of Nanyang Polytechnic

4.3 Summary

This chapter demonstrates the features of the websites. The style of the advancedstanding site conforms to CECS official website. Many hyperlinks can redirect theviewers to the official pages of ANU for latest information. It also uses Memcached forimproving the performance in the future. The administration site has various of fea-tures to support the work of administrators, such as authorization system, chanineddropdown list, search box, filter and so on. With all of them, the administrators areable to manage the information efficiently and conveniently, and the viewers couldhave good visit experience and easily find the information they need.

Page 42: Credit Transfer and Academic Planning SystemChapter 2 gives an overall description of the project and presents the stakeholders as well as the objectives. Chapter 3 introduces the

Chapter 5

Deployment and Testing

In this chapter, the topics of deployment and testing will be discussed. To beginwith, I will demonstrate why I used Gunicorn and Nginx to power the applicationand how did they work collaboratively. Then I will present the results of speed testand stress test to prove that the application is both fast and reliable. It is qualified tobe the first release of production to serve the stakeholders.

5.1 Deployment

In the process of development, the application was running on a lightweight de-velopment web server bundled in Django on my local machine. This server couldautomatically reload Python code for each request, so that I don’t have to restart theserver for code changes to take effect. However, Django Software Foundation [28]states that the lightweight web server is not be recommended for any productionusage because it has not gone through performance tests and security audits. Af-ter I studied relevant knowledge about development, the combination of Gunicornand Nginx (discussed in Section 3.2) were adopted to deploy the production for thefollowing reasons.

Neto [29] and Orr [30] indicate that WSGI, short for Web Server Gateway Inter-face, is a standard specification that describes how a web server interacts with Pythonweb applications. Any web server that implements the WSGI server interface can runweb applications that implement the WSGI application interface. Gunicorn is an im-plementation of the WSGI concept for UNIX and it can completely work with Djangowhich is a WSGI-compliant framework. I used Gunicorn for two reasons. Firstly, itis easy to configure and deploy. Secondly, the experiment of Habib [31] presents thatGunicorn is a remarkable HTTP server that has satisfactory performance on manyaspects. It is able to serve large Python-powered web applications, such as Instagram[32].

The statistic data of World Wide Web Technology Surveys [33] reveals that Nginxis the first most used web server among the top 1,000,000 websites. According toLinode [34] and Makai [35], Nginx functions well as a reverse proxy to handle re-quests and pass back responses for Python WSGI servers. There are many benefits

33

Page 43: Credit Transfer and Academic Planning SystemChapter 2 gives an overall description of the project and presents the stakeholders as well as the objectives. Chapter 3 introduces the

§5.2 Testing 34

to use Nginx as a reverse proxy, such as load balancing, increased security, betterperformance and easy logging. For example, as suggested by Nelson [36], we canfight DDoS attacks by limiting the Rate of Requests, limiting the number of connec-tions, limiting the connections to backend servers, blacklisting some IP addressesand many other settings.

As a result, Django, Gunicorn and Nginx work collaboratively on the server forproduction, which is illustrated in Figure 5.1.

Figure 5.1: Structure of the production server

Nginx works as a reception of the server that transits requests from clients andresponses from the application. It waits for requests from the web browsers. Thestatic assets, such as images, CSS, JavaScript and font files, can be served directlyinstead of being processed by the application, which largely reduces the pressure onthe backend. The dynamic requests will be passed to Gunicorn which runs multipleworker processes to handle many requests at one time. With the MVT structure dis-cussed in Section 3.6 and interaction with the PostgreSQL database, Django producescontent for the requests. Then the response will be passed by Gunicorn, Nginx andfinally returned to the clients.

5.2 Testing

By using the agile development methodology, I had tested the usability, availabilityand validity of every functional module while developing on my own machine. Allthe pages were displayed consistently in various popular web browsers, such asChrome, Firefox, Safari, Chromium, Microsoft Edge. To further prove that it canwork as I expected, the complete project should be tested on a server which has

Page 44: Credit Transfer and Academic Planning SystemChapter 2 gives an overall description of the project and presents the stakeholders as well as the objectives. Chapter 3 introduces the

§5.2 Testing 35

public availability. The application can be ran on a server with any distribution ofLinux installed. For testing purpose, I deployed the project on an Amazon WebServices (AWS) server instance located at Sydney. Limited by personal budget, thetechnical details of the server are as follows:

• Instance type: Amazon EC2 t2.micro

• Operating system: Ubuntu Server 18.04 LTS

• CPU: 1 virtual CPU, 2.5 GHz, Intel Xeon Family

• Memory (GiB): 1

• Network performance level: Low to moderate.

The information provided by AWS on network performance is vague and limited,but the benchmark testing of Wittig [37] shows that the baseline speed is 0.06 Gbit/sand the maximum speed is 0.72 Gbit/s. For more details of the instance, see thedocumentation recommended by AWS [38].

5.2.1 Speed Test

Google PageSpeed Insights is a tool for testing the speed of a page and providingsuggestions to make the page faster. To obtain the real performance of the appli-cation, the Memcached was turned off. The pages to be tested are index.html,partners.html, partner_degrees.html, articulations.html, study_plans.html.The official page of CECS advanced standing was also tested for comparison. Thesepages were numbered from 1 to 6 and tested for desktop performance. The result isshown in Table 5.1.

Page Number 1 2 3 4 5 6

First Contentful Paint 0.5s 0.5s 0.5s 0.5s 0.5s 1.0sSpeed Index 0.6s 0.5s 0.5s 0.7s 0.5s 3.2s

Time to Interactive 0.5s 0.5s 0.5s 0.5s 0.5s 1.2sFirst Meaningful Paint 0.5s 0.5s 0.5s 0.5s 0.5s 1.1s

First CPU Idle 0.5s 0.5s 0.5s 0.5s 0.5s 1.1sMax Potential First Input Delay 20ms 20ms 20ms 20ms 20ms 50ms

Average Score 100 100 100 100 100 75

Table 5.1: PageSpeed Insights scoring

The score scales of this test are fast (90–100), average (50–89) and slow (0–49).The average score of my pages (No. 1–5) was 100 which mean that their speed wasvery fast although the configuration of the server was very limited, while the CECSofficial advanced standing (No. 6) was significantly slower. For detailed explanationof the testing items, see [39–44].

Page 45: Credit Transfer and Academic Planning SystemChapter 2 gives an overall description of the project and presents the stakeholders as well as the objectives. Chapter 3 introduces the

§5.3 Summary 36

5.2.2 Stress Test

A stress test was performed on LoadImpact which is a commercial website for loadtesting. All the pages of the advanced standing site were tested by 50 virtual usersfrom Sydney. As illustrated in Figure 5.2, the rate of requests ranged from 370 to410 per second. The duration of the test was 72 minutes and the response timeranged from 73ms to 130ms for each request. The result shows that the applicationperformed good on the stress test.

Figure 5.2: Stress test by LoadImpact

5.3 Summary

In this chapter, I explained why Gunicorn and Nginx were used on the productionserver and how they worked together. To test the stability, a speed test of GooglePageSpeed Insights and a stress test of LoadImpact were performed. It turned outthat the application achieved satisfactory results on the tests. In addition, we shouldnote that the tests were run in the worst condition because the application had togenerate dynamic content for each request. If the pages had been cached, the perfor-mance could be even better.

To deploy this project, the ANU college of computer science had allocated a vir-tual machine which has better configurations than the testing server (i.e. the mosteconomical EC2 instance of AWS). Consequently, it is reasonable to infer that theproject could run smoothly on the college domain for small to medium loads.

Page 46: Credit Transfer and Academic Planning SystemChapter 2 gives an overall description of the project and presents the stakeholders as well as the objectives. Chapter 3 introduces the

Chapter 6

Conclusion

In this report, I demonstrate how Credit Transfer and Academic Planning Systemwas designed, implemented, tested and deployed. It started with a "Hello world!" inChrome, and gradually became a prototype, a minimum viable product, and finallya product. The features described in Chapter 4 would be very helpful for the stake-holders. The detailed instructions about development and deployment had beenprovided in the code repository for referring in the future.

This project was only intended to be implemented as a prototype, but I hadmade it as a reliable product that exceeds the original expectation. The tasks in theindependent study contract and all the objectives mentioned in Section 2.3 had beencompleted. Some ANU staff and students told me that they were satisfied with mycurrent work.

Hopefully, this project could not only make CECS staff’s work easier, but also helpthe students understand credit transfer information, know the course arrangements,and plan their academic careers in ANU.

6.1 Limitations

This is the first release of the Credit Transfer and Academic Planning System thatstill has some limitations. When editing the course mappings of a partner university,the user should follow the predefined format that hinted under the form, otherwisethe course mappings will not work.

Django is a comprehensive framework that provides us with many powerful mod-ules. However, it is excessively monolithic that requires the developer to have sys-tematic knowledge before starting work. As I am not an expert on Django, it isdifficult for me to custom scripts for dynamically processing the data in the admin-istration site and override the original styles, which is the reason I used an externallibrary for chained dropdown lists.

37

Page 47: Credit Transfer and Academic Planning SystemChapter 2 gives an overall description of the project and presents the stakeholders as well as the objectives. Chapter 3 introduces the

§6.2 Future Work 38

6.2 Future Work

Due to my personal time and energy constraints, this project could not be perfect onevery aspect. Although a lot of unit tests and integrated tests had been performed,it is hard for me to guarantee the application has no flaw. The Django framework,Gunicorn and Nginx deserve to be further explored and studied. I believe theiradvanced features could enhance the performance of the application and providestronger security support. Some possible aspects of improvements are listed as fol-lows.

1. Replace Django Template by Jinja2. Ronacher [45] states that Jinja2 is approx-imately 10 to 20 times faster than Django template engine on rendering pagesof the benchmark. We can change the template engine to Jinja2 to take theadvantages of it.

2. Add a feedback page. Obviously, listening to the feedback from the visitorsis quite important for making a better website. We should not only focus onthe content, but also the experience of the visitors. I recommend to add ahyperlink in the footer of the base.html so that it would appear in every pageof the advanced standing site.

3. Enable hiding records. If ANU terminates the partnership with a partner uni-versity, we would better hide the relevant records rather than deleting them.This feature can be achieved by adding a field called "hide" in the model, sothat the administrators can determine whether to display the information of apartner university.

4. Further compress the static files. Google PageSpeed Insights suggests that thestatic files can be compressed for faster loading speed. Although those fileshad been compressed by me, it seems that we can make them smaller in size byconverting them to "WebP" format. As demonstrated in [46], images in "WebP"format are significantly smaller in size compared to that in "PNG" and "JPEG"formats. Also, if the size of CSS files become larger in the future, we shouldminify them in production by removing the comments and extra spaces.

5. Stop using Bootstrap. The advanced standing site only use few features ofthe Bootstrap framework, so it may waste some time while loading the Boot-strap files we never use (although loading from CDN is fast). I recommend todecorate the pages by our own CSS files.

6. Automate deployment with Fabric. When the code is changed, it is trouble-some to login the server, fetch the latest code, install new required libraries,make database migrations, collect static files, restart Gunicorn and Nginx. Fab-ric is a Python library which enables us run the shell commands that we want toexecute on the server remotely via SSH. With this library, we can write a scriptthat includes all the commands for the steps above, so that the deployment

Page 48: Credit Transfer and Academic Planning SystemChapter 2 gives an overall description of the project and presents the stakeholders as well as the objectives. Chapter 3 introduces the

§6.2 Future Work 39

process can be automated by just running a Python script. For more details,see [47].

7. Dockerize the application. As seen in [48], Docker packages up code and allthe dependencies so the application can be developed, run and deployed in acontainer, and easily transferred from one environment to another. Dockerizingthe application means that we can work in a environment that exactly the sameas the production environment.

8. Add more features requested by the stakeholders.

Page 49: Credit Transfer and Academic Planning SystemChapter 2 gives an overall description of the project and presents the stakeholders as well as the objectives. Chapter 3 introduces the

References

[1] N. Abbas, A. M. Gravell, and G. B. Wills, “Historical roots of agile methods:Where did “agile thinking” come from?” in Agile Processes in Software Engineer-ing and Extreme Programming. Berlin, Heidelberg: Springer Berlin Heidelberg,2008, pp. 94–103. (cited on page 6)

[2] P. Flewelling, “Introduction to the mechanics of scrum,” in The Agile Developer’sHandbook. Packt Publishing, 2018. (cited on page 6)

[3] P. Zinchenko, “Iterative development: the secret to great product launches,”accessed May 11, 2019. [Online]. Available: https://www.mindk.com/blog/iterative-development/ (cited on page 6)

[4] B. Kotaiah and M. A. Khalil, “Approaches for development of softwareprojects: Agile methodology,” International Journal of Advanced Research inComputer Science, vol. 8, no. 1, 01 2017, copyright - Copyright InternationalJournal of Advanced Research in Computer Science Jan 2017; Last updated -2017-06-23. [Online]. Available: https://search-proquest-com.virtual.anu.edu.au/docview/1901446397?accountid=8330 (cited on page 7)

[5] Django Software Foundation, “Django: The web framework for perfectionistswith deadlines,” 2019, accessed May 11, 2019. [Online]. Available: https://www.djangoproject.com/ (cited on page 7)

[6] The PostgreSQL Global Development Group, “PostgreSQL: The World’s MostAdvanced Open Source Relational Database,” 2019, accessed May 11, 2019.[Online]. Available: https://www.postgresql.org/ (cited on page 8)

[7] NGINX Inc., “NGINX Wiki!” 2019, accessed May 11, 2019. [Online]. Available:https://www.nginx.com/resources/wiki/ (cited on page 8)

[8] ANU College of Engineering and Computer Science, “ANU& Beijing Institute of Technology advanced standing refer-ence guide,” 2017, accessed May 10, 2019. [Online]. Avail-able: https://cecs.anu.edu.au/sites/default/files/university-partnership/bit_advanced_standing_flyer-_october_2017_1.pdf (cited on page 9)

[9] ——, “ANU & BIT Bachelor of Advanced Computing (Honours)Sample Study Plan,” 2017, accessed May 10, 2019. [Online]. Available:https://cecs.anu.edu.au/sites/default/files/university-partnership/beijing_institute_of_technology_-_computer_science_and_technology_0.pdf (cited onpage 9)

40

Page 50: Credit Transfer and Academic Planning SystemChapter 2 gives an overall description of the project and presents the stakeholders as well as the objectives. Chapter 3 introduces the

REFERENCES 41

[10] ——, “ANU & BIT Bachelor of Software Engineering (Honours)Sample Study Plan,” 2017, accessed May 10, 2019. [Online].Available: https://cecs.anu.edu.au/sites/default/files/university-partnership/beijing_institute_of_technology_-_software_engineering.pdf (cited on page 9)

[11] ——, “ANU & UI Sample Study Plan, BAC, Even Year, IntelligentSystems Specialisation,” 2018, accessed May 10, 2019. [Online]. Available:https://cecs.anu.edu.au/sites/default/files/university-partnership/anu_ui_sample_study_plan_bac_even_year_intelligent_systems_specialisation_3.pdf(cited on page 10)

[12] R. Sankaranarayana, “Rational for advanced standing towards the Bach-elor of Advanced Computing Program,” 2018, accessed May 10,2019. [Online]. Available: https://users.cecs.anu.edu.au/~ramesh/programs/articulation/indonesia/ui/bcs/bac/rationale.html (cited on page 10)

[13] Django Software Foundation, “User authentication in Django,” 2019, accessedMay 13, 2019. [Online]. Available: https://docs.djangoproject.com/en/2.2/topics/auth/ (cited on page 13)

[14] ——, “Django settings,” 2019, accessed May 14, 2019. [On-line]. Available: https://docs.djangoproject.com/en/2.2/topics/settings/#calling-django-setup-is-required-for-standalone-django-usage (cited on page16)

[15] The PostgreSQL Global Development Group, “PostgreSQL: Documentation:SQL Dump,” 2019, accessed May 14, 2019. [Online]. Available: https://www.postgresql.org/docs/current/backup-dump.html (cited on page 17)

[16] J. Ellingwood, “How To Backup PostgreSQL Databases onan Ubuntu VPS,” 2019, accessed May 14, 2019. [On-line]. Available: https://www.digitalocean.com/community/tutorials/how-to-backup-postgresql-databases-on-an-ubuntu-vps (cited on page 17)

[17] C. Mills, “Django introduction,” 2019, accessed May 15, 2019. [Online]. Avail-able: https://developer.mozilla.org/en-US/docs/Learn/Server-side/Django/Introduction (cited on page 18)

[18] T. Berners-Lee, “Cool URIs don’t change,” 1998, accessed May 15, 2019.[Online]. Available: https://www.w3.org/Provider/Style/URI (cited on page18)

[19] Django Software Foundation, “The Django template language - Au-tomatic HTML escaping,” 2019, accessed May 21, 2019. [Online].Available: https://docs.djangoproject.com/en/2.2/ref/templates/language/#automatic-html-escaping (cited on page 20)

Page 51: Credit Transfer and Academic Planning SystemChapter 2 gives an overall description of the project and presents the stakeholders as well as the objectives. Chapter 3 introduces the

REFERENCES 42

[20] ——, “Settings | SECURE_PROXY_SSL_HEADER,” 2019, accessed May21, 2019. [Online]. Available: https://docs.djangoproject.com/en/2.2/ref/settings/#std:setting-SECURE_PROXY_SSL_HEADER (cited on page 21)

[21] K. Y. Wong and K. H. Yeung, “Site-based approach to web cache design,” IEEEInternet Computing, vol. 5, no. 5, pp. 28–34, 09 2001, copyright - CopyrightIEEE Computer Society Sep 2001; Last updated - 2010-06-06; CODEN -IESEDJ. [Online]. Available: https://search-proquest-com.virtual.anu.edu.au/docview/197327795?accountid=8330 (cited on page 25)

[22] ——, “Alternative web caching design: a site-based approach,” IETCommunications, vol. 4, no. 12, pp. 1504–1515, 08 2010, copyright- Copyright The Institution of Engineering & Technology Aug 2010;Document feature - Equations; Diagrams; Graphs; ; Last updated - 2014-11-03.[Online]. Available: https://search-proquest-com.virtual.anu.edu.au/docview/1619300114?accountid=8330 (cited on page 25)

[23] Dormando, “What is Memcached?” 2019, accessed May 16, 2019. [Online].Available: https://memcached.org (cited on page 25)

[24] Django Software Foundation, “Django’s cache framework,” 2019, accessed May16, 2019. [Online]. Available: https://docs.djangoproject.com/en/2.2/topics/cache/ (cited on page 25)

[25] The jQuery Foundation, “Ajax | jQuery API Documentation,” 2019, accessedMay 17, 2019. [Online]. Available: https://api.jquery.com/category/ajax/(cited on page 28)

[26] Django Software Foundation, “The Django admin site,” 2019, accessed May 18,2019. [Online]. Available: https://docs.djangoproject.com/en/2.2/ref/contrib/admin/#django.contrib.admin.ModelAdmin.search_fields (cited on page 29)

[27] The PostgreSQL Global Development Group, “PostgreSQL: Documenta-tion: Pattern Matching,” 2019, accessed May 18, 2019. [Online]. Avail-able: https://www.postgresql.org/docs/current/functions-matching.html#FUNCTIONS-LIKE (cited on page 29)

[28] Django Software Foundation, “django-admin and manage.py,” 2019, accessedMay 18, 2019. [Online]. Available: https://docs.djangoproject.com/en/2.2/ref/django-admin/#runserver (cited on page 33)

[29] C. P. Neto, “WSGI Introduction,” 2015, accessed May 19, 2019. [Online].Available: http://wsgi.tutorial.codepoint.net/intro (cited on page 33)

[30] M. Orr, “WSGI Explorations in Python,” 2005, accessed May 19, 2019. [Online].Available: https://linuxgazette.net/115/orr.html (cited on page 33)

Page 52: Credit Transfer and Academic Planning SystemChapter 2 gives an overall description of the project and presents the stakeholders as well as the objectives. Chapter 3 introduces the

REFERENCES 43

[31] O. Habib, “A Performance Analysis of Python WSGIServers: Part 2,” CISCO, 2016, accessed May 19, 2019.[Online]. Available: https://www.appdynamics.com/blog/engineering/a-performance-analysis-of-python-wsgi-servers-part-2/ (cited on page 33)

[32] Instagram Engineering, “What Powers Instagram: Hundredsof Instances, Dozens of Technologies,” 2011, accessed May19, 2019. [Online]. Available: https://instagram-engineering.com/what-powers-instagram-hundreds-of-instances-dozens-of-technologies-adf2e22da2ad(cited on page 33)

[33] World Wide Web Technology Surveys, “Usage of web servers brokendown by ranking,” 2019, accessed May 19, 2019. [Online]. Available:https://w3techs.com/technologies/cross/web_server/ranking (cited on page33)

[34] Linode, “Use NGINX as a Reverse Proxy,” 2018, accessed May 19,2019. [Online]. Available: https://www.linode.com/docs/web-servers/nginx/use-nginx-reverse-proxy/ (cited on page 33)

[35] M. Makai, “Nginx - Full Stack Python,” 2019, accessed May 19, 2019. [Online].Available: https://www.fullstackpython.com/nginx.html (cited on page 33)

[36] R. Nelson, “Mitigating DDoS Attacks with NGINX and NGINX Plus,” NGINXInc., 2019, accessed May 21, 2019. [Online]. Available: https://www.nginx.com/blog/mitigating-ddos-attacks-with-nginx-and-nginx-plus/ (cited on page 34)

[37] A. Wittig, “EC2 Network Performance Cheat Sheet,” 2018, ac-cessed May 20, 2019. [Online]. Available: https://cloudonaut.io/ec2-network-performance-cheat-sheet/ (cited on page 35)

[38] Amazon Web Services, “Amazon EC2 Instance Types,” 2019, accessed May19, 2019. [Online]. Available: https://aws.amazon.com/ec2/instance-types/(cited on page 35)

[39] Google Developers, “First Contentful Paint | Tools for Web De-velopers | Google Developers,” 2019, accessed May 20, 2019.[Online]. Available: https://developers.google.com/web/tools/lighthouse/audits/first-contentful-paint (cited on page 35)

[40] ——, “Speed Index | Tools for Web Developers | Google Developers,” 2019,accessed May 20, 2019. [Online]. Available: https://developers.google.com/web/tools/lighthouse/audits/speed-index

[41] ——, “Time to Interactive | Tools for Web Developers | GoogleDevelopers,” 2019, accessed May 20, 2019. [Online]. Available: https://developers.google.com/web/tools/lighthouse/audits/time-to-interactive

Page 53: Credit Transfer and Academic Planning SystemChapter 2 gives an overall description of the project and presents the stakeholders as well as the objectives. Chapter 3 introduces the

REFERENCES 44

[42] ——, “First Meaningful Paint | Tools for Web Developers | GoogleDevelopers,” 2019, accessed May 20, 2019. [Online]. Available: https://developers.google.com/web/tools/lighthouse/audits/first-meaningful-paint

[43] ——, “First CPU Idle | Tools for Web Developers | Google Developers,” 2019,accessed May 20, 2019. [Online]. Available: https://developers.google.com/web/tools/lighthouse/audits/first-cpu-idle

[44] ——, “First Input Delay | Web | Google Developers,” 2019, accessed May 20,2019. [Online]. Available: https://developers.google.com/web/updates/2018/05/first-input-delay (cited on page 35)

[45] A. Ronacher, “Frequently Asked Questions | Jinja2,” 2017, accessed May 20,2019. [Online]. Available: http://jinja.pocoo.org/docs/2.10/faq/#how-fast-is-it(cited on page 38)

[46] Google Developers, “A new image format for the Web,” 2019, accessed May 20,2019. [Online]. Available: https://developers.google.com/speed/webp/ (citedon page 38)

[47] J. Forcier, “Getting started - Fabric documentation,” 2018, accessed May20, 2019. [Online]. Available: http://docs.fabfile.org/en/latest/getting-started.html (cited on page 39)

[48] Docker Inc., “What is a Container?” 2019, accessed May 20, 2019. [Online].Available: https://www.docker.com/resources/what-container (cited on page39)

Page 54: Credit Transfer and Academic Planning SystemChapter 2 gives an overall description of the project and presents the stakeholders as well as the objectives. Chapter 3 introduces the

Chapter 6

Appendix

Appendix A: Project Description and Independent Study Contract

Appendix B: README File

45

Page 55: Credit Transfer and Academic Planning SystemChapter 2 gives an overall description of the project and presents the stakeholders as well as the objectives. Chapter 3 introduces the

46

Page 56: Credit Transfer and Academic Planning SystemChapter 2 gives an overall description of the project and presents the stakeholders as well as the objectives. Chapter 3 introduces the

45

45

47

Page 57: Credit Transfer and Academic Planning SystemChapter 2 gives an overall description of the project and presents the stakeholders as well as the objectives. Chapter 3 introduces the

7KLV�SURMHFW�LV�D�ZHE�EDVHG�DSSOLFDWLRQ�WKDW�FDSWXUHV�WKH�GHWDLOV�RI�DFDGHPLF�DUWLFXODWLRQDUUDQJHPHQWV�EHWZHHQ�$18�&ROOHJH�RI�(QJLQHHULQJ�DQG�&RPSXWHU�6FLHQFH��&(&6��DQG�$18SDUWQHU�LQVWLWXWLRQV��7KH�LQIRUPDWLRQ�FDQ�EH�DFFHVVHG�E\�VWXGHQWV�WR�NQRZ�WKHLU�DGYDQFHGVWDQGLQJ��FUHGLW�WUDQVIHU��GHWDLOV�DQG�JHW�VDPSOH�VWXG\�SODQV��E\�UHOHYDQW�$18�DFDGHPLF�VWDƈ�VXFK�DV�WKH�$VVRFLDWH�'LUHFWRUV�DQG�3URJUDP�&RQYHQRUV��DQG�VWXGHQW�DGPLQLVWUDWRUV�WRDGYLFH�VWXGHQWV��E\�&(&6�0DUNHWLQJ�DQG�H[WHUQDO�DJHQWV�IRU�PDUNHWLQJ�DQG�DGYLFH��DQG�E\WKH�RWKHU�HGXFDWLRQDO�LQVWLWXWLRQV�IRU�LQIRUPDWLRQ��7KH�VLWH�KDV�WZR�HQWU\�SRLQWV��RQH�LV�XVHGIRU�GLVSOD\LQJ�WKH�LQIRUPDWLRQ�DQG�WKH�RWKHU�RQH��DGPLQLVWUDWLRQ�VLWH��LV�XVHG�IRU�PDQDJLQJWKH�GDWD�

3URMHFW�6WUXFWXUH*HWWLQJ�6WDUWHG

3UHUHTXLVLWHV,QVWDOOLQJ7LSV�IRU�GHYHORSPHQW80/�*UDSK([WUDFW�FRXUVH�GDWD�FRPSOHWHO\�IURP�$18�FRXUVH�FDWDORJXH

'HSOR\PHQW3UHUHTXLVLWHV,QVWDOOLQJ

)HDWXUHV�RI�WKH�3DJHV7KH�JHQHUDO�VLWH7KH�DGPLQLVWUDWLRQ�VLWH

6HDUFK)LOWHU%ROG�)LHOGV&KDQJH�+LVWRU\&KHFN��&URVV�0DUN

4��$+RZ�WR�DGG�QHZ�DUWLFXODWLRQV�HƋFLHQWO\"+RZ�WR�DGG�QHZ�VDPSOH�VWXG\�SODQV"+RZ�WR�DGG�FRXUVH�PDSSLQJV��DGYDQFHG�VWDQGLQJ�GHWDLOV�"+RZ�WR�DGG�UHTXLUHG��FRPSXOVRU\��FRXUVHV�IRU�D�SDUWQHU�LQVWLWXWLRQ"+RZ�WR�DGG�QHZ�JURXS�DQG�XVHU"+RZ�WR�FKDQJH�P\�SDVVZRUG"+RZ�WR�FKDQJH�WKH�EDGJH�RI�D�SDUWQHU�LQVWLWXWLRQ"

Credit Transfer and Academic Planning System

Table of Content

48

Page 58: Credit Transfer and Academic Planning SystemChapter 2 gives an overall description of the project and presents the stakeholders as well as the objectives. Chapter 3 introduces the

+RZ�WR�GHOHWH�UHFRUGV"8VHIXO�5HVRXUFHV�IRU�'HYHORSPHQW$XWKRU6WDWHPHQW�RI�2ULJLQDOLW\/LFHQVH$FNQRZOHGJPHQWV

credit_transfer ├── advanced_standing The advanced standing app│ ├── __init__.py │ ├── admin.py Register the models with the Django admin application│ ├── apps.py Configuration file for this app│ ├── config.py Define the prefixes of ANU urls│ ├── migrations A directory for the data model migrations│ ├── models.py Data models of the app│ ├── tests.py Test cases│ ├── urls.py Url configurations│ ├── utils.py Utility functions│ └── views.py Create the views of the app├── credit_transfer │ ├── __init__.py │ ├── settings.py Settings for the project│ ├── urls.py Project-level URL configurations│ └── wsgi.py Enables WSGI compatible web servers to serve the project├── import_data Scripts for importing data and some data files│ ├── COMP courses - ANU.html HTML file of COMP courses grapped from ANU│ ├── ENGN courses - ANU.html HTML file of ENGN courses grapped from ANU│ ├── MATH courses - ANU.html HTML file of MATH courses grapped from ANU│ ├── PHYS courses - ANU.html HTML file of PHYS courses grapped from ANU│ ├── STAT courses - ANU.html HTML file of STAT courses grapped from ANU│ ├── __init__.py │ ├── anu_course.txt Special courses of ANU│ ├── anu_major_or_spec.txt Data of ANU major and specialisations│ ├── anu_program.txt Data of ANU Programs│ ├── badges A directory for the institution badges│ ├── comp_course.txt Code and name of ENGN courses│ ├── country.txt Data of the countries/regions│ ├── engn_course.txt Code and name of ENGN courses│ ├── extract_anu_courses.py Script for extracting data from HTML files│ ├── import_data.py Import data from the text files to the database

Project Structure

49

Page 59: Credit Transfer and Academic Planning SystemChapter 2 gives an overall description of the project and presents the stakeholders as well as the objectives. Chapter 3 introduces the

7KHVH�LQVWUXFWLRQV�ZLOO�JHW�\RX�D�FRS\�RI�WKH�SURMHFW�XS�DQG�UXQQLQJ�RQ�\RXU�ORFDO�PDFKLQHIRU�GHYHORSPHQW�DQG�WHVWLQJ�SXUSRVHV��6HH�GHSOR\PHQW�IRU�QRWHV�RQ�KRZ�WR�GHSOR\�WKHSURMHFW�RQ�D�OLYH�V\VWHP�

Prerequisites

:KDW�WKLQJV�\RX�QHHG�WR�LQVWDOO�WKH�VRIWZDUH�DQG�KRZ�WR�LQVWDOO�WKHP

��� 3\WKRQ����GRZQORDG�IURP�KWWSV���ZZZ�S\WKRQ�RUJ�GRZQORDGV�

7R�DYRLG�DQ\�LQFRPSDWLELOLW\�LVVXHV��,�UHFRPPHQG�\RX�WR�XVH�3\WKRQ����

2U�\RX�FDQ�XVH�$QDFRQGD�

$QDFRQGD�'LVWULEXWLRQ���3\WKRQ����GRZQORDG�IURPKWWSV���ZZZ�DQDFRQGD�FRP�GLVWULEXWLRQ��GRZQORDG�VHFWLRQ

��� 3RVWJUH64/��GRZQORDG�IURP�KWWSV���ZZZ�SRVWJUHVTO�RUJ�GRZQORDG�

│ ├── math_course.txt Code and name of MATH courses│ ├── partner.txt Data of ANU partner institutions│ ├── phys_course.txt Code and name of PHYS courses│ ├── refresh_badges.py Refresh the badges after first time importing │ └── stat_course.txt Code and name of STAT courses├── logs Directory reserved for Nginx logs├── manage.py Command-line utility for executing Django commands ├── media Media root of the project│ └── institution_badge The institution badges will be saved here├── requirements.txt Required packages and their versions├── secret_key A secret key for a particular Django installation├── static Static files (images, CSS)│ ├── css │ │ └── style.css │ └── images └── templates HTML templates ├── admin Overide the template of admin domain │ └── base_site.html └── advanced_standing Templates for the APP: advanced_standing ├── articulations.html ├── base.html ├── index.html ├── partner_degrees.html ├── partners.html └── study_plans.html

Getting Started

50

Page 60: Credit Transfer and Academic Planning SystemChapter 2 gives an overall description of the project and presents the stakeholders as well as the objectives. Chapter 3 introduces the

,I�\RX�DUH�XVLQJ�D�0DF��,�VWURQJO\�UHFRPPHQG�\RX�WR�LQVWDOO�3RVWJUHV�DSS�ZKLFK�LV�D�IXOO�IHDWXUHG�3RVWJUH64/�LQVWDOODWLRQ�SDFNDJHG�DV�D�VWDQGDUG�0DF�DSS�

Installing

$�VWHS�E\�VWHS�VHULHV�RI�H[DPSOHV�WKDW�WHOO�\RX�KRZ�WR�JHW�D�GHYHORSPHQW�HQY�UXQQLQJ

��� &ORQH�WKLV�UHSRVLWRU\�WR�\RXU�ORFDO�ZLWK�+7736�

$ git clone https://gitlab.cecs.anu.edu.au/u6158063/credit-transfer.git

��� &UHDWH�D�GDWDEDVH�FDOOHG� advanced_standing �LQ�\RXU�3RVWJUH64/�

CREATE DATABASE advanced_standing;

��� *R�WR� credit_transfer/credit_transfer �GLUHFWRU\�DQG�HGLW� settings.py ��FKDQJH�WKHYDOXHV�RI� USER �DQG� PASSWORD �LQ� DATABASES �WR�\RXUV�

��� ,PSRUW�WKH�GDWD�ƉOH� postgres_data/data19052019.pgsql �WR�\RXU�ORFDO�GDWDEDVH�

$ psql -U YourUserName advanced_standing < data19052019.pgsql

��� &UHDWH�D�YLUWXDO�HQYLURQPHQW��VD\� env ��IRU�WKLV�SURMHFW��<RX�FDQ�XVH�HLWKHU� venv �RU�virtualenv �PRGXOH�RI�3\WKRQ���WR�FUHDWH�RQH�

$Q�H[DPSOH�IRU�$QDFRQGD�XVHU�

$ conda create -n env python=3.6

��� 7KHQ�DFWLYDWH�WKH�YLUWXDO�HQYLURQPHQW�

)RU�0DF�DQG�/LQX[�XVHU�

$ source activate env

)RU�:LQGRZV�XVHU��LQ�WKH�FRPPDQG�ZLQGRZ��

activate env

��� ,QVWDOO�WKH�UHTXLUHG�SDFNDJHV�OLVWHG�LQ� credit_transfer/requirements.txt �WR�\RXUYLUWXDO�HQY�

51

Page 61: Credit Transfer and Academic Planning SystemChapter 2 gives an overall description of the project and presents the stakeholders as well as the objectives. Chapter 3 introduces the

(env) $ pip install -r requirements.txt

��� )L[�D�EXJ�LQ�WKH�SDFNDJH� django-smart-select �E\�UHSODFLQJ�D�ƉOH�LQ�\RXU�YLUWXDO�HQYZLWK�D�FRUUHFW�RQH�

1RWH�WKDW�WKLV�VWHS�LV�YHU\�,03257$17�

5HSODFH� chainedfk.js �ORFDWHG�DW�path-to-your-env/lib/python3.6/site-packages/smart_selects/static/smart-selects/admin/js/chainedfk.jsZLWK�WKH�Ɖ[HG�ƉOH�ZKLFK�\RX�FDQ�GRZQORDG�DW�https://github.com/realmadrid/django-smart-selects/blob/master/smart_selects/static/smart-selects/admin/js/chainedfk.js�

��� ,PSRUW�WKH�EDGJH�LPDJHV�RI�$18�SDUWQHU�LQVWLWXWLRQV��5XQ�WKH�VFULSW�LQ�credit_transfer/import_data/refresh_badges.py �

(env) $ python refresh_badges.py

6DPSOH�RXWSXW�

[Partner]: Begin persisting Partner...[Partner]: 30 records found in the data file.[Partner]: Persisting data finished. 30 records in total. 30 new institution badges added.

���� &UHDWH�D�VXSHUXVHU�RI�'MDQJR�WR�ORJLQ�WKH�DGPLQ�VLWH��*R�WR�WKH�GLUHFWRU\�RI�credit_transfer/manage.py �DQG�UXQ�WKH�FRPPDQG�

(env) $ python manage.py createsuperuser

(QWHU�\RXU�XVHUQDPH��HPDLO�DQG�SDVVZRUG�

���� 6WDUWV�D�OLJKWZHLJKW�GHYHORSPHQW�:HE�VHUYHU�RQ�WKH�ORFDO�PDFKLQH��%\�GHIDXOW��WKHVHUYHU�UXQV�RQ�SRUW������RQ�WKH�,3�DGGUHVV������������<RX�FDQ�SDVV�LQ�DQ�,3�DGGUHVV�DQGSRUW�QXPEHU�H[SOLFLWO\��*R�WR�WKH�GLUHFWRU\� credit_transfer/manage.py �DQG�UXQ�WKH�FRPPDQG�

(env) $ python manage.py runserver

1RZ�WKH�VHUYHUŇV�UXQQLQJ��YLVLW�KWWS������������������DGYDQFHGBVWDQGLQJ�ZLWK�\RXU:HE�EURZVHU�

52

Page 62: Credit Transfer and Academic Planning SystemChapter 2 gives an overall description of the project and presents the stakeholders as well as the objectives. Chapter 3 introduces the

7KH�DGPLQLVWUDWLRQ�VLWH�LV�DYDLODEOH�DW�KWWS������������������DGPLQ��XVH�\RXUDFFRXQW�FUHDWHG�DW�WKH�SUHYLRXV�VWHS�WR�ORJLQ��

Tips for development

53

Page 63: Credit Transfer and Academic Planning SystemChapter 2 gives an overall description of the project and presents the stakeholders as well as the objectives. Chapter 3 introduces the

:KHQ�GHYHORSLQJ��PDNH�VXUH�LQ� credit_transfer/settings.py ��\RX�FRPPHQW�WKHYDULDEOH� STATIC_ROOT �DQG�XQFRPPHQW� STATICFILES_DIRS ��DQG� DEBUG = True$IWHU�\RX�PRGLI\�WKH�GDWD�PRGHOV�LQ� credit_transfer/advanced_standing/models.py �UHPHPEHU�WR�PDNH�PLJUDWLRQV�WR�DSSO\�\RXU�FKDQJHV�bash (env) $ python manage.py makemigrations(env) $ python manage.py migrate5HDG�'MDQJR�����GRFXPHQWDWLRQ

UML Graph

7KH�GDWD�PRGHO�ƉOHV�DUH�DYDLODEOH�DW�GLUHFWRU\� doc/data model evolution ��7KH�;0/�ƉOHV�RIGDWD�PRGHO�Y����Y����FDQ�EH�RSHQHG�DQG�HGLWHG�E\�GUDZ�LR�ZKLFK�LV�D�IUHH�DQG�RSHQ�VRXUFHVRIWZDUH�

GUDZ�LR���RQOLQH�YHUVLRQ'HVNWRS�YHUVLRQV�IRU�DOO�SODWIRUPV�FDQ�EH�GRZQORDGHG�KHUH�

)URP�Y�����WKH�GDWD�PRGHOV�DUH�FUHDWHG�E\�6WDU80/�

6WDU80/�LV�D�VRSKLVWLFDWHG�VRIWZDUH�PRGHOHU�IRU�DJLOH�DQG�FRQFLVH�PRGHOLQJ�

'RZQORDG�6WDU80/���IRU�PDF26��QHHGV�PDF26������RU�KLJKHU�'RZQORDG�6WDU80/���IRU�:LQGRZV��QHHGV�:LQGRZV���RU�KLJKHU�'RZQORDG�6WDU80/���IRU�/LQX[����ELW

7KH�ODWHVW�YHUVLRQ��Y�����RI�80/�JUDSK�LV�VKRZQ�EHOORZ�

54

Page 64: Credit Transfer and Academic Planning SystemChapter 2 gives an overall description of the project and presents the stakeholders as well as the objectives. Chapter 3 introduces the

Extract course data completely from ANU course catalogue

7KH�VFULSW� credit_transfer/import_data/extract_anu_courses.py �LV�XVHG�IRU�H[WUDFWLQJFRGH�DQG�QDPH�RI�$18�FRXUVHV�WR�WH[W�ƉOHV�XVLQJ� BeautifulSoup ��<RX�FDQ�IROORZ�WKHLQVWUXFWLRQV�EHORZ�WR�H[WUDFW�DQ\�RWKHU�FRXUVH�VHULHV��1RWH�WKDW�,�GRQW�UHFRPPHQG�\RX�WRDGG�WRR�PDQ\�FRXUVHV�WR�WKH�SURMHFW�EHFDXVH�PDQ\�FRXUVHV�DUH�QRW�UHOHYDQW�WR�DGYDQFHGVWDQGLQJ��7KH�&203�DQG�(1*1�FRXUVHV�DUH�EDVLFDOO\�HQRXJK�

��� *R�WR�WKH� Courses �WDE�LQ�KWWSV���SURJUDPVDQGFRXUVHV�DQX�HGX�DX�FDWDORJXH��VHDUFKDQ\RQH�RI�&203�(1*1�0$7+�3+<6�67$7�DQG�FOLFN� show all results �DW�WKHERWWRP�RI�WKH�SDJH�

��� 6DYH�WKH�+70/�SDJH�WR� credit_transfer/import_data �DQG�UHQDPH�LW�OLNH�COMP courses - ANU.html �

��� 5XQ� python extract_anu_courses.py �DQG�WKH�WH[W�ƉOHV�ZLOO�EH�JHQHUDWHG�

$GGLWLRQDO�QRWHV�DERXW�KRZ�WR�GHSOR\�WKLV�RQ�D�OLYH�V\VWHP

Deployment

55

Page 65: Credit Transfer and Academic Planning SystemChapter 2 gives an overall description of the project and presents the stakeholders as well as the objectives. Chapter 3 introduces the

Prerequisites

$�VHUYHU�ZLWK�DQ\�/LQX[�GLVWULEXWLRQ�LQVWDOOHG��+HUH�,�XVH�8EXQWX�6HUYHU�������IRU�DQH[DPSOH�,QVWDOO�3\WKRQ����bash $ sudo apt-get python3.6,QVWDOO�3RVWJUH64/bash $ sudo apt update$ sudo apt install postgresql postgresql-contrib,QVWDOO�1JLQ[bash $ sudo apt-get install nginx$V�IRU�WKH�GRPDLQ� articulation.cecs.anu.edu.au ��DVN�'U�5DPHVK�6DQNDUDQDUD\DQDUDPHVK#FV�DQX�HGX�DX�DQG�5REHUW�(GZDUGV�ERE#FV�DQX�HGX�DX�IRU� sudo �DFFHVV�

Installing

$�VWHS�E\�VWHS�VHULHV�RI�H[DPSOHV�WKDW�WHOO�\RX�KRZ�WR�GHSOR\�WKH�SURMHFW

��� &ORQH�WKLV�UHSRVLWRU\�WR�\RXU�VHUYHU�ZLWK�+7736�

$ git clone https://gitlab.cecs.anu.edu.au/u6158063/credit-transfer.git

��� &UHDWH�D�GDWDEDVH�FDOOHG� advanced_standing �LQ�WKH�3RVWJUH64/�

CREATE DATABASE advanced_standing;

��� *R�WR� credit_transfer/credit_transfer �GLUHFWRU\�DQG�HGLW� settings.py �

&KDQJH�WKH�YDOXHV�RI� USER �DQG� PASSWORD �LQ� DATABASES �WR�\RXUV�&KDQJH�WKH�YDOXH�RI� DEBUG �IURP� True �WR� False �8QFRPPHQW� STATIC_ROOT �DQG�FRPPHQW� STATICFILES_DIRS �

��� ,PSRUW�WKH�GDWD�ƉOH� postgres_data/data19052019.pgsql �WR�\RXU�ORFDO�GDWDEDVH�

$ psql -U YourUserName advanced_standing < data19052019.pgsql

��� &UHDWH�D�YLUWXDO�HQYLURQPHQW��VD\� env ��IRU�WKLV�SURMHFW�

$ virtualenv --python=/usr/bin/python3.6 env

��� 7KHQ�DFWLYDWH�WKH�YLUWXDO�HQYLURQPHQW�

56

Page 66: Credit Transfer and Academic Planning SystemChapter 2 gives an overall description of the project and presents the stakeholders as well as the objectives. Chapter 3 introduces the

$ source env/bin/activate

��� ,QVWDOO�WKH�UHTXLUHG�SDFNDJHV�OLVWHG�LQ� credit_transfer/requirements.txt �WR�\RXUYLUWXDO�HQY�

(env) $ pip install -r requirements.txt

��� )L[�D�EXJ�LQ�WKH�SDFNDJH� django-smart-select �E\�UHSODFLQJ�D�ƉOH�LQ�\RXU�YLUWXDO�HQYZLWK�D�FRUUHFW�RQH�

1RWH�WKDW�WKLV�VWHS�LV�YHU\�,03257$17�

5HSODFH� chainedfk.js �ORFDWHG�DW�path-to-your-env/lib/python3.6/site-packages/smart_selects/static/smart-selects/admin/js/chainedfk.jsZLWK�WKH�Ɖ[HG�ƉOH�ZKLFK�\RX�FDQ�GRZQORDG�DW�https://github.com/realmadrid/django-smart-selects/blob/master/smart_selects/static/smart-selects/admin/js/chainedfk.js�

��� ,PSRUW�WKH�EDGJH�LPDJHV�RI�$18�SDUWQHU�LQVWLWXWLRQV��5XQ�WKH�VFULSW�LQ�credit_transfer/import_data/refresh_badges.py �

(env) $ python refresh_badges.py

6DPSOH�RXWSXW�

[Partner]: Begin persisting Partner...[Partner]: 30 records found in the data file.[Partner]: Persisting data finished. 30 records in total. 30 new institution badges added.

���� &UHDWH�D�VXSHUXVHU�RI�'MDQJR�WR�ORJLQ�WKH�DGPLQ�VLWH��*R�WR�WKH�GLUHFWRU\�RI�credit_transfer/manage.py �DQG�UXQ�WKH�FRPPDQG�

(env) $ python manage.py createsuperuser

(QWHU�\RXU�XVHUQDPH��HPDLO�DQG�SDVVZRUG�

���� &ROOHFW�VWDWLF�ƉOHV�RI�WKH�SURMHFW�

57

Page 67: Credit Transfer and Academic Planning SystemChapter 2 gives an overall description of the project and presents the stakeholders as well as the objectives. Chapter 3 introduces the

(env) $ python manage.py collectstatic

���� &UHDWH�1JLQ[�&RQƉJXUDWLRQ�ƉOH��<RX�FDQ�UHIHU�WR�WKH�ƉOH�ORFDWHG�DW�doc/nginx-sample-config.conf �

$ vim /etc/nginx/sites-available/anu-nginx.conf

upstream app_server {

server 0.0.0.0:8000; # Must be consistent with where gunicorn bind

}

server {

charset utf-8;

listen 80;

server_name xxx.xxx.xxx.xxx; # Your server ip here

# Logs

access_log /home/ubuntu/credit-transfer/credit_transfer/logs/nginx.access.log;

error_log /home/ubuntu/credit-transfer/credit_transfer/logs/nginx.error.log;

location = /favicon.ico { access_log off; log_not_found off; }

location /static {

alias /home/ubuntu/credit-transfer/credit_transfer/static;

}

location /media {

alias /home/ubuntu/credit-transfer/credit_transfer/media;

}

location / {

proxy_pass http://app_server;

proxy_set_header Host $host;

proxy_set_header X-Real-IP $remote_addr;

58

Page 68: Credit Transfer and Academic Planning SystemChapter 2 gives an overall description of the project and presents the stakeholders as well as the objectives. Chapter 3 introduces the

7KHQ�FUHDWH�D�V\PEROLF�OLQN�DQG�HQDEOH�WKH�FRQƉJ

$ sudo ln -s /etc/nginx/sites-available/anu-nginx.conf /etc/nginx/sites-enabled/anu-nginx.conf

7HVW�\RXU�FRQƉJ�ƉOH�LV�FRUUHFW

$ sudo nginx -t

5HVWDUW�1JLQ[

$ sudo service nginx restart

���� *R�WR�WKH�GLUHFWRU\�RI� manage.py �DQG�VWDUW�WKH� gunicorn �LQ�WKH�EDFNJURXQG

nohup gunicorn credit_transfer.wsgi:application --bind 127.0.0.1:8000 --workers=3 --name advanced_standing &> /dev/null &

The general site

0RVW�RI�WKH�$18�FRXUVHV��SURJUDPV��PDMRUV��VSHFLDOLVDWLRQV�DUH�FOLFNDEOH��ZKLFK�ZLOO�UHGLUHFWWR�WKH�FRUUHVSRQGLQJ�SDJHV�RI�$18�

The administration site

Search

$OO�WKH�NH\�ƉHOGV�RI�WKH�GDWD�DUH�VHDUFKDEOH�YLD�WKH�VHDUFK�ER[�RQ�WKH�WRS�OHIW�FRUQHU�RI�WKHSDJHV��<RXU�TXHU\�WH[W�LV�FDVH�LQVHQVLWLYH�DQG�\RX�FDQ�MXVW�VHDUFK�D�SDUW�RI�WKH�NH\ZRUGV�)RU�H[DPSOH��WKH� abbreviation �RI� Shandong Univeristy Weihai �LV� SDUW ��7KHQ�ZH�MXVWVHDUFK� sd �LQ�WKH�$UWLFXODWLRQ�SDJH�DQG�DOO�WKH�UHOHYDQW�UHFRUGV�RI�

proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

}

}

Features of the Pages

59

Page 69: Credit Transfer and Academic Planning SystemChapter 2 gives an overall description of the project and presents the stakeholders as well as the objectives. Chapter 3 introduces the

Shandong Univeristy Weihai �ZLOO�EH�GLVSOD\HG�

Filter

)LOWHUV�DUH�DYDLODEOH�LQ�WKH�ULJKW�VLGHEDU�RI�WKH�FKDQJH�OLVW�SDJHV�RI�WKH�DGPLQ��DV�LOOXVWUDWHGEHORZ��<RX�FDQ�XVH�D�FRPELQDWLRQ�RI�ƉOWHUV�WR�JHW�VSHFLƉF�UHVXOWV�

Bold Fields

60

Page 70: Credit Transfer and Academic Planning SystemChapter 2 gives an overall description of the project and presents the stakeholders as well as the objectives. Chapter 3 introduces the

7KH�EROG�ƉHOGV�LQ�HDFK�SDJH�PHDQ�WKDW�WKH\�DUH�UHTXLUHG�ƉHOG��7KH�RWKHUV�DUH�RSWLRQDO�

Change History

,Q�WKH�GHWDLO�SDJH�RI�DQ\�UHFRUG��WKH�DGPLQ�FDQ�YLHZ�WKH�FKDQJH�KLVWRU\�E\�WKH� HISTORYEXWWRQ�RQ�WKH�WRS�ULJKW�FRUQHU��ZKLFK�ZLOO�GLVSOD\�WKH�GDWH�WLPH��XVHUV�DQG�DFWLRQV�RI�WKHFKDQJHV�

Check and Cross Mark

7KH�DGPLQV�FDQ�HDVLO\�FKHFN�ZKHWKHU�WKH� BADGE �DQG� WEBSITE �ƉHOGV�RI�WKH�SDUWQHUV�KDYHEHHQ�DGGHG��7KH�JUHHQ�FKHFN�PDUN�PHDQV�WKH�ƉHOG�KDV�EHHQ�ƉOOHG�DQG�WKH�UHG�FURVV�PDUNPHDQV�DEVHQW�ƉHOG�

61

Page 71: Credit Transfer and Academic Planning SystemChapter 2 gives an overall description of the project and presents the stakeholders as well as the objectives. Chapter 3 introduces the

How to add new articulations efficiently?

:KHQ�\RX�ZDQW�WR�DGG�QHZ�DUWLFXODWLRQV�EHWZHHQ�$18�DQG�RQH�SDUWQHU�LQVWLWXWLRQ�

��� /RJLQ�\RXU�DFFRXQW�LQ�WKH�DGPLQLVWUDWLRQ�VLWH

��� 2SHQ���WDEV�LQ�\RXU�&KURPH�IRU

3DUWQHU�3URJUDP�3DJH�KWWS���ORFDOKRVW������DGPLQ�DGYDQFHGBVWDQGLQJ�SDUWQHUSURJUDP�3DUWQHU�'HJUHH�3DJH�KWWS���ORFDOKRVW������DGPLQ�DGYDQFHGBVWDQGLQJ�SDUWQHUGHJUHH�$18�'HJUHH�3DJH��KWWS���ORFDOKRVW������DGPLQ�DGYDQFHGBVWDQGLQJ�DQXGHJUHH�$UWLFXODWLRQ�3DJH��KWWS���ORFDOKRVW������DGPLQ�DGYDQFHGBVWDQGLQJ�DUWLFXODWLRQ�

�5HSODFH� localhost:8000 �LQ�WKH�XUOV�WR�\RXU�UHDO�DGGUHVV�

��� )RU�VXFK�DQ�DUWLFXODWLRQ��FURSSHG�IURP�D�3')�ƉOH��ZLWK�/LDRQLQJ�8QLYHUVLW\�RI�&KLQD�

:LWK�UHIHUHQFLQJ�WR�WKH�DUWLFXODWLRQ�DERYH

$GG�3DUWQHU�3URJUDP�LQ�WKH��VW�WDE�LI�LW�QRW�H[LVWV

Q & A

62

Page 72: Credit Transfer and Academic Planning SystemChapter 2 gives an overall description of the project and presents the stakeholders as well as the objectives. Chapter 3 introduces the

$GG�3DUWQHU�'HJUHH�LQ�WKH��QG�WDE�LI�LW�QRW�H[LVWV�,I�WKH�GHJUHH�KDV�PXOWLSOH�PDMRUV��MXVW�HQWHU�RQH�PDMRU�HDFK�OLQH�LQ�WKH� Major(s)ƉHOG�

$GG�$18�'HJUHH�LQ�WKH��UG�WDE�LI�QRW�H[LVWV��$IWHU�VHDUFKLQJ�WKH�NH\ZRUGV�LQ�WKHVHDUFK�ER[��ZH�KDYH�IRXQG�WKDW�WKH�$18�'HJUHH�ZLWK�PDMRUV�,QIRUPDWLRQ�6\VWHPDQG�6RIWZDUH�'HYHORSPHQW��VR�MXVW�VNLS�WKLV�VWHS�

,I�\RX�ZDQW�WR�DGG�D�QHZ�RQH�ZLWK�PRUH�WKDQ�RQH�PDMRU�VSHFLDOLVDWLRQ��MXVW�KROGGRZQ��&RQWURO���RU��&RPPDQG��RQ�D�0DF��WR�VHOHFW�PRUH�WKDQ�RQH�$GG�DQ�DUWLFXODWLRQ�LQ�WKH��WK�WDE

63

Page 73: Credit Transfer and Academic Planning SystemChapter 2 gives an overall description of the project and presents the stakeholders as well as the objectives. Chapter 3 introduces the

/HWV�YLHZ�WKH�DUWLFXODWLRQ�ZH�MXVW�DGGHG

64

Page 74: Credit Transfer and Academic Planning SystemChapter 2 gives an overall description of the project and presents the stakeholders as well as the objectives. Chapter 3 introduces the

,W�ZRXOG�EH�YHU\�IDVW�ZKHQ�\RX�JHW�IDPLOLDU�ZLWK�WKLV�ZRUNƊRZ�

How to add new sample study plans?

:KHQ�\RX�ZDQW�WR�DGG�QHZ�VDPSOH�VWXG\�SODQV�DIWHU�DGGLQJ�DQ�DUWLFXODWLRQ�

��� /RJLQ�\RXU�DFFRXQW�LQ�WKH�DGPLQLVWUDWLRQ�VLWH��� 2SHQ�WKH�6WXG\�3ODQ�3DJH��UHSODFH� localhost:8000 �LQ�WKH�XUOV�WR�\RXU�UHDO�DGGUHVV��KWWS���ORFDOKRVW������DGPLQ�DGYDQFHGBVWDQGLQJ�VWXG\SODQ�

��� )RU�VXFK�D�VDPSOH�VWXG\�SODQ��FURSSHG�IURP�D�3')�ƉOH��IRU�DQ�DUWLFXODWLRQ�RI�/LDRQLQJ8QLYHUVLW\�RI�&KLQD�

65

Page 75: Credit Transfer and Academic Planning SystemChapter 2 gives an overall description of the project and presents the stakeholders as well as the objectives. Chapter 3 introduces the

:LWK�UHIHUHQFLQJ�WR�WKH�LQIRUPDWLRQ�DERYH$GG�D�QHZ�VDPSOH�VWXG\�SODQ��7KH�ƉUVW�WKUHH�GURSGRZQ�OLVWV�DUH�FKDLQHG��\RX�ZRQWJHW�WRR�PDQ\�FKRLFHV�1RWH�WKDW�RQH�FRXUVH�HDFK�OLQH�LQ�WKH�WH[W�DUHDV�

/HWV�YLHZ�WKH�VDPSOH�VWXG\�SODQ�ZH�MXVW�DGGHG

66

Page 76: Credit Transfer and Academic Planning SystemChapter 2 gives an overall description of the project and presents the stakeholders as well as the objectives. Chapter 3 introduces the

<RX�FDQ�QRWLFH�WKDW�WKH�XSGDWH�WLPH�KDV�EHHQ�DXWRPDWLFDOO\�UHFRUGHG�

How to add course mappings (advanced standing details)?

��� *R�WR� Partner �SDJH�DQG�HGLW�WKH� Course mappings �ƉHOG��(DFK�OLQH�LV�D�PDSSLQJ�LQWKH�IROORZLQJ�IRUPDW�ANU course code;Partner course name 1;Partner course name 2;...2QH�$18�FRXUVH�FRGH�IROORZHG�E\�WKH�SDUWQHU�FRXUVH�QDPHV��VSOLW�E\�VHPLFRORQ����(�J�� COMP1110;Object Oriented Programming;Data Structure

67

Page 77: Credit Transfer and Academic Planning SystemChapter 2 gives an overall description of the project and presents the stakeholders as well as the objectives. Chapter 3 introduces the

��� *R�WR� Articulation �SDJH��VHOHFW�WKH�WDUJHW�DUWLFXODWLRQ�UHFRUG�DQG�HGLW�WKH�Advanced standing details �ƉHOG��+ROG�GRZQ��&RQWURO���RU��&RPPDQG��RQ�D�0DF��WRVHOHFW�PRUH�WKDQ�RQH�

��� 7KH�FRXUVH�PDSSLQJV�ZRXOG�EH�SURFHVVHG�E\�WKH�SURJUDP�DQG�ORRN�OLNH�WKLV�

68

Page 78: Credit Transfer and Academic Planning SystemChapter 2 gives an overall description of the project and presents the stakeholders as well as the objectives. Chapter 3 introduces the

How to add required (compulsory) courses for a partner institution?

*R�WR� Parnter Degrees › XXX University �DQG�HGLW�WKH� Required courses �ƉHOG�DQG�Required courses note ��RSWLRQDO��ƉHOG��$V�EHIRUH��KROG�GRZQ��&RQWURO���RU��&RPPDQG��RQD�0DF��WR�VHOHFW�PRUH�WKDQ�RQH�

How to add new group and user?

$GG�QHZ�JURXS�

*R�WR� Authentication and Authorization › Groups › Add group ��VHOHFW�VRPH�SHUPLVVLRQVDQG�DGG�WKHP�WR�WKH�ULJKW�VLGH��DQG�VDYH�LW�

69

Page 79: Credit Transfer and Academic Planning SystemChapter 2 gives an overall description of the project and presents the stakeholders as well as the objectives. Chapter 3 introduces the

$GG�QHZ�XVHU�

��� *R�WR� Authentication and Authorization › Users › Add user �DQG�DGG�D�XVHU�

1RWH�WKDW�IRU�WKH�XVHUQDPH�VKRXOG�EH

����FKDUDFWHUV�RU�IHZHU/HWWHUV��GLJLWV�DQG�#�������B�RQO\

)RU�VHFXULW\�FRQVLGHUDWLRQ��WKH�SDVVZRUG�

&DQW�EH�WRR�VLPLODU�WR�\RXU�RWKHU�SHUVRQDO�LQIRUPDWLRQ0XVW�FRQWDLQ�DW�OHDVW���FKDUDFWHUV&DQW�EH�D�FRPPRQO\�XVHG�SDVVZRUG&DQW�EH�HQWLUHO\�QXPHULF

5DZ�SDVVZRUGV�DUH�QRW�VWRUHG��VR�WKHUH�LV�QR�ZD\�WR�VHH�WKLV�XVHUV�SDVVZRUG��7KHSDVVZRUG�ZLOO�EH�KDVKHG�E\� pbkdf2_sha256 algorithm �IRU���������LWHUDWLRQV��ZLWK�VDOWDGGHG�

��� (GLW�WKH�SHUVRQDO�LQIRUPDWLRQ��QDPH��HPDLO��DQG�GHWHUPLQH�WKH�FKHFNER[HV�IRUSHUPLVVLRQV�

$FWLYH��'HVLJQDWHV�ZKHWKHU�WKLV�XVHU�VKRXOG�EH�WUHDWHG�DV�DFWLYH��8QVHOHFW�WKLVLQVWHDG�RI�GHOHWLQJ�DFFRXQWV�6WDƈ�VWDWXV��'HVLJQDWHV�ZKHWKHU�WKH�XVHU�FDQ�ORJ�LQWR�WKLV�DGPLQ�VLWH�6XSHUXVHU�VWDWXV��'HVLJQDWHV�WKDW�WKLV�XVHU�KDV�DOO�SHUPLVVLRQV�ZLWKRXW�H[SOLFLWO\DVVLJQLQJ�WKHP�

70

Page 80: Credit Transfer and Academic Planning SystemChapter 2 gives an overall description of the project and presents the stakeholders as well as the objectives. Chapter 3 introduces the

'HWHUPLQH�WKH�SHUPLVVLRQV�RQ�WKH�GDWD�RI�WKH�XVHU��,�UHFRPPHQG�\RX�WR�VHOHFW�D�JURXS�

71

Page 81: Credit Transfer and Academic Planning SystemChapter 2 gives an overall description of the project and presents the stakeholders as well as the objectives. Chapter 3 introduces the

How to change my password?

&OLFN� CHANGE PASSWORD �RQ�WKH�WRS�ULJKW�FRUQHU�RI�WKH�VLWH�

How to change the badge of a partner institution?

*R�WR�WKH�ERWWRP�RI�SDUWQHU�GHWDLOV�SDJH��FKRRVH�D�QHZ�LPDJH�DQG�FOLFN� SAVE �WR�RYHUULGHWKH�FXUUHQW�RQH�

How to delete records?

'HOHWH�RQH�UHFRUG,Q�WKH�GHWDLO�SDJH�RI�D�UHFRUG��FOLFN�WKH� Delete �EXWWRQ�RQ�WKH�ERWWRP�OHIW�FRUQ�RI�WKHSDJH�'HOHWH�PXOWLSOH�UHFRUGV,Q�D�FKDQJH�OLVW�SDJH�RI�WKH�DGPLQ��FKHFN�WKH�UHFRUGV�WKDW�QHHG�WR�EH�GHOHWHG�DQG

72

Page 82: Credit Transfer and Academic Planning SystemChapter 2 gives an overall description of the project and presents the stakeholders as well as the objectives. Chapter 3 introduces the

VHOHFW� delete �RSWLRQ�LQ� Action �

'MDQJR�����GRFXPHQWDWLRQ8VH�*XQLFRUQ�EHKLQG�1JLQ[1JLQ[�%HJLQQHUŇV�*XLGH3RVWLFR��$�0RGHUQ�3RVWJUH64/�&OLHQW�IRU�WKH�0DF

+DRWLDQ�6KL

(PDLO��KDRWLDQ�VKL#DQX�HGX�DX��IRUPDO�����������#TT�FRP��SULYDWH�

5HVHDUFK�6FKRRO�RI�&RPSXWHU�6FLHQFH��$XVWUDOLDQ�1DWLRQDO�8QLYHUVLW\

7KLV�SURMHFW�LV�P\�RZQ�RULJLQDO�ZRUN��ZLWK�WKH�IROORZLQJ�H[FHSWLRQV�

7KH�WH[W�LQ�WKH�LQGH[�KWPO�DQG�$18�ORJR�LPDJHV�UHIHUUHG�IURPKWWSV���FHFV�DQX�HGX�DX�VWXG\�DGYDQFHG�VWDQGLQJ7KH�EDQQHU�LPDJH�LQ�WKH�PLGGOH�RI�LQGH[�KWPO�LV�GRZQORDGHG�IURP�WKH�)DFHERRN�RI&(&67KH�GDWD�ƉOH�RI�SRVWJUH64/�ZDV�SURGXFHG�DFFRUGLQJ�WR�WKH�GDWD�RI�&(&6���$GYDQFHGVWDQGLQJ�DQG�UDPHVK���DUWLFXODWLRQ

Useful Resources for Development

Author

Statement of Originality

73

Page 83: Credit Transfer and Academic Planning SystemChapter 2 gives an overall description of the project and presents the stakeholders as well as the objectives. Chapter 3 introduces the

license mit

7KLV�SURMHFW�LV�OLFHQVHG�XQGHU�WKH�0,7�/LFHQVH���VHH�WKH�/,&(16(�ƉOH�IRU�GHWDLOV

)RU�5DPHVK�6DQNDUDQDUD\DQD��ZKR�JDYH�PH�D�ORW�RI�DGYLFHV�DQG�VWURQJ�VXSSRUW�RQ�WKH�SURMHFW��DQG�HQFRXUDJHG�PH�ZKHQ�,�ZDV�LQ�WURXEOH�)RU�6KD\QH�)OLQW��ZKR�PDGH�PH�JHW�D�EHWWHU�XQGHUVWDQGLQJ�RQ�GDWD�PRGHOV�DQG�KHOSHG�PH�UHYLVH�WKH�PRGHOV�)RU�-RKDQ�$UQEHUJ��ZKR�JDYH�PH�IHHGEDFN�DQG�KHOSHG�PH�VHHN�WHFKQLFDO�VXSSRUW�)RU�3DXO�0HOOR\��ZKR�JDYH�PH�IHHGEDFN�DQG�DGYLFH�)RU�5REHUW�(GZDUGV��ZKR�RƈHUHG�VXSSRUW�RQ�VHWWLQJ�XS�WKH�90�RI�WKH�FROOHJH�)RU�P\�SDUHQWV��ZKR�HQDEOH�PH�WR�JHW�KHUH�)RU�<XNH�/X��ZKR�DOZD\V�EHOLHYHV�LQ�PH�DQG�EULQJV�PH�LQVSLUDWLRQV�

License

Acknowledgments

74