Project name :Assignment Submission System
Name : Khairiyyah Binti Mohd Noor
RollNo : 200905016
 
Description:

This project consists of two parts which is one part is for admin side and another part is for student side. Admin side can be access using admin_interface and student part can be access using assignment_interface. Both admin and student should be first login through login_interface to access to both of these interfaces. For the new student, he/she should register first through register_interface before he/she can login to the system. Below I mention the description for each of these interfaces:

1) login_interface

- For student, he/she need to enter his/her mail id and password before can be access to the system. If the combiantion of login is correct,the assignment_interface will be appear and student can view current assignment and questions, can answer all the questions there and also can upload any files related to that assignment. In this page if student did not register yet or a new student, he/she must register by click in 'Sign Up For New Student' button. For the admin, if they want to create an assignment's questions, edit questions and see the list of student that have submitted the assignment, they have to login at the same page. For admin, they should login with email id=”admin” and password=”123”.

2) register_interface

- Register for the new student.Student must enter the name,roll number,password and student email id.It will be used when they want to login. 

3) assignment_interface

- In this page, student can view current assignment number and the questions related to this assignment by click the 'Current assignment' button and 'View current questions for this assignment' button. Student can type their answers on the text view that have been provided to them in this page and they can submit their asnwers to the database by clicking the 'Submit' button and they also can save their asnwers to the external file as backup answer(in case if their answers fail to be submitted to the database) by clicking the 'Save' button. Student also can upload any files if needed by clicking the 'Browse' and 'Upload' button. For the same assignment, one student can only submit their answers once only, which means a student cannot submitted the assignment more than once. Student can view their previous assignment's answers by clicking the 'Previous answer' button. For information how to use this system,especially for the beginner, they can choose 'Help' button to get some information about this system. Student can logout from the system by choose the 'Logout' button.

4) admin_interface

- In this page, admin can create a new assignment's questions by enter assignment number and question number to the field that has been provided. Admin can only create and submit one question each time and needed to create the next question for the next step(create questions based on question number). Admin also can view and edit their current question by clicking the 'View assignment and questions' button and they can edit and save the questions by choose 'Edit' and 'Save' button. Admin can view the list of students that already submitted the current assignment by enter assignment number related and clicking the 'Display List of Students' button. Admin can logout from the system by choose the 'Logout' button. 

 
The areas getting covered in this project are:
1. Mysql database - for storing assignment's questions, student's answers submission and student's information.

Username=cs3002_user
Password=cs3002_password
Database=cs3002_database

command to connect to mysql database: mysql -u cs3002_user -p 
				      use cs3002_database

2. GTK programming - for creating all the interface related.
3. File I/O handling - for creating external file in the hardisk to save student's answers as backup file.


This project consists of one '.c' file and one '.h' file only :
1. assignment_submission.c
2. connect.h

Requirements:
1 Mysql should be preinstalled.
2 Gtk should be preinstalled.
3 Database consisting of 4 tables which are register table, assignmnt table, submission table and submissionFile table.
  Here, I also have provided the code for creating database, and also the CREATE statements to build the database.


Execution of project:
First, user need to run 'make' to execute this program. After all the files related has been executed, user need to run './assignment_submission' to start this program. This project start with login_interface which allow student/admin to access to assignment_interface/admin_interface.


Sample CREATE table statements:

CREATE table register(name varchar(50), rollNo integer primary key, password varchar(50), email varchar(50));

CREATE table assignmnt(assigNo integer,qNo integer, listQuestions varchar(1000));

CREATE table submission(assgNo integer,email varchar(50),primary key(assgNo,email), answers varchar(1000));

CREATE table submissionFile(assgNo integer,email varchar(50),primary key(assgNo,email), filename varchar(100));


