Skip to content

This project showcases my ability to create a CRUD application using OOP.

Notifications You must be signed in to change notification settings

omarcinkonis/om_nfq

Repository files navigation

What is this?

This project is made according to the specifications of a task that was given to me by NFQ. The project showcases my ability to create a CRUD application using OOP.

 

Quick start

  1. Download this project as a .zip file.
  2. Extract the folder "om_nfq-master" to the root directory of your server. The name of this folder must not be changed.
  3. Import the database contained in "om_nfq.sql".
  4. Configure the database connection through config → Database.php.
  5. Access the application through your browser by visiting "localhost/om_nfq-master/".

 

The task

We need an application for a teacher to assign students to groups for a project. Please read the requirements below and implement a solution that meets them. You will also find a mockup of a project status page that you can follow when implementing your design.

 

Technical requirements

No. Requirement Status Comment
1 Include a README file that contains a short description of your solution and technical decisions. Complete -
2 Project must be stored in a publicly accessible git repository in GitHub or BitBucket. Complete -
3 All data should be stored in MySQL database. You must provide a script to create an initial schema for the database. Complete -
4 Task must be implemented as a web application using OOP principles with PHP, Java or Python programming languages for the backend. JavaScript and CSS can be used for front-end. Complete PHP chosen.

 

Functional requirements

No. Requirement Status Comment
1 On first visit a teacher should create a new project by providing a title of the project and a number of groups that will participate in the project and a maximum number of students per group. Groups should be automatically initialized when a project is created. Complete -
2 If the project exists, a teacher can add students using the “Add new student” button. Each student must have a unique full name. Complete -
3 All students are visible on a list. Complete -
4 Teacher can delete a student. In such a case, the student should be removed from the group and project. Complete -
5 Teacher can assign a student to any of the groups. Any student can only be assigned to a single group. In case the group is full, information text should be visible for a teacher. Complete -

 

Bonus requirements

No. Requirement Status Comment
1 Make information on the status page to automatically update every 10 seconds. Complete Implemented with AJAX. Information can also be updated with a button. Automatic refresh when a student is assigned to a group. Refresh is delayed until user finishes selection.
2 Implement functional requirement #2 using RESTful API. Complete -
3 Add automated test for functional requirement #4. Complete Implemented with PHPUnit 9. Once PHPUnit is set up, open terminal, go to the project directory and launch the test by typing "vendor/bin/phpunit" (no quotes).

 

My own extras

  1. Client and server side data validation. The user may not input project or student names that exceed 255 characters. Number of groups, students per group expected to range from 2 to 100.
  2. Data cleanup - HTML tags and special characters are stripped, therefore the user may not manipulate the page in an unwanted way (for example, it is impossible to use an HTML bold tag for project / student names).
  3. Database is accessed with prepares for improved security.

 

Database

I chose to use a junction table (a table with two foreign keys) in order to prevent data duplication.

There is no group table, group information (g_number) is stored in p_s_junction table.

Entity relationship diagram:

Implementation in PHPMyAdmin:

 

Class diagram

 

Design

The design is based on the provided status page mockup.

The user is notified about system functionality through JavaScript alert() messages.

On the status page, there is a side menu with home and refresh buttons. I implemented an automatic refresh timer below the refresh button.

About

This project showcases my ability to create a CRUD application using OOP.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published