Giter Club home page Giter Club logo

redhawk96 / uniscore Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 0.0 63.05 MB

UniScore is a standalone examination system developed using Java Swing/AWT following RMI architecture. The system consists of three user types, lecturer, student, and administrator. Students can take an exam using UniScore. Lecturers can review and manage examinations, and administrators can monitor/manage examinations and students appropriately.

Java 100.00%
rmi-client-server java-rmi mysql-database examination-management-system java-8 java-mail ipfy-api quickchart-api jfreechart java-swing-application gmail-smtp ecplise-ide

uniscore's Introduction

UniScore

Live Screens

Getting Started

  • Clone the UniScore repository as follow,
 git clone https://github.com/redhawk96/UniScore.git
  • Open git-bash terminal and checkout to a new branch as you prefer(eg : UniScore-Local-Dev),
 git checkout -b UniScore-Local-Dev
  • Open both projects with ecplise IDE,
File > Open Project from File System > locate projects from the local directory > Click finish

Prerequisites

Installing

  • Run Xampp and start Apache and MySQL services

  • Type http://localhost/phpmyadmin/ on Chrome

  • Create a new database called uniscoredb

  • Select uniscoredb and go to SQL tab then run the following script

    MySQL Script

    --
    -- Table structure for table `activitylogs`
    --
    
    CREATE TABLE `activitylogs` (
      `activityId` int(11) NOT NULL,
      `activityBrief` text NOT NULL,
      `triggeredBy` varchar(255) NOT NULL,
      `triggeredOn` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
    );
    
    -- --------------------------------------------------------
    
    --
    -- Table structure for table `exams`
    --
    
    CREATE TABLE `exams` (
      `examId` int(11) NOT NULL,
      `examName` varchar(255) NOT NULL,
      `moduleId` varchar(255) NOT NULL,
      `duration` int(11) NOT NULL,
      `enrollmentKey` varchar(20) NOT NULL,
      `status` enum('Active','Disabled') NOT NULL DEFAULT 'Disabled',
      `createdAt` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
      `updatedAt` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
    ); 
    
    --
    -- Dumping data for table `exams`
    --
    
    INSERT INTO `exams` (`examId`, `examName`, `moduleId`, `duration`, `enrollmentKey`, `status`, `createdAt`, `updatedAt`) VALUES
    (1, 'Mid Term', 'CIS002', 40, 'cis2020', 'Active', '2020-03-09 21:42:30', '2020-03-09 21:42:30');
    
    -- --------------------------------------------------------
    
    --
    -- Table structure for table `grades`
    --
    
    CREATE TABLE `grades` (
      `grade` varchar(2) NOT NULL,
      `passMark` int(11) NOT NULL
    ); 
    
    --
    -- Dumping data for table `grades`
    --
    
    INSERT INTO `grades` (`grade`, `passMark`) VALUES
    ('A', 75),
    ('B', 65),
    ('C', 55),
    ('D', 45),
    ('E', 35);
    
    --
    -- Triggers `grades`
    --
    DELIMITER $$
    CREATE TRIGGER `grade_to_uppercase_trigger` BEFORE INSERT ON `grades` FOR EACH ROW SET NEW.grade = UPPER(NEW.grade)
    $$
    DELIMITER ;
    
    -- --------------------------------------------------------
    
    --
    -- Table structure for table `modules`
    --
    
    CREATE TABLE `modules` (
      `moduleId` varchar(255) NOT NULL,
      `moduleName` varchar(255) NOT NULL,
      `year` int(11) NOT NULL,
      `semester` int(11) NOT NULL,
      `teacherId` varchar(255) NOT NULL,
      `createdAt` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
      `updatedAt` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
    );
    
    --
    -- Dumping data for table `modules`
    --
    
    INSERT INTO `modules` (`moduleId`, `moduleName`, `year`, `semester`, `teacherId`, `createdAt`, `updatedAt`) VALUES
    ('CIS002', 'Comparative Integrated Systems', 3, 1, '[email protected]', '2020-03-09 21:41:16', '2020-03-09 21:41:16'),
    ('RM003', 'Research Methodologies', 3, 1, '[email protected]', '2020-03-09 21:41:16', '2020-03-09 21:41:16');
    
    -- --------------------------------------------------------
    
    --
    -- Table structure for table `questions`
    --
    
    CREATE TABLE `questions` (
      `questionId` int(11) NOT NULL,
      `examId` int(11) NOT NULL,
      `question` text NOT NULL,
      `option1` text NOT NULL,
      `option2` text NOT NULL,
      `option3` text NOT NULL,
      `option4` text NOT NULL,
      `answer` int(2) NOT NULL,
      `createdAt` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
      `updatedBy` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
    );
    
    -- --------------------------------------------------------
    
    --
    -- Table structure for table `submissions`
    --
    
    CREATE TABLE `submissions` (
      `moduleId` varchar(255) NOT NULL,
      `studentId` varchar(255) NOT NULL,
      `examId` int(11) NOT NULL,
      `answerList` text NOT NULL,
      `overallScore` double NOT NULL,
      `grade` varchar(2) NOT NULL,
      `submittedOn` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
    );
    
    -- --------------------------------------------------------
    
    --
    -- Table structure for table `users`
    --
    
    CREATE TABLE `users` (
      `userId` varchar(255) NOT NULL,
      `firstName` varchar(255) NOT NULL,
      `lastName` varchar(255) NOT NULL,
      `gender` enum('Male','Female') NOT NULL DEFAULT 'Male',
      `email` varchar(255) NOT NULL,
      `nic` varchar(12) NOT NULL,
      `phone` int(11) NOT NULL,
      `address` text NOT NULL,
      `role` enum('Student','Lecturer','Admin') NOT NULL DEFAULT 'Student',
      `registeredDate` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
      `password` varchar(255) NOT NULL,
      `status` enum('Active','Disabled') NOT NULL DEFAULT 'Active'
    ); 
    
    --
    -- Dumping data for table `users`
    --
    
    INSERT INTO `users` (`userId`, `firstName`, `lastName`, `gender`, `email`, `nic`, `phone`, `address`, `role`, `registeredDate`, `password`, `status`) VALUES
    ('[email protected]', 'Ishani', 'Welagedara', 'Female', '[email protected]', '950457789V', 715478965, 'No 4, Wayward Pl, Colombo 03', 'Student', '2020-03-10 03:00:00', 'e10adc3949ba59abbe56e057f20f883e', 'Active'),
    ('[email protected]', 'subarshan', 'Thiyagarajah', 'Male', '[email protected]', '950457410V', 770452014, 'No 8, Ward St, Colombo 02', 'Admin', '2020-03-10 03:00:00', 'e10adc3949ba59abbe56e057f20f883e', 'Active'),
    ('[email protected]', 'Uditha', 'Silva', 'Male', '[email protected]', '950452374V', 774102354, 'No 6, Park St Avenue, Colombo 01', 'Lecturer', '2020-03-10 03:00:00', 'e10adc3949ba59abbe56e057f20f883e', 'Active');
    
    --
    -- Indexes for dumped tables
    --
    
    --
    -- Indexes for table `activitylogs`
    --
    ALTER TABLE `activitylogs`
      ADD PRIMARY KEY (`activityId`),
      ADD KEY `fk_activitylog_triggered_by` (`triggeredBy`) USING BTREE;
    
    --
    -- Indexes for table `exams`
    --
    ALTER TABLE `exams`
      ADD PRIMARY KEY (`examId`,`examName`,`moduleId`) USING BTREE,
      ADD KEY `fk_exam_module_id` (`moduleId`) USING BTREE;
    
    --
    -- Indexes for table `grades`
    --
    ALTER TABLE `grades`
      ADD PRIMARY KEY (`grade`);
    
    --
    -- Indexes for table `modules`
    --
    ALTER TABLE `modules`
      ADD PRIMARY KEY (`moduleId`),
      ADD KEY `fk_module_teacher_id` (`teacherId`) USING BTREE;
    
    --
    -- Indexes for table `questions`
    --
    ALTER TABLE `questions`
      ADD PRIMARY KEY (`questionId`),
      ADD KEY `fk_question_exam_id` (`examId`) USING BTREE;
    
    --
    -- Indexes for table `submissions`
    --
    ALTER TABLE `submissions`
      ADD PRIMARY KEY (`moduleId`,`studentId`,`examId`),
      ADD KEY `fk_submission_student_id` (`studentId`),
      ADD KEY `fk_submission_exam_id` (`examId`),
      ADD KEY `fk_submission_grade` (`grade`),
      ADD KEY `fk_submission_module_id` (`moduleId`);
    
    --
    -- Indexes for table `users`
    --
    ALTER TABLE `users`
      ADD PRIMARY KEY (`userId`);
    
    --
    -- AUTO_INCREMENT for dumped tables
    --
    
    --
    -- AUTO_INCREMENT for table `activitylogs`
    --
    ALTER TABLE `activitylogs`
      MODIFY `activityId` int(11) NOT NULL AUTO_INCREMENT;
    
    --
    -- AUTO_INCREMENT for table `exams`
    --
    ALTER TABLE `exams`
      MODIFY `examId` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
    
    --
    -- AUTO_INCREMENT for table `questions`
    --
    ALTER TABLE `questions`
      MODIFY `questionId` int(11) NOT NULL AUTO_INCREMENT;
    
    --
    -- Constraints for dumped tables
    --
    
    --
    -- Constraints for table `activitylogs`
    --
    ALTER TABLE `activitylogs`
      ADD CONSTRAINT `fk_triggered_by` FOREIGN KEY (`triggeredBy`) REFERENCES `users` (`userId`);
    
    --
    -- Constraints for table `exams`
    --
    ALTER TABLE `exams`
      ADD CONSTRAINT `fk_module_id` FOREIGN KEY (`moduleId`) REFERENCES `modules` (`moduleId`) ON DELETE CASCADE ON UPDATE CASCADE;
    
    --
    -- Constraints for table `modules`
    --
    ALTER TABLE `modules`
      ADD CONSTRAINT `fk_teacher_id` FOREIGN KEY (`teacherId`) REFERENCES `users` (`userId`) ON DELETE CASCADE ON UPDATE CASCADE;
    
    --
    -- Constraints for table `questions`
    --
    ALTER TABLE `questions`
      ADD CONSTRAINT `fk_exam_id` FOREIGN KEY (`examId`) REFERENCES `exams` (`examId`) ON DELETE CASCADE ON UPDATE CASCADE;
    
    --
    -- Constraints for table `submissions`
    --
    ALTER TABLE `submissions`
      ADD CONSTRAINT `fk_submission_exam_id` FOREIGN KEY (`examId`) REFERENCES `exams` (`examId`) ON DELETE CASCADE ON UPDATE CASCADE,
      ADD CONSTRAINT `fk_submission_grade` FOREIGN KEY (`grade`) REFERENCES `grades` (`grade`) ON DELETE CASCADE ON UPDATE CASCADE,
      ADD CONSTRAINT `fk_submission_module_id` FOREIGN KEY (`moduleId`) REFERENCES `modules` (`moduleId`) ON DELETE CASCADE ON UPDATE CASCADE,
      ADD CONSTRAINT `fk_submission_student_id` FOREIGN KEY (`studentId`) REFERENCES `users` (`userId`) ON DELETE CASCADE ON UPDATE CASCADE;
    COMMIT;
    

  • Inorder to start the server go to UniScore-Server project on ecplise and run the UniScoreServer.java file as below

UniScore-Server > src > connectivity > UniScoreServer.java > right-click > Run As > Java Application
  • Then go to start the client go to UniScore-Client project on ecplise and run the UniScoreClient.java file as below
UniScore-Client > src > connectivity > UniScoreClient.java > right-click > Run As > Java Application
  • Login Instructions > Username - L000015 | Password 123456

uniscore's People

Contributors

ishilw avatar redhawk96 avatar subarshan avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

uniscore's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.