├── final ├── bin │ └── placeholder.txt ├── dat │ └── placeholder.txt ├── lib │ └── placeholder.txt ├── misc │ └── placeholder.txt ├── Donnervoegel.txt └── README.txt ├── src ├── gui │ ├── utils │ │ ├── ActivityTestSolution │ │ ├── ActivityTestSubmission │ │ └── StudentList │ ├── markshark-1x.png │ ├── markshark-3x.png │ ├── markshark-5x.png │ ├── markshark-5x-eyes.png │ ├── types │ │ └── MSPanel.java │ ├── MarkSharkGUI.java │ ├── SettingsPage.form │ ├── LogManagement.java │ ├── LogManagement.form │ ├── LandingPageTA.form │ ├── LandingPageAdmin.form │ ├── LandingPageTA.java │ ├── LandingPageAssistAdmin.form │ ├── LandingPageAdmin.java │ ├── LandingPageInstructor.form │ ├── SettingsPage.java │ └── LandingPageAssistAdmin.java ├── files │ └── CMPT120 │ │ └── Activity 1 │ │ └── placeholder.txt ├── jaws.mid ├── lib │ ├── batik-dom.jar │ ├── batik-util.jar │ ├── batik-xml.jar │ ├── batik-svg-dom.jar │ ├── batik-svggen.jar │ ├── icepdf-core.jar │ ├── icepdf-viewer.jar │ ├── batik-awt-util.jar │ └── versions-licenses.html ├── types │ ├── AcademicAdmin.java │ ├── TATM.java │ ├── Marker.java │ ├── AssistantAdmin.java │ ├── Instructor.java │ ├── Student.java │ ├── Writer.java │ ├── SystemAdmin.java │ ├── TextAnalyzer.java │ ├── Rubric.java │ ├── ProgrammingTest.java │ ├── Activity.java │ └── Account.java ├── MarkShark.java ├── difflib │ ├── myers │ │ ├── Equalizer.java │ │ ├── package.html │ │ ├── DiffNode.java │ │ ├── DiffException.java │ │ ├── DifferentiationFailedException.java │ │ └── Snake.java │ ├── DeltaComparator.java │ ├── DiffException.java │ ├── PatchFailedException.java │ ├── DiffAlgorithm.java │ ├── InsertDelta.java │ ├── DeleteDelta.java │ ├── Patch.java │ ├── ChangeDelta.java │ ├── StringUtills.java │ ├── package.html │ ├── DiffRow.java │ ├── Delta.java │ └── Chunk.java ├── login │ └── Login.java ├── shell │ ├── Shell.java │ └── ThreadedStreamHandler.java ├── audio │ └── AudioPlayer.java └── database │ ├── Dbaccess.java │ └── GradeAccess.java ├── docs ├── General Questions for next Client Meeting.md ├── clientMeetings │ ├── clientMeeting1Notes.md │ └── clientMeeting1Questions.md ├── Data Persistence.xlsx ├── minutesTemplate.md ├── formalQuestions │ ├── jan 17 meeting.docx │ ├── jam 17 meeting with names.docx │ ├── jam+17+meeting+with+names.docx │ └── formalQuestions.md ├── projectInterpretation │ ├── Chazz interpretation.md │ ├── ColinInterpretation.md │ └── Jordan Interpretation.md ├── meetingMinutes │ ├── 02-07-agenda.md │ ├── 01-27-agenda.md │ ├── 01-13-agenda.md │ ├── 01-20-client-meeting.md │ ├── 01-24-agenda.md │ ├── 01-31-agenda.md │ ├── 03-24-agenda.md │ ├── 03-21-agenda.md │ ├── 03-25-agenda.md │ ├── 02-28-agenda.md │ ├── 01-16-agenda.md │ ├── 02-17-agenda.md │ ├── 03-07-agenda.md │ ├── 01-17-agenda.md │ ├── 03-10-agenda.md │ ├── 03-03-agenda.md │ └── 03-17-agenda.md ├── meetingRecordings.md ├── Priority Meeting ├── styleGuidelines.md ├── roles.md ├── usefulLinks.md └── releasePage.tex ├── .travis.yml ├── images ├── DBDesign.png ├── appModel.jpg ├── ClassDiagram.png ├── UseCaseDiagram.png ├── Data_Persistance.png ├── groupPhotos │ ├── Ian.png │ ├── Chazz.jpg │ ├── Colin.jpg │ ├── Graeme.jpg │ ├── Jordan.jpg │ ├── MarkusB.jpg │ ├── Stephen.jpg │ └── metroid.jpg ├── UIMockups │ ├── Modifycourse │ └── pngs │ │ ├── admin.png │ │ ├── topBar.png │ │ ├── forgotPW.png │ │ ├── sysAdmin.png │ │ ├── LandingPage.png │ │ ├── instructor.png │ │ ├── loginScreen.png │ │ ├── newActivity.png │ │ ├── assistantAdmin.png │ │ ├── createACourse.png │ │ ├── modifyACourse.png │ │ ├── newTACourses.png │ │ ├── selectRestore.png │ │ ├── teachingAsst.png │ │ ├── CourseSelectionM.png │ │ ├── Coursemanagement.png │ │ ├── activityMarking.png │ │ ├── databaseWarning.png │ │ ├── systemManagement.png │ │ ├── ActivitySelectionAM.png │ │ ├── CourseSelectionAM.png │ │ ├── SRS_TestSuite_Split.png │ │ ├── SRS_TestSuite_Tabs.png │ │ ├── accountModification.png │ │ ├── adminassisthomepage.png │ │ ├── databaseManagement.png │ │ ├── newActivityDetailed.png │ │ ├── newActivityRubric.png │ │ ├── Assignmentmanagement.png │ │ ├── modifyActivityExample.png │ │ ├── GroupActivitySelectionM.png │ │ ├── activityMarkingWarning.png │ │ └── StudentActivitySelectionM.png ├── architectureDiagram.png ├── logo │ ├── markshark-10x.png │ ├── markshark-1x.png │ ├── markshark-3x.png │ └── markshark-5x.png ├── EquivalenceClass_LAN.png ├── EquivalenceClass_SQL.png ├── Class_Diagram_Detailed.png ├── EquivalenceClass_Server.png ├── UpdatedUIScreens │ ├── login.png │ ├── TestSuite.png │ ├── landingTA.png │ ├── CreateCourse.png │ ├── MarkingCode.png │ ├── MarkingPDF.png │ ├── coursemodify.png │ ├── forgetpass.png │ ├── landingadmin.png │ ├── ChangePassword.png │ ├── CreateAccount.png │ ├── RubricCreation.png │ ├── activitymodify.png │ ├── landingassist.png │ ├── ActivityCreation.png │ ├── ActivitySelection.png │ ├── CourseManagement.png │ ├── CourseSelection.png │ ├── landinginstructor.png │ ├── landingsysadmin.png │ ├── ActivityManagement.png │ ├── DatabaseManagement.png │ ├── wrongpasswordscreen.png │ ├── selectstudentactivity.png │ └── MarkingActivitySelection.png ├── UseCaseDiagram_Screens.png ├── Whitebox_Testing_Diagram.png └── designDocImages │ ├── sequenceDiag.png │ └── Collaboration_Diagram_Use_Case.png ├── manifest.mf ├── .gitignore ├── nbproject ├── project.xml ├── genfiles.properties └── project.properties ├── README.md └── dist └── README.TXT /final/bin/placeholder.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /final/dat/placeholder.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /final/lib/placeholder.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /final/misc/placeholder.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/gui/utils/ActivityTestSolution: -------------------------------------------------------------------------------- 1 | SOLUTION -------------------------------------------------------------------------------- /src/files/CMPT120/Activity 1/placeholder.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/gui/utils/ActivityTestSubmission: -------------------------------------------------------------------------------- 1 | SUBMISSION -------------------------------------------------------------------------------- /docs/General Questions for next Client Meeting.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: java 2 | jdk: 3 | - oraclejdk8 4 | -------------------------------------------------------------------------------- /src/jaws.mid: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Donnervoegel/java/HEAD/src/jaws.mid -------------------------------------------------------------------------------- /images/DBDesign.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Donnervoegel/java/HEAD/images/DBDesign.png -------------------------------------------------------------------------------- /images/appModel.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Donnervoegel/java/HEAD/images/appModel.jpg -------------------------------------------------------------------------------- /src/lib/batik-dom.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Donnervoegel/java/HEAD/src/lib/batik-dom.jar -------------------------------------------------------------------------------- /src/lib/batik-util.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Donnervoegel/java/HEAD/src/lib/batik-util.jar -------------------------------------------------------------------------------- /src/lib/batik-xml.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Donnervoegel/java/HEAD/src/lib/batik-xml.jar -------------------------------------------------------------------------------- /docs/clientMeetings/clientMeeting1Notes.md: -------------------------------------------------------------------------------- 1 | ### Post the general interpretations of your notes below: -------------------------------------------------------------------------------- /images/ClassDiagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Donnervoegel/java/HEAD/images/ClassDiagram.png -------------------------------------------------------------------------------- /images/UseCaseDiagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Donnervoegel/java/HEAD/images/UseCaseDiagram.png -------------------------------------------------------------------------------- /src/gui/markshark-1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Donnervoegel/java/HEAD/src/gui/markshark-1x.png -------------------------------------------------------------------------------- /src/gui/markshark-3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Donnervoegel/java/HEAD/src/gui/markshark-3x.png -------------------------------------------------------------------------------- /src/gui/markshark-5x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Donnervoegel/java/HEAD/src/gui/markshark-5x.png -------------------------------------------------------------------------------- /src/gui/utils/StudentList: -------------------------------------------------------------------------------- 1 | Jordan Toering, 1238923 2 | Graeme Smith, 3948234 3 | Chazz Young, 3948585 -------------------------------------------------------------------------------- /src/lib/batik-svg-dom.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Donnervoegel/java/HEAD/src/lib/batik-svg-dom.jar -------------------------------------------------------------------------------- /src/lib/batik-svggen.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Donnervoegel/java/HEAD/src/lib/batik-svggen.jar -------------------------------------------------------------------------------- /src/lib/icepdf-core.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Donnervoegel/java/HEAD/src/lib/icepdf-core.jar -------------------------------------------------------------------------------- /src/lib/icepdf-viewer.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Donnervoegel/java/HEAD/src/lib/icepdf-viewer.jar -------------------------------------------------------------------------------- /docs/Data Persistence.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Donnervoegel/java/HEAD/docs/Data Persistence.xlsx -------------------------------------------------------------------------------- /images/Data_Persistance.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Donnervoegel/java/HEAD/images/Data_Persistance.png -------------------------------------------------------------------------------- /images/groupPhotos/Ian.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Donnervoegel/java/HEAD/images/groupPhotos/Ian.png -------------------------------------------------------------------------------- /manifest.mf: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | X-COMMENT: Main-Class will be added automatically by build 3 | 4 | -------------------------------------------------------------------------------- /src/lib/batik-awt-util.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Donnervoegel/java/HEAD/src/lib/batik-awt-util.jar -------------------------------------------------------------------------------- /images/UIMockups/Modifycourse: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Donnervoegel/java/HEAD/images/UIMockups/Modifycourse -------------------------------------------------------------------------------- /images/architectureDiagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Donnervoegel/java/HEAD/images/architectureDiagram.png -------------------------------------------------------------------------------- /images/groupPhotos/Chazz.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Donnervoegel/java/HEAD/images/groupPhotos/Chazz.jpg -------------------------------------------------------------------------------- /images/groupPhotos/Colin.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Donnervoegel/java/HEAD/images/groupPhotos/Colin.jpg -------------------------------------------------------------------------------- /images/groupPhotos/Graeme.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Donnervoegel/java/HEAD/images/groupPhotos/Graeme.jpg -------------------------------------------------------------------------------- /images/groupPhotos/Jordan.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Donnervoegel/java/HEAD/images/groupPhotos/Jordan.jpg -------------------------------------------------------------------------------- /images/groupPhotos/MarkusB.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Donnervoegel/java/HEAD/images/groupPhotos/MarkusB.jpg -------------------------------------------------------------------------------- /images/groupPhotos/Stephen.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Donnervoegel/java/HEAD/images/groupPhotos/Stephen.jpg -------------------------------------------------------------------------------- /images/groupPhotos/metroid.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Donnervoegel/java/HEAD/images/groupPhotos/metroid.jpg -------------------------------------------------------------------------------- /images/logo/markshark-10x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Donnervoegel/java/HEAD/images/logo/markshark-10x.png -------------------------------------------------------------------------------- /images/logo/markshark-1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Donnervoegel/java/HEAD/images/logo/markshark-1x.png -------------------------------------------------------------------------------- /images/logo/markshark-3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Donnervoegel/java/HEAD/images/logo/markshark-3x.png -------------------------------------------------------------------------------- /images/logo/markshark-5x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Donnervoegel/java/HEAD/images/logo/markshark-5x.png -------------------------------------------------------------------------------- /src/gui/markshark-5x-eyes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Donnervoegel/java/HEAD/src/gui/markshark-5x-eyes.png -------------------------------------------------------------------------------- /docs/minutesTemplate.md: -------------------------------------------------------------------------------- 1 | # Meeting Agenda 2 | ## DATE HERE, 2014 3 | #### Room: ROOM HERE 4 | 5 | ### Attendance 6 | -------------------------------------------------------------------------------- /images/EquivalenceClass_LAN.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Donnervoegel/java/HEAD/images/EquivalenceClass_LAN.png -------------------------------------------------------------------------------- /images/EquivalenceClass_SQL.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Donnervoegel/java/HEAD/images/EquivalenceClass_SQL.png -------------------------------------------------------------------------------- /images/UIMockups/pngs/admin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Donnervoegel/java/HEAD/images/UIMockups/pngs/admin.png -------------------------------------------------------------------------------- /images/UIMockups/pngs/topBar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Donnervoegel/java/HEAD/images/UIMockups/pngs/topBar.png -------------------------------------------------------------------------------- /images/Class_Diagram_Detailed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Donnervoegel/java/HEAD/images/Class_Diagram_Detailed.png -------------------------------------------------------------------------------- /images/EquivalenceClass_Server.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Donnervoegel/java/HEAD/images/EquivalenceClass_Server.png -------------------------------------------------------------------------------- /images/UIMockups/pngs/forgotPW.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Donnervoegel/java/HEAD/images/UIMockups/pngs/forgotPW.png -------------------------------------------------------------------------------- /images/UIMockups/pngs/sysAdmin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Donnervoegel/java/HEAD/images/UIMockups/pngs/sysAdmin.png -------------------------------------------------------------------------------- /images/UpdatedUIScreens/login.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Donnervoegel/java/HEAD/images/UpdatedUIScreens/login.png -------------------------------------------------------------------------------- /images/UseCaseDiagram_Screens.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Donnervoegel/java/HEAD/images/UseCaseDiagram_Screens.png -------------------------------------------------------------------------------- /images/Whitebox_Testing_Diagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Donnervoegel/java/HEAD/images/Whitebox_Testing_Diagram.png -------------------------------------------------------------------------------- /images/UIMockups/pngs/LandingPage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Donnervoegel/java/HEAD/images/UIMockups/pngs/LandingPage.png -------------------------------------------------------------------------------- /images/UIMockups/pngs/instructor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Donnervoegel/java/HEAD/images/UIMockups/pngs/instructor.png -------------------------------------------------------------------------------- /images/UIMockups/pngs/loginScreen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Donnervoegel/java/HEAD/images/UIMockups/pngs/loginScreen.png -------------------------------------------------------------------------------- /images/UIMockups/pngs/newActivity.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Donnervoegel/java/HEAD/images/UIMockups/pngs/newActivity.png -------------------------------------------------------------------------------- /images/UpdatedUIScreens/TestSuite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Donnervoegel/java/HEAD/images/UpdatedUIScreens/TestSuite.png -------------------------------------------------------------------------------- /images/UpdatedUIScreens/landingTA.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Donnervoegel/java/HEAD/images/UpdatedUIScreens/landingTA.png -------------------------------------------------------------------------------- /docs/formalQuestions/jan 17 meeting.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Donnervoegel/java/HEAD/docs/formalQuestions/jan 17 meeting.docx -------------------------------------------------------------------------------- /images/UIMockups/pngs/assistantAdmin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Donnervoegel/java/HEAD/images/UIMockups/pngs/assistantAdmin.png -------------------------------------------------------------------------------- /images/UIMockups/pngs/createACourse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Donnervoegel/java/HEAD/images/UIMockups/pngs/createACourse.png -------------------------------------------------------------------------------- /images/UIMockups/pngs/modifyACourse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Donnervoegel/java/HEAD/images/UIMockups/pngs/modifyACourse.png -------------------------------------------------------------------------------- /images/UIMockups/pngs/newTACourses.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Donnervoegel/java/HEAD/images/UIMockups/pngs/newTACourses.png -------------------------------------------------------------------------------- /images/UIMockups/pngs/selectRestore.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Donnervoegel/java/HEAD/images/UIMockups/pngs/selectRestore.png -------------------------------------------------------------------------------- /images/UIMockups/pngs/teachingAsst.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Donnervoegel/java/HEAD/images/UIMockups/pngs/teachingAsst.png -------------------------------------------------------------------------------- /images/UpdatedUIScreens/CreateCourse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Donnervoegel/java/HEAD/images/UpdatedUIScreens/CreateCourse.png -------------------------------------------------------------------------------- /images/UpdatedUIScreens/MarkingCode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Donnervoegel/java/HEAD/images/UpdatedUIScreens/MarkingCode.png -------------------------------------------------------------------------------- /images/UpdatedUIScreens/MarkingPDF.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Donnervoegel/java/HEAD/images/UpdatedUIScreens/MarkingPDF.png -------------------------------------------------------------------------------- /images/UpdatedUIScreens/coursemodify.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Donnervoegel/java/HEAD/images/UpdatedUIScreens/coursemodify.png -------------------------------------------------------------------------------- /images/UpdatedUIScreens/forgetpass.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Donnervoegel/java/HEAD/images/UpdatedUIScreens/forgetpass.png -------------------------------------------------------------------------------- /images/UpdatedUIScreens/landingadmin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Donnervoegel/java/HEAD/images/UpdatedUIScreens/landingadmin.png -------------------------------------------------------------------------------- /images/designDocImages/sequenceDiag.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Donnervoegel/java/HEAD/images/designDocImages/sequenceDiag.png -------------------------------------------------------------------------------- /images/UIMockups/pngs/CourseSelectionM.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Donnervoegel/java/HEAD/images/UIMockups/pngs/CourseSelectionM.png -------------------------------------------------------------------------------- /images/UIMockups/pngs/Coursemanagement.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Donnervoegel/java/HEAD/images/UIMockups/pngs/Coursemanagement.png -------------------------------------------------------------------------------- /images/UIMockups/pngs/activityMarking.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Donnervoegel/java/HEAD/images/UIMockups/pngs/activityMarking.png -------------------------------------------------------------------------------- /images/UIMockups/pngs/databaseWarning.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Donnervoegel/java/HEAD/images/UIMockups/pngs/databaseWarning.png -------------------------------------------------------------------------------- /images/UIMockups/pngs/systemManagement.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Donnervoegel/java/HEAD/images/UIMockups/pngs/systemManagement.png -------------------------------------------------------------------------------- /images/UpdatedUIScreens/ChangePassword.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Donnervoegel/java/HEAD/images/UpdatedUIScreens/ChangePassword.png -------------------------------------------------------------------------------- /images/UpdatedUIScreens/CreateAccount.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Donnervoegel/java/HEAD/images/UpdatedUIScreens/CreateAccount.png -------------------------------------------------------------------------------- /images/UpdatedUIScreens/RubricCreation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Donnervoegel/java/HEAD/images/UpdatedUIScreens/RubricCreation.png -------------------------------------------------------------------------------- /images/UpdatedUIScreens/activitymodify.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Donnervoegel/java/HEAD/images/UpdatedUIScreens/activitymodify.png -------------------------------------------------------------------------------- /images/UpdatedUIScreens/landingassist.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Donnervoegel/java/HEAD/images/UpdatedUIScreens/landingassist.png -------------------------------------------------------------------------------- /images/UIMockups/pngs/ActivitySelectionAM.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Donnervoegel/java/HEAD/images/UIMockups/pngs/ActivitySelectionAM.png -------------------------------------------------------------------------------- /images/UIMockups/pngs/CourseSelectionAM.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Donnervoegel/java/HEAD/images/UIMockups/pngs/CourseSelectionAM.png -------------------------------------------------------------------------------- /images/UIMockups/pngs/SRS_TestSuite_Split.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Donnervoegel/java/HEAD/images/UIMockups/pngs/SRS_TestSuite_Split.png -------------------------------------------------------------------------------- /images/UIMockups/pngs/SRS_TestSuite_Tabs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Donnervoegel/java/HEAD/images/UIMockups/pngs/SRS_TestSuite_Tabs.png -------------------------------------------------------------------------------- /images/UIMockups/pngs/accountModification.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Donnervoegel/java/HEAD/images/UIMockups/pngs/accountModification.png -------------------------------------------------------------------------------- /images/UIMockups/pngs/adminassisthomepage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Donnervoegel/java/HEAD/images/UIMockups/pngs/adminassisthomepage.png -------------------------------------------------------------------------------- /images/UIMockups/pngs/databaseManagement.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Donnervoegel/java/HEAD/images/UIMockups/pngs/databaseManagement.png -------------------------------------------------------------------------------- /images/UIMockups/pngs/newActivityDetailed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Donnervoegel/java/HEAD/images/UIMockups/pngs/newActivityDetailed.png -------------------------------------------------------------------------------- /images/UIMockups/pngs/newActivityRubric.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Donnervoegel/java/HEAD/images/UIMockups/pngs/newActivityRubric.png -------------------------------------------------------------------------------- /images/UpdatedUIScreens/ActivityCreation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Donnervoegel/java/HEAD/images/UpdatedUIScreens/ActivityCreation.png -------------------------------------------------------------------------------- /images/UpdatedUIScreens/ActivitySelection.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Donnervoegel/java/HEAD/images/UpdatedUIScreens/ActivitySelection.png -------------------------------------------------------------------------------- /images/UpdatedUIScreens/CourseManagement.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Donnervoegel/java/HEAD/images/UpdatedUIScreens/CourseManagement.png -------------------------------------------------------------------------------- /images/UpdatedUIScreens/CourseSelection.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Donnervoegel/java/HEAD/images/UpdatedUIScreens/CourseSelection.png -------------------------------------------------------------------------------- /images/UpdatedUIScreens/landinginstructor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Donnervoegel/java/HEAD/images/UpdatedUIScreens/landinginstructor.png -------------------------------------------------------------------------------- /images/UpdatedUIScreens/landingsysadmin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Donnervoegel/java/HEAD/images/UpdatedUIScreens/landingsysadmin.png -------------------------------------------------------------------------------- /images/UIMockups/pngs/Assignmentmanagement.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Donnervoegel/java/HEAD/images/UIMockups/pngs/Assignmentmanagement.png -------------------------------------------------------------------------------- /images/UIMockups/pngs/modifyActivityExample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Donnervoegel/java/HEAD/images/UIMockups/pngs/modifyActivityExample.png -------------------------------------------------------------------------------- /images/UpdatedUIScreens/ActivityManagement.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Donnervoegel/java/HEAD/images/UpdatedUIScreens/ActivityManagement.png -------------------------------------------------------------------------------- /images/UpdatedUIScreens/DatabaseManagement.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Donnervoegel/java/HEAD/images/UpdatedUIScreens/DatabaseManagement.png -------------------------------------------------------------------------------- /images/UpdatedUIScreens/wrongpasswordscreen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Donnervoegel/java/HEAD/images/UpdatedUIScreens/wrongpasswordscreen.png -------------------------------------------------------------------------------- /docs/projectInterpretation/Chazz interpretation.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Donnervoegel/java/HEAD/docs/projectInterpretation/Chazz interpretation.md -------------------------------------------------------------------------------- /images/UIMockups/pngs/GroupActivitySelectionM.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Donnervoegel/java/HEAD/images/UIMockups/pngs/GroupActivitySelectionM.png -------------------------------------------------------------------------------- /images/UIMockups/pngs/activityMarkingWarning.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Donnervoegel/java/HEAD/images/UIMockups/pngs/activityMarkingWarning.png -------------------------------------------------------------------------------- /images/UpdatedUIScreens/selectstudentactivity.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Donnervoegel/java/HEAD/images/UpdatedUIScreens/selectstudentactivity.png -------------------------------------------------------------------------------- /docs/formalQuestions/jam 17 meeting with names.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Donnervoegel/java/HEAD/docs/formalQuestions/jam 17 meeting with names.docx -------------------------------------------------------------------------------- /docs/formalQuestions/jam+17+meeting+with+names.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Donnervoegel/java/HEAD/docs/formalQuestions/jam+17+meeting+with+names.docx -------------------------------------------------------------------------------- /images/UIMockups/pngs/StudentActivitySelectionM.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Donnervoegel/java/HEAD/images/UIMockups/pngs/StudentActivitySelectionM.png -------------------------------------------------------------------------------- /images/UpdatedUIScreens/MarkingActivitySelection.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Donnervoegel/java/HEAD/images/UpdatedUIScreens/MarkingActivitySelection.png -------------------------------------------------------------------------------- /images/designDocImages/Collaboration_Diagram_Use_Case.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Donnervoegel/java/HEAD/images/designDocImages/Collaboration_Diagram_Use_Case.png -------------------------------------------------------------------------------- /docs/meetingMinutes/02-07-agenda.md: -------------------------------------------------------------------------------- 1 | # Meeting Agenda 2 | ## February 7, 2014 3 | #### Room: Meet in front of dining hall 4 | 5 | ### Attendance 6 | 7 | ### Agenda 8 | 9 | ### Minutes 10 | - -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.aux 2 | *.log 3 | *.toc 4 | *.pdf 5 | *.gz 6 | *.*~ 7 | *.class 8 | /nbproject/private/ 9 | /build/ 10 | /src/nbproject/private 11 | /dist/ 12 | /bin 13 | *.bak 14 | 15 | *.properties 16 | -------------------------------------------------------------------------------- /docs/meetingRecordings.md: -------------------------------------------------------------------------------- 1 | Jan 17 meeting part 1 2 | https://www.dropbox.com/s/29oe4cl5cqqksmw/Jan%2017%20meeting%20part1.wav 3 | 4 | Jan 17 meetign part 2 5 | https://www.dropbox.com/s/kxhyukb14t004he/Jan%2017%20meeting%20part2.wav 6 | 7 | Jan 20 requirements meeting 8 | https://www.dropbox.com/s/iae6pp2jfb30e2u/Jan%2020%20requirements%20meeting.wav -------------------------------------------------------------------------------- /src/types/AcademicAdmin.java: -------------------------------------------------------------------------------- 1 | package types; 2 | 3 | /** 4 | * @author: Chazz 5 | */ 6 | public class AcademicAdmin extends Marker 7 | { 8 | 9 | 10 | public AcademicAdmin(String fn, String ln, int empID, String un, String pass) 11 | 12 | { 13 | super(fn, ln, empID, un, pass, Type.ACADEMICADMIN); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /docs/meetingMinutes/01-27-agenda.md: -------------------------------------------------------------------------------- 1 | # Meeting Agenda 2 | ## January 27, 2014 3 | #### Room: Meet in front of dining hall 4 | 5 | ### Attendance 6 | - ALL 7 | 8 | ### Agenda 9 | - Review Project Specifications Document 10 | 11 | ### Minutes 12 | - Members should finalize their contributions and acquire development environment for LaTeX. 13 | - Next meeting booked for this coming Friday, January 31. 14 | -------------------------------------------------------------------------------- /src/MarkShark.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This should be the only .java file on this level. 3 | */ 4 | 5 | import gui.MarkSharkGUI; 6 | 7 | /** 8 | * @author: Colin 9 | */ 10 | public class MarkShark { 11 | public static void main(String doesnt_matter[]) { 12 | MarkSharkGUI gui = new MarkSharkGUI(); 13 | 14 | System.out.println("Starting GUI..."); 15 | gui.startGUI(); 16 | System.out.println("Operation Complete."); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/types/TATM.java: -------------------------------------------------------------------------------- 1 | package types; 2 | 3 | 4 | /** 5 | * @desc: The TATM class is used to model the TA/TM Marker account. 6 | * 7 | * @author (Chazz Young (0.0) 8 | * @version 0.0 - 03/16/2014 --getters/setters 9 | */ 10 | public class TATM extends Marker 11 | { 12 | 13 | public TATM(String fn, String ln, int empID, String un, String pass) 14 | 15 | { 16 | super(fn, ln, empID, un, pass, Type.TATMMARKER); 17 | } 18 | 19 | 20 | } 21 | -------------------------------------------------------------------------------- /nbproject/project.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | org.netbeans.modules.java.j2seproject 4 | 5 | 6 | MarkShark 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /nbproject/genfiles.properties: -------------------------------------------------------------------------------- 1 | build.xml.data.CRC32=2ba0e997 2 | build.xml.script.CRC32=1d72cd23 3 | build.xml.stylesheet.CRC32=8064a381@1.74.1.48 4 | # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. 5 | # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. 6 | nbproject/build-impl.xml.data.CRC32=2ba0e997 7 | nbproject/build-impl.xml.script.CRC32=ceaf8eb8 8 | nbproject/build-impl.xml.stylesheet.CRC32=876e7a8f@1.74.1.48 9 | -------------------------------------------------------------------------------- /src/types/Marker.java: -------------------------------------------------------------------------------- 1 | package types; 2 | 3 | 4 | /** 5 | * @The Marker class is used to simulate the Marker account. It is abstract to give all privileges 6 | * to each type of account that is a subclass of Marker. 7 | * 8 | * @author (Chazz Young 9 | */ 10 | public abstract class Marker extends Account 11 | { 12 | 13 | public Marker(String fn, String ln, int empID, String un, String pass, Type type) 14 | 15 | { 16 | super(fn, ln, empID, un, pass, type); 17 | } 18 | 19 | 20 | } 21 | -------------------------------------------------------------------------------- /docs/meetingMinutes/01-13-agenda.md: -------------------------------------------------------------------------------- 1 | # Meeting Agenda 2 | ## January 13, 2014 3 | #### Room: 5046 4 | 5 | ### Attendance 6 | - Jordan 7 | - Colin 8 | - Chazz 9 | - Graeme 10 | - Ian 11 | - Markus 12 | - Stephen 13 | 14 | Are we OK with the name? Yes 15 | 16 | Jordan taking the minutes of the meeting every meeting. 17 | 18 | Microphone for the meeting. Primary: Chazz, Secondary: Jordan 19 | 20 | New room for next time? 21 | 22 | Colin will be adding the questions in bold to below the points of the original documents. 23 | 24 | 25 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Donnervögel Consulting 2 | ====================== 3 | ## Products 4 | ![MarkShark Grading System](/images/logo/markshark-3x.png)[![Build Status](https://travis-ci.org/Donnervoegel/java.svg?branch=master)](https://travis-ci.org/Donnervoegel/java) 5 | 6 | ## Members 7 | Colin Woodbury 8 | 9 | 10 | Jordan Toering 11 | 12 | 13 | Chazz Young 14 | 15 | 16 | Ian Pun 17 | 18 | 19 | Stephen Laboucane 20 | 21 | 22 | Graeme Smith 23 | 24 | -------------------------------------------------------------------------------- /docs/Priority Meeting: -------------------------------------------------------------------------------- 1 | Some simplifications to speed up the prototype: 2 | 3 | Testing Suite 4 | One language, Python. 5 | Assume only 1 test, and that test has only one (set?) of input(s). The output is also trivial. 6 | 7 | Essays and Math can be rolled into one Activity type. 8 | 9 | Need Create/Modify/Delete, but copy can wait. 10 | 11 | A broad system-wide backup and restore. 12 | 13 | No groups for Activities, so that UI can wait. 14 | 15 | Similarly, all TA/TMs are assigned to all students in the course (as is the default). 16 | 17 | The database was brought up, but not discussed. 18 | -------------------------------------------------------------------------------- /src/difflib/myers/Equalizer.java: -------------------------------------------------------------------------------- 1 | package difflib.myers; 2 | 3 | /** 4 | * Specifies when two compared elements in the Myers algorithm are equal. 5 | * 6 | * @param T The type of the compared elements in the 'lines'. 7 | */ 8 | public interface Equalizer { 9 | 10 | /** 11 | * Indicates if two elements are equal according to the diff mechanism. 12 | * @param original The original element. Must not be {@code null}. 13 | * @param revised The revised element. Must not be {@code null}. 14 | * @return Returns true if the elements are equal. 15 | */ 16 | public boolean equals(T original, T revised); 17 | } 18 | -------------------------------------------------------------------------------- /docs/meetingMinutes/01-20-client-meeting.md: -------------------------------------------------------------------------------- 1 | # Meeting Agenda 2 | ## January 20, 2014 3 | #### Room: TASC 9204E 4 | #### Time: 2:45-3:45 5 | 6 | ### Attendance 7 | - ALL 8 | 9 | ### Agenda 10 | - Set up recording device 11 | - Have each member present their sections of the questions to the client 12 | - Listen to the client's requests 13 | - If extra time, get more detail and pose our idea of the accounts system to the client 14 | 15 | ### Minutes 16 | - Microphone successfully set up and recording. 17 | - Each member presented their section and receive clarification when necessary. 18 | - Transcription of recorded meeting was assigned to Graeme and Markus. 19 | -------------------------------------------------------------------------------- /docs/meetingMinutes/01-24-agenda.md: -------------------------------------------------------------------------------- 1 | # Meeting Agenda 2 | ## January 24, 2014 3 | #### Room: 2007 Library 4 | 5 | ### Attendance 6 | - All members 7 | 8 | ### Agenda 9 | - Review of Client Meeting Transcript 10 | - LaTeX 11 | - Start Requirements Spec. (due Tuesday) 12 | 13 | ### Minutes 14 | - ASAP Push a picture of yourself into the member images folder 15 | - Went over transcribed client meeting 16 | - Created and color coded rough specifications 17 | - Email CS office about booking a room for further group meetings. 18 | - Colin creating template for the deliverable, content can be added to the git section. 19 | - Added google doc to the links section 20 | -------------------------------------------------------------------------------- /src/types/AssistantAdmin.java: -------------------------------------------------------------------------------- 1 | package types; 2 | 3 | 4 | /** 5 | * @desc: The AssistantAdmin class is used to model the Academic Admin Assistant account. 6 | * 7 | * @author Chazz Young 8 | */ 9 | public class AssistantAdmin extends Account 10 | { 11 | 12 | public AssistantAdmin(String fn, String ln, int empID, String un, String pass) 13 | 14 | { 15 | super(fn, ln, empID, un, pass, Type.ASSISTANTADMIN); 16 | } 17 | 18 | public void createCourse(String name, String id, Instructor inst, String start, String end) 19 | { 20 | Course c = new Course(name, id, inst, start, end); 21 | inst.addCourse(c); 22 | } 23 | } -------------------------------------------------------------------------------- /docs/meetingMinutes/01-31-agenda.md: -------------------------------------------------------------------------------- 1 | # Meeting Agenda 2 | ## January 31, 2014 3 | #### Room: Meet in front of dining hall 4 | 5 | ### Attendance 6 | 7 | - All except Graeme. He informed the group of his absence beforehand and made plans to have the information available to him. 8 | 9 | ### Agenda 10 | - Prepare for Feb. 3 client meeting 11 | - Finalize roles for Feb 3 client meeting 12 | - Start latex document for first deliverable. 13 | 14 | ### Minutes 15 | - Group members read the requirements for the client review meeting. 16 | - Created google doc for planning 17 | - Markus created skeleton for next deliverable 18 | - Group is going to port the google doc to markdown for viewing on Git -------------------------------------------------------------------------------- /docs/meetingMinutes/03-24-agenda.md: -------------------------------------------------------------------------------- 1 | # Meeting Agenda 2 | ## Mar 24, 2014 3 | #### Room: Shell House Recreation Room 4 | 5 | ### Attendance 6 | - Ian Pun 7 | - Chazz Young 8 | - Jordan Toering 9 | - Graeme Smith 10 | - Markus Balaski 11 | - Colin Woodbury 12 | - Stephen Laboucane 13 | 14 | ### Agenda 15 | - Get synced with the current repo (5 minutes) 16 | - Assign roles for next client demo (upwards of 40 minutes) 17 | - Read over deliverable 8 (10 minutes) 18 | - Assign roles for deliverable 8 (5 minutes) 19 | 20 | ### Minutes 21 | - Members synced with the repo 22 | - Git Issues will be created for tasks from now on 23 | - Another meeting will happen tomorrow after the demonstration (in a vacant space in the ASB) -------------------------------------------------------------------------------- /docs/meetingMinutes/03-21-agenda.md: -------------------------------------------------------------------------------- 1 | # Meeting Agenda 2 | ## Mar 21, 2014 3 | #### Room: ASB Atrium Circular Table 4 | 5 | ### Attendance 6 | - Ian Pun 7 | - Chazz Young 8 | - Jordan Toering 9 | - Graeme Smith 10 | - Markus Balaski 11 | - Colin Woodbury 12 | - Stephen Laboucane 13 | 14 | ### Agenda 15 | - Assess the requirements for first demonstration meeting 16 | - Flesh out teams for front end and back end 17 | - Assign roles for the weekend 18 | 19 | 20 | ### Minutes 21 | - Addressed marking inconsistencies 22 | - Assigned teams: (Front End: Jordan, Ian, Graeme. Back End: Chazz, Steven, Markus. Lead: Colin) 23 | - Created overall plan of action for the weekend 24 | - Decided to use the Javabuilders SWING repo as reference -------------------------------------------------------------------------------- /src/types/Instructor.java: -------------------------------------------------------------------------------- 1 | package types; 2 | 3 | import java.util.*; 4 | /** 5 | * @desc: The Instructor class is used to model the Instructor account. 6 | * 7 | * @author Chazz 8 | */ 9 | public class Instructor extends Marker 10 | { 11 | private ArrayList courses; 12 | 13 | 14 | public Instructor(String fn, String ln, int empID, String un, String pass) 15 | 16 | { 17 | super(fn, ln, empID, un, pass, Type.INSTRUCTOR); 18 | courses = new ArrayList(); 19 | } 20 | 21 | public void addCourse(Course c) 22 | { 23 | courses.add(c); 24 | } 25 | 26 | public void addRubricToActivty(Activity a, String path) 27 | { 28 | 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /docs/meetingMinutes/03-25-agenda.md: -------------------------------------------------------------------------------- 1 | # Meeting Agenda 2 | ## Mar 25, 2014 3 | #### Room: ASB Atrium 4 | 5 | ### Attendance 6 | - Ian Pun 7 | - Chazz Young 8 | - Jordan Toering 9 | - Graeme Smith 10 | - Markus Balaski 11 | - Colin Woodbury 12 | - Stephen Laboucane 13 | 14 | ### Agenda 15 | - Talk about the client iteration review 16 | - Assign roles and work flow for upcoming week 17 | 18 | ### Minutes 19 | - We should use issues for all further issue checking 20 | - Steven is assigned to the next deliverable. Spaces will be left on revision history for members to add their names. Deliverable should be fully complete one hour before the deadline. 21 | - Rest of team will work on the code and preparing for the next iteration meeting(next tuesday) -------------------------------------------------------------------------------- /docs/meetingMinutes/02-28-agenda.md: -------------------------------------------------------------------------------- 1 | # Meeting Agenda 2 | ## Feb 28, 2014 3 | #### Room: Shell House Recreation 4 4 | 5 | ### Attendance 6 | - Colin Woodbury 7 | - Jordan Toering 8 | - Ian Pun 9 | - Chazz Young 10 | - Markus Balasaki 11 | - Stephen Laboucane 12 | - Graeme Smith 13 | 14 | ### Agenda 15 | - Read description of next deliverable (10 minutes) 16 | - Clarify and discuss next deliverable (20 minutes) 17 | - Assign roles for the weekend and next meeting (10 minutes) 18 | 19 | ### Minutes 20 | - Created LaTeX template for next deliverable (5 minutes) 21 | - Group decided to use Pencil for UI mockups(5 minutes) 22 | - Group members should create and commit pencil source file mockups (complete by Sunday Night 11:59pm) 23 | - Chazz is doing Quick Reference Section 24 | - Markus is doing the Project Overview -------------------------------------------------------------------------------- /src/types/Student.java: -------------------------------------------------------------------------------- 1 | package types; 2 | 3 | 4 | /** 5 | * Write a description of class Student here. 6 | * 7 | * @author Chazz 8 | */ 9 | public class Student 10 | { 11 | // instance variables - replace the example below with your own 12 | private int x; 13 | 14 | /** 15 | * Constructor for objects of class Student 16 | */ 17 | public Student() 18 | { 19 | // initialise instance variables 20 | x = 0; 21 | } 22 | 23 | /** 24 | * An example of a method - replace this comment with your own 25 | * 26 | * @param y a sample parameter for a method 27 | * @return the sum of x and y 28 | */ 29 | public int sampleMethod(int y) 30 | { 31 | // put your code here 32 | return x + y; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/difflib/DeltaComparator.java: -------------------------------------------------------------------------------- 1 | package difflib; 2 | 3 | import java.io.Serializable; 4 | import java.util.Comparator; 5 | 6 | /** 7 | * @author mksenzov 8 | * @param T The type of the compared elements in the 'lines'. 9 | */ 10 | public class DeltaComparator implements Comparator>, Serializable { 11 | private static final long serialVersionUID = 1L; 12 | public static final Comparator> INSTANCE = new DeltaComparator(); 13 | 14 | private DeltaComparator() { 15 | } 16 | 17 | public int compare(final Delta a, final Delta b) { 18 | final int posA = a.getOriginal().getPosition(); 19 | final int posB = b.getOriginal().getPosition(); 20 | if (posA > posB) { 21 | return 1; 22 | } else if (posA < posB) { 23 | return -1; 24 | } 25 | return 0; 26 | } 27 | } -------------------------------------------------------------------------------- /src/types/Writer.java: -------------------------------------------------------------------------------- 1 | package types; 2 | 3 | import java.util.*; 4 | import java.io.*; 5 | /** 6 | * This class converts a .txt file to an ArrayList 7 | * This class is based on the program given at the following website: 8 | * http://stackoverflow.com/questions/2885173/java-how-to-create-and-write-to-a-file\ 9 | * @author: Chazz Young 10 | */ 11 | public class Writer { 12 | public void write(ArrayList outputs, String path, String name) { 13 | try { 14 | File file = new File(path + name + ".txt"); 15 | BufferedWriter output = new BufferedWriter(new FileWriter(file)); 16 | for(String s : outputs){ 17 | output.write(s); 18 | output.newLine(); 19 | } 20 | 21 | output.close(); 22 | } catch ( IOException e ) { 23 | e.printStackTrace(); 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /docs/meetingMinutes/01-16-agenda.md: -------------------------------------------------------------------------------- 1 | # Meeting Agenda 2 | ## January 16, 2014 3 | #### Room: Improved, in-class 4 | 5 | ### Attendance 6 | - ALL 7 | 8 | ### Topics 9 | - How do we feel about the formal roles? 10 | 11 | - Hopefully we can continue with the informal rules we've been using so far. 12 | 13 | - Put your interpretations into the proper github folder. 14 | 15 | - Push the GitHub to the official subversion repository every week to allow faculty to see our work. 16 | 17 | - Not necessary to email the minutes as they are present in the GitHub repository in the correct area. 18 | 19 | ### Agenda 20 | 21 | - Go over our acceptance of formal roles. 22 | - Prep for the meetng tomorrow. 23 | 24 | #### Roles 25 | 26 | - Communications: Markus 27 | 28 | - Configuration: Colin 29 | 30 | - Configuration 2: Chazz 31 | 32 | - Meeting Manager: Ian 33 | 34 | - Meeting Manager 2: Graeme 35 | 36 | - Mintues 1: Jordan 37 | 38 | - Minutes 2: Stephen -------------------------------------------------------------------------------- /docs/meetingMinutes/02-17-agenda.md: -------------------------------------------------------------------------------- 1 | # Meeting Agenda 2 | ## Feb 17, 2014 3 | #### Room: Residence Common Room 4 | 5 | ### Attendance 6 | - Jordan Toering 7 | - Colin Woodbury 8 | - Graeme Smith 9 | - Ian Pun 10 | - Stephen Laboucane 11 | - Chazz Young 12 | 13 | ### Agenda 14 | - Discuss last deliverable marks (15 mins) 15 | - Discuss next deliverable (55 mins) 16 | 17 | ### Minutes 18 | - Discussed last deliverable for the allotted time 19 | - Configuration Manager 1 troubleshot some issues to do with github 20 | - Group members should revise their sections of projectspec document before deadline on Thursday 21 | - Created usecases and usecase diagrams for projectspecs documents 22 | - Contacted client for discussion of prototype requirements 23 | - Final changes to your sections should be complete by Wednesday night so Colin can push properly to the SVN repository 24 | - Finished the general use cases and the detailed use cases, everything else on the deliverable will be taken care of tomorrow. -------------------------------------------------------------------------------- /docs/meetingMinutes/03-07-agenda.md: -------------------------------------------------------------------------------- 1 | # Meeting Agenda 2 | ## Mar 7, 2014 3 | #### Room: Shell House Recreation 4 4 | 5 | ### Attendance 6 | - Colin Woodbury 7 | - Ian Pun 8 | - Chazz Young 9 | - Markus Balasaki 10 | - Stephen Laboucane 11 | - Graeme Smith 12 | 13 | ### Agenda 14 | - Read Deliverable 5 comments 15 | - Check Deliverable 6 status 16 | - Deliverable 7 17 | - Class Diagram 18 | - Development Enviroment fixes 19 | 20 | ### Minutes 21 | - Approved Agenda 22 | - Deliverable 6 looks good 23 | - Reviewed comments on Deliverable 5 (10 minutes) 24 | - Jordan will fix all comments 25 | - Addressed some GitHub rebase errors (25 minutes) 26 | - Don't use -rebase on Windows 27 | - Read Deliverable 7 (10 minutes) 28 | - Assign roles (20 minutes) 29 | - Colin will be away 30 | 31 | ### Deliverable 7 Roles 32 | - Refined Use ases + Interaction diagrams - Chazz & Markus 33 | - Class diagram - Jordan & Graeme 34 | - Data persistence (3rd normal form) - Stephen & Ian 35 | - Architecture diagram (#4) - Colin 36 | -------------------------------------------------------------------------------- /docs/meetingMinutes/01-17-agenda.md: -------------------------------------------------------------------------------- 1 | # Meeting Agenda 2 | ## January 17, 2014 3 | #### Room: 2019 4 | 5 | ### Attendance 6 | 7 | - ALL 8 | 9 | ### Agenda 10 | 11 | - Finish up the client meeting preparation 12 | - Check to see microphone is working 13 | - Check individual interpretations of project 14 | - Discuss interpretations of project 15 | - Figure out which person is talking about the questions 16 | 17 | ### Minutes 18 | 19 | - Created formal question document for the client meeting 20 | - Established that the microphone was working and usable 21 | - Went over high level design of the grade system with roles for each user of the system 22 | - Went over how we are going to present the testing suite; we decided to suggest strongly to subcontract out the testing suite 23 | - Roughly assigned each question to the group members 24 | - Opted to assign questions to group members at a later date. 25 | - Opted to try to acquire a TASC room for further meetings as the library rooms are contested and difficult to book in time. -------------------------------------------------------------------------------- /src/gui/types/MSPanel.java: -------------------------------------------------------------------------------- 1 | /* 2 | * MSPanel 3 | * A JPanel extension for custom behaviour in MarkShark. 4 | */ 5 | 6 | package gui.types; 7 | 8 | import javax.swing.JPanel; 9 | 10 | /** 11 | * @author: Colin 12 | */ 13 | public abstract class MSPanel extends JPanel { 14 | protected static final int CANT_NAV = 42; 15 | private String panel_title; 16 | private boolean ok_to_navigate; 17 | 18 | public MSPanel(String panel_title) { 19 | this.panel_title = panel_title; 20 | ok_to_navigate = true; 21 | } 22 | 23 | public MSPanel(String panel_title, int nav_status) { 24 | this.panel_title = panel_title; 25 | 26 | if (nav_status == CANT_NAV) 27 | ok_to_navigate = false; 28 | } 29 | 30 | public String getPanelTitle() { 31 | return panel_title; 32 | } 33 | 34 | public boolean okToNav() { 35 | return ok_to_navigate; 36 | } 37 | 38 | public void setCantNav() { 39 | ok_to_navigate = false; 40 | } 41 | 42 | public void setOkToNav() { 43 | ok_to_navigate = true; 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /docs/styleGuidelines.md: -------------------------------------------------------------------------------- 1 | ## Style Guidelines 2 | ------------------ 3 | + Arial as standard font 4 | + Windows XP Widgets for all aspects 5 | + Breadcrumbs from Basic Web Elements 6 | + Left justify labels and fields 7 | + "Confirm" buttons to the left, "No"/"Cancel" buttons to the right 8 | + Name of page in title bar, e.g. 9 | `MarkShark Grading System - Marking` 10 | + "Breadcrumb" setup for progression of screens the user has followed to get to their current screen, left-justified at top of screen 11 | + "Back" button to the left of breadcrumbs, i.e. a small left arrow 12 | + Logout from anywhere in top right of window, under role 13 | + Discard or save changes if some have been made 14 | + Labels left justified with boxes justified at the right-most end of the longest label 15 | + Preserve justification of labels and text entry boxes (i.e. line them up consistently) 16 | + Field labels as bold 17 | + Buttons as plain-text with first letter capitalised 18 | + Pad all of your .ep files with 15 units(Right click -> Resize Canvas -> Fit Content with Padding) 19 | -------------------------------------------------------------------------------- /src/difflib/DiffException.java: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2010 Dmitry Naumenko (dm.naumenko@gmail.com) 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | package difflib; 17 | 18 | /** 19 | * Base class for all exceptions emanating from this package. 20 | * 21 | * @author Juanco Anez 22 | */ 23 | public class DiffException extends Exception { 24 | 25 | private static final long serialVersionUID = 1L; 26 | 27 | public DiffException() { 28 | } 29 | 30 | public DiffException(String msg) { 31 | super(msg); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /docs/meetingMinutes/03-10-agenda.md: -------------------------------------------------------------------------------- 1 | # Meeting Agenda 2 | ## Mar 10, 2014 3 | #### Room: Shell House Recreation 4 4 | 5 | ### Attendance 6 | - Colin Woodbury 7 | - Ian Pun 8 | - Chazz Young 9 | - Jordan Toering 10 | - Stephen Laboucane 11 | - Graeme Smith 12 | 13 | ### Agenda 14 | - Resubmit Deliverable 6 (5 minutes) 15 | - Open Floor for team members to plan times of the week for work to get done(10 minutes) 16 | - Go over architecture diagram (20 minutes) 17 | - Decide which word we want to use to name buttons (Save or Submit) (20 minutes) 18 | 19 | 20 | ### Minutes 21 | - Approved Agenda 22 | - Resubmitted Deliverable 6 to Coursys in PDF format 23 | - Colin will be absent March 13 to March 20. 24 | - Markus will assume the position temporary repository management until Colin's 25 | - Decision: Use both. Submit checks for completion of the form, then if the form is not complete the user will be prompted to completely finish their changes before proceeding. Save saves the changes without checking for full completion. In the activity grading screen, if a rubric is saved without all of the fields filled out, the academic log will be prefixed with a {INCOMPLETE} tag. 26 | 27 | -------------------------------------------------------------------------------- /src/difflib/PatchFailedException.java: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2010 Dmitry Naumenko (dm.naumenko@gmail.com) 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | package difflib; 17 | 18 | /** 19 | * Thrown whenever a delta cannot be applied as a patch to a given text. 20 | * 21 | * @author Juanco Anez 22 | */ 23 | public class PatchFailedException extends DiffException { 24 | 25 | private static final long serialVersionUID = 1L; 26 | 27 | public PatchFailedException() { 28 | } 29 | 30 | public PatchFailedException(String msg) { 31 | super(msg); 32 | } 33 | } -------------------------------------------------------------------------------- /src/gui/MarkSharkGUI.java: -------------------------------------------------------------------------------- 1 | // Main driver class for the GUI 2 | 3 | package gui; 4 | 5 | import javax.swing.*; 6 | import java.util.logging.*; 7 | 8 | /** 9 | * @author: Colin 10 | */ 11 | public class MarkSharkGUI { 12 | private LoginScreen login; 13 | 14 | public MarkSharkGUI() { 15 | login = new LoginScreen(); 16 | } 17 | 18 | public void startGUI() { 19 | try { 20 | UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); 21 | } catch (ClassNotFoundException ex) { 22 | Logger.getLogger(LoginScreen.class.getName()) 23 | .log(Level.SEVERE, null, ex); 24 | } catch (InstantiationException ex) { 25 | Logger.getLogger(LoginScreen.class.getName()) 26 | .log(Level.SEVERE, null, ex); 27 | } catch (IllegalAccessException ex) { 28 | Logger.getLogger(LoginScreen.class.getName()) 29 | .log(Level.SEVERE, null, ex); 30 | } catch (UnsupportedLookAndFeelException ex) { 31 | Logger.getLogger(LoginScreen.class.getName()) 32 | .log(Level.SEVERE, null, ex); 33 | } 34 | 35 | // Display the Login Page 36 | login.setVisible(true); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /docs/roles.md: -------------------------------------------------------------------------------- 1 | Roles 2 | ===== 3 | Front-end Development 4 | --------------------- 5 | - Interface design, layout, implementation, testing 6 | - Will use Swing (and possibly helper libraries)
7 | Swing tutorial [here](http://docs.oracle.com/javase/tutorial/uiswing/) 8 | 9 | Back-end Development 10 | -------------------- 11 | - Object model design, implementation 12 | - Database work 13 | - Unit testing 14 | - Algorithm design 15 | 16 | Feature Implementation 17 | ---------------------- 18 | - Login system 19 | - Student code testing suite 20 | 21 | Build Process Management 22 | ------------------------ 23 | - Project file structure, dependencies 24 | - Managing releases, `.jar` conversion to `.exe` etc. 25 | 26 | Repository Management 27 | --------------------- 28 | - Pull requests, commit analysis 29 | - Pushing project to Subversion mirror: https://punch.cs.sfu.ca/svn/CMPT275-1141-g-g1-2 30 | 31 | Team Management 32 | --------------- 33 | - Group emails 34 | - Room booking 35 | - Meeting minutes 36 | 37 | Document Writing 38 | ---------------- 39 | - User Manual 40 | - Should know [LaTeX](https://en.wikipedia.org/wiki/LaTeX)
41 | Guide PDF available [here](https://upload.wikimedia.org/wikipedia/commons/2/2d/LaTeX.pdf) 42 | -------------------------------------------------------------------------------- /src/types/SystemAdmin.java: -------------------------------------------------------------------------------- 1 | package types; 2 | 3 | 4 | /** 5 | * @desc: The SystemAdmin class is used to model the System Administrator account. 6 | * 7 | * @author (Chazz Young (0.0) 8 | * @version 0.0 - 03/16/2014 --getters/setters 9 | */ 10 | public class SystemAdmin extends Account 11 | { 12 | 13 | public SystemAdmin(String fn, String ln, int empID, String un, String pass) 14 | 15 | { 16 | super(fn, ln, empID, un, pass, Type.SYSTEMADMIN); 17 | } 18 | 19 | /** 20 | * @desc: Creates the Account Object and uplaods to database 21 | * @author: Chazz Young 22 | */ 23 | public void createAccount(String fn, String ln, int empID, String un, String pass, int type) 24 | { 25 | Account a; 26 | if(type == 1){ 27 | a = new SystemAdmin(fn, ln, empID, un, pass); 28 | }else if(type == 2){ 29 | a = new AcademicAdmin(fn, ln, empID, un, pass); 30 | }else if(type == 3){ 31 | a = new AssistantAdmin(fn, ln, empID, un, pass); 32 | }else if(type == 4){ 33 | a = new Instructor(fn, ln, empID, un, pass); 34 | }else if(type == 5){ 35 | a = new TATM(fn, ln, empID, un, pass); 36 | } 37 | //Update database... 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /src/types/TextAnalyzer.java: -------------------------------------------------------------------------------- 1 | package types; 2 | 3 | import java.util.*; 4 | import java.io.*; 5 | /** 6 | * @desc: The class TextAnalyzer is used to read and return information from a text file. 7 | * @author: Chazz Young 8 | */ 9 | public class TextAnalyzer 10 | { 11 | /** 12 | * Constructor for objects of class TextAnalyzer 13 | */ 14 | public TextAnalyzer() 15 | { 16 | 17 | } 18 | 19 | /** 20 | * This method reads the inputs of each line and returns an ArrayList of type String. 21 | */ 22 | public static ArrayList getInput(String filename) 23 | { 24 | ArrayList entry = new ArrayList(); 25 | try { 26 | BufferedReader reader = new BufferedReader(new FileReader(filename)); 27 | String line = reader.readLine(); 28 | while(line != null) { 29 | entry.add(line); 30 | line = reader.readLine(); 31 | } 32 | reader. close(); 33 | } 34 | catch(FileNotFoundException e) { 35 | System.out.println("This is not a valid directory for the file path specified."); 36 | } 37 | catch(IOException e) { 38 | 39 | } 40 | return entry; 41 | } 42 | } -------------------------------------------------------------------------------- /src/types/Rubric.java: -------------------------------------------------------------------------------- 1 | package types; 2 | 3 | import java.util.*; 4 | /** 5 | * The class Rubric is used to model the Rubric option. It requires a csv file 6 | * to create and populate the items 7 | * 8 | * @author Chazz Young(0.1) 9 | */ 10 | public class Rubric 11 | { 12 | private ArrayList items; 13 | 14 | /** 15 | * General constructor 16 | */ 17 | public Rubric(String file) 18 | { 19 | items = new ArrayList(); 20 | } 21 | 22 | /** 23 | * Special case where the rubric is a pass/fail rubric 24 | */ 25 | public Rubric(boolean pass) 26 | { 27 | items = new ArrayList(1); 28 | items.add(new RubricItem("This assignment is pass/fail", 1)); 29 | } 30 | 31 | public void addItem(String desc, int max) 32 | { 33 | RubricItem r = new RubricItem(desc, max); 34 | items.add(r); 35 | } 36 | } 37 | 38 | /** 39 | * This helper class is used to represent one item in the rubric. As it is only 40 | * used by the Rubric class, its fields are public 41 | */ 42 | class RubricItem 43 | { 44 | public String description; 45 | public int max_grade; 46 | 47 | public RubricItem(String desc, int max) 48 | { 49 | description = desc; 50 | max_grade = max; 51 | } 52 | } -------------------------------------------------------------------------------- /dist/README.TXT: -------------------------------------------------------------------------------- 1 | ======================== 2 | BUILD OUTPUT DESCRIPTION 3 | ======================== 4 | 5 | When you build an Java application project that has a main class, the IDE 6 | automatically copies all of the JAR 7 | files on the projects classpath to your projects dist/lib folder. The IDE 8 | also adds each of the JAR files to the Class-Path element in the application 9 | JAR files manifest file (MANIFEST.MF). 10 | 11 | To run the project from the command line, go to the dist folder and 12 | type the following: 13 | 14 | java -jar "MarkShark.jar" 15 | 16 | To distribute this project, zip up the dist folder (including the lib folder) 17 | and distribute the ZIP file. 18 | 19 | Notes: 20 | 21 | * If two JAR files on the project classpath have the same name, only the first 22 | JAR file is copied to the lib folder. 23 | * Only JAR files are copied to the lib folder. 24 | If the classpath contains other types of files or folders, these files (folders) 25 | are not copied. 26 | * If a library on the projects classpath also has a Class-Path element 27 | specified in the manifest,the content of the Class-Path element has to be on 28 | the projects runtime path. 29 | * To set a main class in a standard Java project, right-click the project node 30 | in the Projects window and choose Properties. Then click Run and enter the 31 | class name in the Main Class field. Alternatively, you can manually type the 32 | class name in the manifest Main-Class element. 33 | -------------------------------------------------------------------------------- /docs/usefulLinks.md: -------------------------------------------------------------------------------- 1 | Useful Links 2 | ============ 3 | 4 | [How to convert a .jar to a Windows .exe](https://stackoverflow.com/questions/147181/how-can-i-convert-my-java-program-to-an-exe-file) 5 | 6 | [Java Project Build Tool (Maven)](https://en.wikipedia.org/wiki/Apache_Maven) 7 | 8 | [Making Swing (GUI) Programming Easy](https://code.google.com/p/javabuilders/) 9 | 10 | [Markdown Formatting Cheat Sheet](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet) 11 | 12 | [Adding your sfu email address to Thunderbird {Recommended manual email server config}](http://www.sfu.ca/biology/facilities/computer/email/thunderbirdsetup.html) 13 | 14 | [Great Markdown Editor](http://markdownpad.com/) 15 | 16 | [GoogleDoc](https://docs.google.com/document/d/1kxi05ADhvrbr3SO9T7ZK3w4J83j7TJ6dg0c0qmxNwN0/edit?usp=sharing) 17 | 18 | [ICEpdf](http://www.icesoft.org/java/projects/ICEpdf/documentation.jsf) 19 | 20 | [Creating adn Editing PDFs in Java](http://www.vogella.com/tutorials/JavaPDF/article.html) 21 | 22 | [GoogleDoc 2](https://docs.google.com/document/d/1dkISAxYpGWtGSLQiHWuiRlMO_dAPjn4NMZzyCeOMAfw/edit?usp=sharing) 23 | 24 | [Jordan's Collection of Meeting Recording Files](https://skydrive.live.com/redir?resid=D0A87066CFF36442!15437&authkey=!AJEB8R0olb5ihB8&ithint=folder%2c) 25 | 26 | [GoogleDoc 3, detailed jobs](https://docs.google.com/document/d/1F2W6PveZ5-__kmNgUV-nQJ4-v2qcSn6FUmb7qhOT8y0/edit) 27 | 28 | [Git Media](https://github.com/schacon/git-media) 29 | -------------------------------------------------------------------------------- /src/login/Login.java: -------------------------------------------------------------------------------- 1 | package login; 2 | 3 | import types.*; 4 | import database.*; 5 | 6 | /** 7 | * @desc: The Login is used to validate that a user exists and passes that 8 | * user into the GUI. 9 | * @author: Chazz Young 10 | */ 11 | public class Login { 12 | /* 13 | * private ArrayList accounts; 14 | * 15 | * public LoginModule(ArrayList list_of_accounts) { accounts = new 16 | * ArrayList(); //Populate list of accounts, Account dummy = new 17 | * SystemAdmin(null, null, 0, null, null); 18 | * 19 | * } 20 | * 21 | * public Account attemptLogin(String username, String password) { Account 22 | * toReturn = null; for(Account a : accounts){ if(a.getUsername() == null){ 23 | * return null; } if(a.getUsername().equals(username)){ boolean success = 24 | * a.checkPassword(password); if(success == true){ toReturn = a; break; 25 | * }else{ break; } } } return toReturn; } 26 | */ 27 | 28 | public static boolean login(String username, String password) { 29 | Account acct = null; 30 | String acctPW = ""; 31 | 32 | acct = AccountAccess.constructAccountObject(username); 33 | 34 | try { 35 | acctPW = acct.getPassword(); 36 | } catch (Exception e) { 37 | System.out.println("No account"); 38 | } 39 | 40 | if (acctPW.equals(password)) { 41 | return true; 42 | } 43 | 44 | System.out.println("Failed login"); 45 | return false; 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /src/types/ProgrammingTest.java: -------------------------------------------------------------------------------- 1 | package types; 2 | 3 | 4 | /** 5 | * @desc: This class is implemented by the Activity class to hold the 6 | * paths needed for programming tests 7 | * @author: Chazz Young 8 | */ 9 | public class ProgrammingTest 10 | { 11 | private String test_path, console_input_path, solution_path, description; 12 | 13 | public ProgrammingTest(String test) { 14 | test_path = test; 15 | } 16 | 17 | public ProgrammingTest(String test, String console, String solution, String desc) 18 | { 19 | test_path = test; 20 | console_input_path = console; 21 | solution_path = solution; 22 | description = desc; 23 | } 24 | 25 | public String getTestPath() 26 | { 27 | return test_path; 28 | } 29 | 30 | public String getConsolenputPath() 31 | { 32 | return console_input_path; 33 | } 34 | 35 | public String getSolutionPath() 36 | { 37 | return solution_path; 38 | } 39 | 40 | public String getDescription() 41 | { 42 | return description; 43 | } 44 | 45 | public void setTestPath(String t) 46 | { 47 | test_path = t; 48 | } 49 | 50 | public void setConsolenputPath(String t) 51 | { 52 | console_input_path = t; 53 | } 54 | 55 | public void set(String t) 56 | { 57 | solution_path = t; 58 | } 59 | 60 | public void setDescription(String t) 61 | { 62 | description = t; 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /final/Donnervoegel.txt: -------------------------------------------------------------------------------- 1 | **PLEASE READ IN WORDPAD FOR PROPER FORMATTING 2 | 3 | ,,, 4 | ,,``, 5 | ,,``:`, 6 | ' ' ''''' ,, ,``````,, 7 | '' '' ' ,''',, ,,```````,, 8 | ' ' ' ''' ,'''', ,,````````, 9 | ' ' ' ,''''',,,,',`````````, 10 | ' ' ''''' ,''''''''',``````````, 11 | ,''''''''',``````````, 12 | ,;'''''''',```:````````, 13 | ,''''''''',````::``````:`, 14 | ,, ,''''''''''```````````````, 15 | ,''', ,''''''''''`````````,,,```, 16 | ,''',, ,''''''''''`````````,, ,,, 17 | ,'''',,,,'''''''''''```````,,, 18 | ,''''''''''''''``'''``````, 19 | ,''''''''```````'''``'''', 20 | ,'''''```````,,'''',,'''', 21 | ,''',,,,,,,,, '''' ,''', 22 | ,'', ''', ,'', 23 | ,''', ''', ,', 24 | ,'', '', , 25 | ,'', ,, 26 | ,'', 27 | ,, 28 | 29 | Colin Woodbury 30 | cwoodbur@sfu.ca 31 | 301238755 32 | 33 | Jordan Toering 34 | jtoering@sfu.ca 35 | 301199137 36 | 37 | Chazz Young 38 | chazzy@sfu.ca 39 | 301209440 40 | 41 | Ian Pun 42 | itpun@sfu.ca 43 | 301167944 44 | 45 | Markus Balaski 46 | mbalaski@sfu.ca 47 | 301177103 48 | 49 | Stephen Laboucane 50 | slabouca@sfu.ca 51 | 301209088 52 | 53 | Graeme Smith 54 | gds3@sfu.ca 55 | 301207735 56 | -------------------------------------------------------------------------------- /src/difflib/myers/package.html: -------------------------------------------------------------------------------- 1 | 2 | 22 | 23 | 24 | 26 | 27 | 28 | 29 |

30 | The {@link difflib.myers diff.myers} package 31 | implements Gene Myers' 33 | differencing algorithm. 34 |

35 |

36 | Myer's algorithm produces optimum results (minimum diffs), but 37 | consumes considerably more memory than SimpleDiff, so its not 38 | suitable for very large files. 39 |

40 | @author Juanco Anez 41 | 42 | 43 | -------------------------------------------------------------------------------- /src/shell/Shell.java: -------------------------------------------------------------------------------- 1 | package shell; 2 | 3 | import java.util.*; 4 | import java.io.*; 5 | 6 | /** 7 | * @author: Colin 8 | */ 9 | public abstract class Shell { 10 | public static String exec(ArrayList cmd) { 11 | ShellExec e = new ShellExec(cmd); 12 | String result = ""; 13 | 14 | try { 15 | e.executeCommand(); 16 | StringBuilder output = e.getStandardOutputFromCommand(); 17 | result = new String(output); 18 | System.out.println("Shell call went ok!"); 19 | } catch (IOException err) { 20 | System.out.println("MarkShark: There was some IO when executing a shell call."); 21 | } catch (InterruptedException err) { 22 | System.out.println("MarkShark: A shell call was interrupted."); 23 | } 24 | 25 | return result; 26 | } 27 | 28 | public static boolean isWindows() { 29 | String os = System.getProperty("os.name"); 30 | 31 | if (os.contains("Windows")) { 32 | System.out.println("I AM WINDOWS!!!!"); 33 | return true; 34 | } 35 | return false; 36 | } 37 | 38 | public static String pythonCall(String cmd) { 39 | ArrayList l = new ArrayList(); 40 | String command; 41 | 42 | if (isWindows()) { 43 | command = "C:\\Python27\\python"; 44 | } else { 45 | command = "python"; 46 | } 47 | 48 | l.add(command); 49 | l.add(cmd); 50 | 51 | return Shell.exec(l); 52 | } 53 | 54 | public static String pythonCall(String cmd, String testIn) { 55 | ArrayList l = new ArrayList(); 56 | String command; 57 | 58 | if (isWindows()) { 59 | command = "C:\\Python27\\python"; 60 | } else { 61 | command = "python"; 62 | } 63 | 64 | l.add(command); 65 | l.add(cmd); 66 | l.add(testIn); 67 | 68 | return Shell.exec(l); 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /src/difflib/myers/DiffNode.java: -------------------------------------------------------------------------------- 1 | package difflib.myers; 2 | 3 | /** 4 | *

Title:

5 | *

Description:

6 | *

Copyright: Copyright (c) 2002

7 | *

Company:

8 | * @author not attributable 9 | * @version 1.0 10 | */ 11 | 12 | /** 13 | * A diffnode in a diffpath. 14 | *

15 | * A DiffNode and its previous node mark a delta between 16 | * two input sequences, that is, two differing subsequences 17 | * between (possibly zero length) matching sequences. 18 | * 19 | * {@link DiffNode DiffNodes} and {@link Snake Snakes} allow for compression 20 | * of diffpaths, as each snake is represented by a single {@link Snake Snake} 21 | * node and each contiguous series of insertions and deletions is represented 22 | * by a single {@link DiffNode DiffNodes}. 23 | * 24 | * @version $Revision: 60 $ $Date: 2003-05-10 21:56:10 +0300 (Суб, 10 Май 2003) $ 25 | * @author Juanco Anez 26 | * 27 | */ 28 | public final class DiffNode extends PathNode { 29 | /** 30 | * Constructs a DiffNode. 31 | *

32 | * DiffNodes are compressed. That means that 33 | * the path pointed to by the prev parameter 34 | * will be followed using {@link PathNode#previousSnake} 35 | * until a non-diff node is found. 36 | * 37 | * @param the position in the original sequence 38 | * @param the position in the revised sequence 39 | * @param prev the previous node in the path. 40 | */ 41 | public DiffNode(int i, int j, PathNode prev) { 42 | super(i, j, (prev == null ? null : prev.previousSnake())); 43 | } 44 | 45 | /** 46 | * {@inheritDoc} 47 | * @return false, always 48 | */ 49 | public boolean isSnake() { 50 | return false; 51 | } 52 | 53 | } -------------------------------------------------------------------------------- /docs/projectInterpretation/ColinInterpretation.md: -------------------------------------------------------------------------------- 1 | Project Interpretation 2 | ====================== 3 | 4 | ### Meta 5 | - They want a prototype to show that such a system is possible, not the finished 6 | system itself. 7 | - This lets us use a local database (or not even, if just for demonstration 8 | purposes) instead of worrying about servers. 9 | - They want Windows, but if we use Swing it should be multiplatform. 10 | 11 | ### Application 12 | - Desktop Windows `.exe`. 13 | 14 | ### Login System 15 | - Users can log in from any computer with a certain ID and password. 16 | - **Do they want integration with the rest of their system, a la Canvas, 17 | SFU Connect, go.sfu.ca, etc.?** 18 | - Bad passwords or usernames will reject the user. 19 | 20 | ### Actors/Users 21 | - Users can fill multiple roles. 22 | - SysAdmin: Can add, delete, and change account info. Can alter database 23 | location. 24 | - TA/TM: Same thing? Can grade. 25 | - Instructor: Can do everything a TA/TM can do. Can manipulate rubrics. 26 | Can assign TA/TMs to students. Can alter course activities. 27 | - AsAcAd: Can create/alter courses and assign users below him to courses. 28 | - AcAd: Can do everything the users below him can. 29 | - Non-user actors: students and student groups. 30 | 31 | ### Testing Suite 32 | - _This whole feature can be argued against_. 33 | It could be suggested to the client that they contract this out 34 | as a seperate job completely. 35 | - Instructors only. 36 | - Interface for providing test files. 37 | - The suite compiles C* and Java, and interprets Python.
38 | **What Python version? And what implementation of Python?** 39 | - _All_ code regardless of language must be checked for malicious 40 | behaviour before compiling/running. This requires writing a parser for 41 | for each language, which will take _a lot_ of research, time, and money. 42 | -------------------------------------------------------------------------------- /docs/meetingMinutes/03-03-agenda.md: -------------------------------------------------------------------------------- 1 | # Meeting Agenda 2 | ## Mar 3, 2014 3 | #### Room: Shell House Recreation 4 4 | 5 | ### Attendance 6 | - Colin Woodbury 7 | - Jordan Toering 8 | - Ian Pun 9 | - Chazz Young 10 | - Markus Balasaki 11 | - Stephen Laboucane 12 | - Graeme Smith 13 | 14 | ### Agenda 15 | - Go over created UI screens on the TV(10 minutes) 16 | - Compile a list of general style guidelines(40 minutes) 17 | - Make the post-login page(main landing page) (20 minutes) 18 | - Delegate tasks for the rest of the week(20 minutes) 19 | 20 | ### Minutes 21 | - Went over UI screens and got feedback from group members 22 | - Created a list of style guidelines and put it in the repository 23 | - Divided up tasks for group members to accomplish based on style guidelines 24 | - Members should write their own descriptions for images they create 25 | - If a group member needs to use another member's images they can reference the section the image is in 26 | - Jordan and Colin will do the main landing page tomorrow after class. 27 | - Jordan and Colin will create subsections in the latest document, please wait until tomorrow after class to formally commit your work to the LaTeX document 28 | 29 | ### Screens Needed 30 | - Login {MARKUS} 31 | - Main Panel{JORDAN AND COLIN} 32 | - System Admin Panel {CHAZZ} 33 | - Database Panel(Sys Admin) {CHAZZ} 34 | - User Account Panel(Sys Admin) [Make a dropdown box to select account in the case of modification] {CHAZZ} 35 | - System Panel (Sys Admin, contains logs){CHAZZ} 36 | - Manages Courses{IAN} 37 | - Modify Course{IAN} 38 | - Choose Course(Choose a course for marking or for making activities){STEPHEN} 39 | - Choose Activity{STEPHEN} 40 | - Modify Activity{GRAEME} 41 | - Copy Activity{GRAEME} 42 | - Modify Rubric{GRAEME} 43 | - Select Activity(student/activity matrix){STEPHEN} 44 | - Test Suite(Test Student Code) {JORDAN} 45 | - Assignment Page(Rubric,Solution,Submitted views) {COLIN} -------------------------------------------------------------------------------- /docs/formalQuestions/formalQuestions.md: -------------------------------------------------------------------------------- 1 | Questions 2 | ========= 3 | ### General 4 | - How many users will be using this software (at one time), total 5 | 6 | ### Login 7 | - Is there a login system? What will it look like? 8 | - If a user tries to log in with bad passwords, what happens? 9 | Lockouts? (Does user get an email?) 10 | - How do we recover passwords? (Do we?) 11 | 12 | ### Users 13 | #### General 14 | - Is the following summary of possible user types correct: 15 | System Admin, Academic Admin, Assistant Academic Admin, Instructor, TA/TM. 16 | - Are students to interact with the system in any way? 17 | 18 | #### SysAdmin 19 | - How much control over accounts should the SysAdmin have? 20 | 21 | #### Markers (Instructor, TA/TM) 22 | - How are grades returned? 23 | - How exactly are assignments marked? 24 | - In what way are comments added to assignments? 25 | - Does all marking have to be done to a rubric? 26 | 27 | #### Instructors 28 | - When creating an assignment, does a rubric need to be included right away? 29 | If no, can we just block marking? 30 | - What happens when a rubric is changed when grades have already been 31 | submitted? 32 | 33 | #### Assistant Academic Admin 34 | - What is required in creating a course? Do class lists have to be added 35 | right away? 36 | - What does it mean to copy a course? 37 | - Are there time limits (dates) for creating/deleting/modifying a course? 38 | 39 | #### Academic Administrator 40 | - If Ac. Admins can "view and update all material added by other users", can they 41 | also do grading? 42 | 43 | ### Logs 44 | - Does the client think that having logs of all actions performed on the system, 45 | and marking logs for each student is a good idea? 46 | - (If yes) What Users should access to those logs? 47 | 48 | ### Code Testing Suite 49 | - (Describe potential problems - malicious code, writing parsers, time, money) 50 | - Should this be added to the software at all? 51 | - (If yes) Can all markers use this? 52 | -------------------------------------------------------------------------------- /src/difflib/DiffAlgorithm.java: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2010 Dmitry Naumenko (dm.naumenko@gmail.com) 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | package difflib; 17 | 18 | import java.util.*; 19 | 20 | /** 21 | * The general interface for computing diffs between two lists of elements of type T. 22 | * 23 | * @author Dmitry Naumenko 24 | * @param T The type of the compared elements in the 'lines'. 25 | */ 26 | public interface DiffAlgorithm { 27 | 28 | /** 29 | * Computes the difference between the original sequence and the revised 30 | * sequence and returns it as a {@link Patch} object. 31 | * 32 | * @param original The original sequence. Must not be {@code null}. 33 | * @param revised The revised sequence. Must not be {@code null}. 34 | * @return The patch representing the diff of the given sequences. Never {@code null}. 35 | */ 36 | public Patch diff(T[] original, T[] revised); 37 | 38 | /** 39 | * Computes the difference between the original sequence and the revised 40 | * sequence and returns it as a {@link Patch} object. 41 | * 42 | * @param original The original sequence. Must not be {@code null}. 43 | * @param revised The revised sequence. Must not be {@code null}. 44 | * @return The patch representing the diff of the given sequences. Never {@code null}. 45 | */ 46 | public Patch diff(List original, List revised); 47 | } 48 | -------------------------------------------------------------------------------- /src/audio/AudioPlayer.java: -------------------------------------------------------------------------------- 1 | package audio; 2 | 3 | import java.io.File; 4 | import javax.sound.midi.*; 5 | 6 | /** 7 | * @author: Colin 8 | */ 9 | public class AudioPlayer { 10 | private boolean useExternalSynth; 11 | private String filename; 12 | private Sequencer seq; 13 | 14 | public AudioPlayer(String filename) { 15 | useExternalSynth = false; 16 | this.filename = filename; 17 | 18 | try { 19 | init(); 20 | } catch (Exception e) { 21 | System.out.println("Couldn't open audio file..."); 22 | e.printStackTrace(); 23 | } 24 | } 25 | 26 | private void init() throws Exception { 27 | MidiDevice receivingDevice = getReceivingDevice(); 28 | receivingDevice.open(); 29 | 30 | Sequence sequence1 = MidiSystem.getSequence(new File(filename)); 31 | seq = MidiSystem.getSequencer(false); 32 | Transmitter tx1 = seq.getTransmitter(); 33 | Receiver rx1 = receivingDevice.getReceiver(); 34 | tx1.setReceiver(rx1); 35 | 36 | seq.open(); 37 | seq.setSequence(sequence1); 38 | } 39 | 40 | public void play() { 41 | if (seq != null) 42 | seq.start(); 43 | } 44 | 45 | public void stop() { 46 | if (seq != null) 47 | seq.stop(); 48 | } 49 | 50 | private MidiDevice getReceivingDevice() 51 | throws MidiUnavailableException { 52 | for (MidiDevice.Info mdi: MidiSystem.getMidiDeviceInfo()) { 53 | MidiDevice dev = MidiSystem.getMidiDevice(mdi); 54 | return dev; 55 | // if (dev.getMaxReceivers() != 0) { 56 | // String lcName = 57 | // defaultString(mdi.getName()).toLowerCase(Locale.ENGLISH); 58 | // if (lcName.contains(useExternalSynth? "usb": "java")) { 59 | // System.out.println("GOT HERE!!"); 60 | // return dev; 61 | // } 62 | // } 63 | } 64 | return null; 65 | } 66 | 67 | private String defaultString(String s) { 68 | if (s == null) 69 | return ""; 70 | return s; 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /docs/meetingMinutes/03-17-agenda.md: -------------------------------------------------------------------------------- 1 | # Meeting Agenda 2 | ## Mar 17, 2014 3 | #### Room: Shell House Recreation 4 4 | 5 | ### Attendance 6 | - Ian Pun 7 | - Chazz Young 8 | - Jordan Toering 9 | - Graeme Smith 10 | - Markus Balaski 11 | 12 | ### Agenda 13 | - Formalize agenda(5 minutes) 14 | - Resolve incorrect assignment submission and mark(10 minutes) 15 | - Go over next deliverable(30 minutes) 16 | - Formalize roles for next deliverable 17 | 18 | 19 | ### Minutes 20 | - Approved Agenda 21 | - Emailed Professor Regan about our misplaced group mark 22 | - Went over requirements for next iteration (first prototype) 23 | - Test Case Document (Deliverable 8) will not be mentioned until next week's meeting 24 | - Ensure everyone has Swing and a suitable Java IDE 25 | - Until Friday, all code done will be voluntary. The Friday meeting will formally assign sections of code to members as all members will be present at the meeting. 26 | - Stephen is assigned to transcribe client meeting 2 by Friday's meeting. 27 | 28 | ### General coding guidelines(Use Java 8): 29 | - Follow as much as possible prototype requirements in terms of content 30 | - Variables are declared using only lowercase and underscores if a space is needed 31 | - Variable visibility: All variables will be private, except in special cases(interface classes). Methods should be public unless they are helpers used only in that class. 32 | - Variables in looping should be a single, lowercase character such as (i,j,k). The default start character is 'i', if more nesting is needed move down the alphabet. Constants should be notated in all CAPS. 33 | - Getters and Setters should be formatted in the style of the getters/setters generated automatically through Eclipse 34 | - Comments: Don't comment unnecessarily but if unsure, stray to the side of more comments vs less. 35 | - Methods: For the first word in each method, use lowercase. For every subsequent use uppercase. No matter how small the word is (Of, Is, To), follow the guidelines. No spaces between words. 36 | - Classes: Capitalize every word, no spaces. 37 | - Constructors: Always put the constructor between fields and other methods. 38 | - Use iterative loops instead of manual loops ( where possible) 39 | - Use Eclipse's style of formatting (ie. curly brace placement, tabbing) 40 | - -------------------------------------------------------------------------------- /docs/projectInterpretation/Jordan Interpretation.md: -------------------------------------------------------------------------------- 1 | ### Account types 2 | -- Each user has an account type. For accounts in relation to classes: users can be part of more than one type of role in more than one class. For example: a student who TAs math but is enrolled in history. 3 | 4 | -- The system roles (admin, admin assistants) have jurisdiction over how the classes are created but can't change the content inside of courses. 5 | 6 | -- The way this works, we will have two different types of accounts. Some accounts are system based while some are class based. Markers for example will be only present in the scope of the class. They don't have control over how classes are created. 7 | 8 | ### Marking and Grades 9 | -- Returning work: the marker updates the students mark on the activity and the student can check the mark he acheived. Much like canvas. 10 | 11 | -- Comments: We should try to convince the client that comments should either be totally system-side or attached to individual work. This is also dependant on the types of files used. If the only filetypes we have to deal with are PDF and code files, it coild be optimal to store the comments within the file. However, if the comments are to be stored serverside, it would be helpful to create a system that does general comments(for arts work) or per-line comments(for code/math work). 12 | 13 | -- Rubric comparison: When the marker needs to compare to the rubic he could press a button to open a side by side view of the students work and the rubric. It would be optimal if the marks entered into the rubric are automatically updated into the students marks. (Perhaps we then need a more custom rubric solution. This would be a slick feature but the amount of time it takes might not be worth it) 14 | 15 | -- Compiling and checking code: Code could be run in the same way that 'codewrite' runs it. No access to external libraries and the code would run in a quarantine enviroment. This would reduce the need for santitation while allowing the markers to see if the assignments are fufilling the requirements. 16 | 17 | ### System implementation 18 | -- The program will run as a desktop application that connects to the server. Students will login each time to check their work and submit their grades 19 | 20 | -- The system will send email notifying of changes to grades(possible extra feature like canvas) 21 | -------------------------------------------------------------------------------- /docs/releasePage.tex: -------------------------------------------------------------------------------- 1 | % Preamble. Don't worry about it. 2 | \documentclass{article} 3 | \usepackage{setspace,graphicx,fancyhdr} 4 | \usepackage[utf8]{inputenc} 5 | \usepackage[left=1in,top=1in,right=1in,bottom=1in]{geometry} % Document margins 6 | \onehalfspacing 7 | 8 | % For custom footers 9 | \pagestyle{fancy} 10 | \fancyhead{} % clear all header fields 11 | \renewcommand{\headrulewidth}{0pt} % no line in header area 12 | \fancyfoot{} % clear all footer fields 13 | \fancyfoot[LE,RO]{\thepage} % for page #s 14 | \fancyfoot[RE,LO]{\includegraphics{../images/logo/markshark-1x}} 15 | 16 | \begin{document} 17 | 18 | \textbf{Release: Markshark ver 1.0}\\ 19 | \subsection{Documentation:} 20 | \begin{itemize} 21 | \item Software Requirement Specification 1.1 22 | \item Design Document 1.1 23 | \item User Manual 1.1 24 | \end{itemize} 25 | 26 | \subsection{Source Code:} 27 | \subsubsection{Database Access classes ver 1.0:} 28 | \begin{itemize} 29 | \item AccountAccess.java 30 | \item CourseAccess.java 31 | \item DBAccess.java 32 | \item GradeAccess.java 33 | \end{itemize} 34 | 35 | \subsubsection{GUI ver 1.0:} 36 | \begin{itemize} 37 | \item LandingPageAdmin.java 38 | \item LandingPageAssistAdmin.java 39 | \item LandingPageInstructor.java 40 | \item LandingPageSysAdmin.java 41 | \item LandingPageTA.java 42 | \item LoginScreen.java 43 | \item ActivityCreation.java 44 | \item ActivityManagement.java 45 | \item ActivitySelection.java 46 | \item CourseManagement.java 47 | \item CourseSelection.java 48 | \item CreateAccount.java 49 | \item CreateCourse.java 50 | \item DatabaseManagement.java 51 | \item LogManagement.java 52 | \item MarkingCode.java 53 | \item MarkingPDF.java 54 | \item MarkSharkGUI.java 55 | \item MasterFrame.java 56 | \item SelectActivityMatrix.java 57 | \item SettingsPage.java 58 | \item TestSuite.java 59 | \item GUIUtils.java 60 | \item Login.java 61 | \end{itemize} 62 | 63 | \subsubsection{Type classes ver 1.0:} 64 | \begin{itemize} 65 | \item AcademicAdmin.java 66 | \item Account.java 67 | \item Activity.java 68 | \item AssistantAdmin.java 69 | \item Course.java 70 | \item Instructor.java 71 | \item Marker.java 72 | \item ProgrammingTest.java 73 | \item Rubric.java 74 | \item Student.java 75 | \item SystemAdmin.java 76 | \item TATM.java 77 | \end{itemize} 78 | 79 | \subsubsection{Shell Classes ver 1.0:} 80 | \begin{itemize} 81 | \item Shell.java 82 | \item ShellExec.java 83 | \end{itemize} 84 | 85 | Date of Release : April 7, 2014 86 | 87 | \end{document} 88 | -------------------------------------------------------------------------------- /src/difflib/InsertDelta.java: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2010 Dmitry Naumenko (dm.naumenko@gmail.com) 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | package difflib; 17 | 18 | import java.util.List; 19 | 20 | /** 21 | * Describes the add-delta between original and revised texts. 22 | * 23 | * @author Dmitry Naumenko 24 | * @param T 25 | * The type of the compared elements in the 'lines'. 26 | */ 27 | public class InsertDelta extends Delta { 28 | 29 | /** 30 | * Creates an insert delta with the two given chunks. 31 | * 32 | * @param original 33 | * The original chunk. Must not be {@code null}. 34 | * @param revised 35 | * The original chunk. Must not be {@code null}. 36 | */ 37 | public InsertDelta(Chunk original, Chunk revised) { 38 | super(original, revised); 39 | } 40 | 41 | /** 42 | * {@inheritDoc} 43 | * 44 | * @throws PatchFailedException 45 | */ 46 | @Override 47 | public void applyTo(List target) throws PatchFailedException { 48 | verify(target); 49 | int position = this.getOriginal().getPosition(); 50 | List lines = this.getRevised().getLines(); 51 | for (int i = 0; i < lines.size(); i++) { 52 | target.add(position + i, lines.get(i)); 53 | } 54 | } 55 | 56 | /** 57 | * {@inheritDoc} 58 | */ 59 | @Override 60 | public void restore(List target) { 61 | int position = getRevised().getPosition(); 62 | int size = getRevised().size(); 63 | for (int i = 0; i < size; i++) { 64 | target.remove(position); 65 | } 66 | } 67 | 68 | @Override 69 | public void verify(List target) throws PatchFailedException { 70 | if (getOriginal().getPosition() > target.size()) { 71 | throw new PatchFailedException("Incorrect patch for delta: " 72 | + "delta original position > target size"); 73 | } 74 | 75 | } 76 | 77 | public TYPE getType() { 78 | return Delta.TYPE.INSERT; 79 | } 80 | 81 | @Override 82 | public String toString() { 83 | return "[InsertDelta, position: " + getOriginal().getPosition() 84 | + ", lines: " + getRevised().getLines() + "]"; 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /src/difflib/DeleteDelta.java: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2010 Dmitry Naumenko (dm.naumenko@gmail.com) 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | package difflib; 17 | 18 | import java.util.List; 19 | 20 | /** 21 | * Describes the delete-delta between original and revised texts. 22 | * 23 | * @author Dmitry Naumenko 24 | * @param T The type of the compared elements in the 'lines'. 25 | */ 26 | public class DeleteDelta extends Delta { 27 | 28 | /** 29 | * Creates a change delta with the two given chunks. 30 | * 31 | * @param original 32 | * The original chunk. Must not be {@code null}. 33 | * @param revised 34 | * The original chunk. Must not be {@code null}. 35 | */ 36 | public DeleteDelta(Chunk original, Chunk revised) { 37 | super(original, revised); 38 | } 39 | 40 | /** 41 | * {@inheritDoc} 42 | * 43 | * @throws PatchFailedException 44 | */ 45 | @Override 46 | public void applyTo(List target) throws PatchFailedException { 47 | verify(target); 48 | int position = getOriginal().getPosition(); 49 | int size = getOriginal().size(); 50 | for (int i = 0; i < size; i++) { 51 | target.remove(position); 52 | } 53 | } 54 | 55 | /** 56 | * {@inheritDoc} 57 | */ 58 | @Override 59 | public void restore(List target) { 60 | int position = this.getRevised().getPosition(); 61 | List lines = this.getOriginal().getLines(); 62 | for (int i = 0; i < lines.size(); i++) { 63 | target.add(position + i, lines.get(i)); 64 | } 65 | } 66 | 67 | @Override 68 | public TYPE getType() { 69 | return Delta.TYPE.DELETE; 70 | } 71 | 72 | @Override 73 | public void verify(List target) throws PatchFailedException { 74 | getOriginal().verify(target); 75 | } 76 | 77 | @Override 78 | public String toString() { 79 | return "[DeleteDelta, position: " + getOriginal().getPosition() + ", lines: " 80 | + getOriginal().getLines() + "]"; 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /src/difflib/Patch.java: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2010 Dmitry Naumenko (dm.naumenko@gmail.com) 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | package difflib; 17 | 18 | import java.util.Collections; 19 | import java.util.LinkedList; 20 | import java.util.List; 21 | import java.util.ListIterator; 22 | 23 | /** 24 | * Describes the patch holding all deltas between the original and revised texts. 25 | * 26 | * @author Dmitry Naumenko 27 | * @param T The type of the compared elements in the 'lines'. 28 | */ 29 | public class Patch { 30 | private List> deltas = new LinkedList>(); 31 | 32 | /** 33 | * Apply this patch to the given target 34 | * @return the patched text 35 | * @throws PatchFailedException if can't apply patch 36 | */ 37 | public List applyTo(List target) throws PatchFailedException { 38 | List result = new LinkedList(target); 39 | ListIterator> it = getDeltas().listIterator(deltas.size()); 40 | while (it.hasPrevious()) { 41 | Delta delta = (Delta) it.previous(); 42 | delta.applyTo(result); 43 | } 44 | return result; 45 | } 46 | 47 | /** 48 | * Restore the text to original. Opposite to applyTo() method. 49 | * @param target the given target 50 | * @return the restored text 51 | */ 52 | public List restore(List target) { 53 | List result = new LinkedList(target); 54 | ListIterator> it = getDeltas().listIterator(deltas.size()); 55 | while (it.hasPrevious()) { 56 | Delta delta = (Delta) it.previous(); 57 | delta.restore(result); 58 | } 59 | return result; 60 | } 61 | 62 | /** 63 | * Add the given delta to this patch 64 | * @param delta the given delta 65 | */ 66 | public void addDelta(Delta delta) { 67 | deltas.add(delta); 68 | } 69 | 70 | /** 71 | * Get the list of computed deltas 72 | * @return the deltas 73 | */ 74 | public List> getDeltas() { 75 | Collections.sort(deltas, DeltaComparator.INSTANCE); 76 | return deltas; 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /docs/clientMeetings/clientMeeting1Questions.md: -------------------------------------------------------------------------------- 1 | Client Meeting Questions 2 | ======================== 3 | 4 | #### Colin Woodbury cwoodbur@sfu.ca 5 | 6 | - How many users will be using this software (at one time), total 7 | 8 | Assignments 9 | 10 | - How exactly are assignments graded? 11 | - Are they all done directly on a rubric? 12 | - Is it necessary for the program to analyze the assignment to associate the 13 | rubric with the assignment? 14 | - Does the system block marking if no rubric has been submitted with the assignment? 15 | 16 | #### Jordan Toering jtoering@sfu.ca 17 | 18 | Assignments Part 2 19 | 20 | - Code assignments: building a testing suite? 21 | - Is it that essential (will require an exorbitant amount of work, potentially 22 | four different parsers along with potential security risks) 23 | - Suggest looking at code side by side? 24 | - How should the system implement the commenting portion? 25 | (i.e. directly on the work, within the assignment description 26 | (if students have access to the system)) 27 | - Are there any time limits for modifying an assignment/rubric? 28 | 29 | #### Graeme Smith gds3@sfu.ca 30 | 31 | Assignements Part 3 32 | 33 | - What does it mean to `return` an assignment? Is it as simple as outputting 34 | the commented file back into the folder provided for the student? 35 | 36 | Students 37 | 38 | - Are students interacting with this system at all? 39 | - If not, will the system be responsible for showing grades in some other way? 40 | - If so, what can the student access? 41 | 42 | #### Ian Pun itpun@sfu.ca 43 | 44 | Courses 45 | 46 | - What does it mean to create a course? (pre-reqs etc.) 47 | - What does it mean to copy a course? 48 | - Is the system responsible for checking to see if a student is eligible to take 49 | the course? 50 | - Are there time limits as to when the course can be modified? 51 | 52 | #### Stephen Laboucane slabouca@sfu.ca 53 | 54 | The Login System 55 | 56 | - How sophisticated do you want the login system to be? 57 | - How are lost passwords handled? 58 | - How are bad passwords handled (lockouts, password reset, contact system admin etc.) 59 | - Does the system need different UIs for different types of users? 60 | - IF a user has multiple roles? 61 | 62 | #### Markus Balaski mabalaski@gmail.com 63 | 64 | Academic Administrators & Academic Admin Assistants 65 | 66 | - What precisely can the administrators do? Can they grade? 67 | - How will the admin assistants add students to the class? 68 | (batch add, person by person add) 69 | - Case where student cannot enter course? 70 | 71 | #### Chazz Young chazzy@sfu.ca 72 | 73 | System Administrator 74 | 75 | - Is there a limit to the number of SysAdmins? 76 | - How much control over accounts should the SysAdmin have? 77 | 78 | Logs 79 | 80 | - Explain Logs: Important to have, and cheap. Two types: Academic and System. 81 | - Who has access to logs? (System/Academic) 82 | -------------------------------------------------------------------------------- /src/difflib/ChangeDelta.java: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2010 Dmitry Naumenko (dm.naumenko@gmail.com) 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | package difflib; 17 | 18 | import java.util.List; 19 | 20 | /** 21 | * Describes the change-delta between original and revised texts. 22 | * 23 | * @author Dmitry Naumenko 24 | * @param T The type of the compared elements in the 'lines'. 25 | */ 26 | public class ChangeDelta extends Delta { 27 | 28 | /** 29 | * Creates a change delta with the two given chunks. 30 | * @param original The original chunk. Must not be {@code null}. 31 | * @param revised The original chunk. Must not be {@code null}. 32 | */ 33 | public ChangeDelta(Chunk original, Chunkrevised) { 34 | super(original, revised); 35 | } 36 | 37 | /** 38 | * {@inheritDoc} 39 | * 40 | * @throws PatchFailedException 41 | */ 42 | @Override 43 | public void applyTo(List target) throws PatchFailedException { 44 | verify(target); 45 | int position = getOriginal().getPosition(); 46 | int size = getOriginal().size(); 47 | for (int i = 0; i < size; i++) { 48 | target.remove(position); 49 | } 50 | int i = 0; 51 | for (T line : getRevised().getLines()) { 52 | target.add(position + i, line); 53 | i++; 54 | } 55 | } 56 | 57 | /** 58 | * {@inheritDoc} 59 | */ 60 | @Override 61 | public void restore(List target) { 62 | int position = getRevised().getPosition(); 63 | int size = getRevised().size(); 64 | for (int i = 0; i < size; i++) { 65 | target.remove(position); 66 | } 67 | int i = 0; 68 | for (T line : getOriginal().getLines()) { 69 | target.add(position + i, line); 70 | i++; 71 | } 72 | } 73 | 74 | /** 75 | * {@inheritDoc} 76 | */ 77 | public void verify(List target) throws PatchFailedException { 78 | getOriginal().verify(target); 79 | if (getOriginal().getPosition() > target.size()) { 80 | throw new PatchFailedException("Incorrect patch for delta: " 81 | + "delta original position > target size"); 82 | } 83 | } 84 | 85 | @Override 86 | public String toString() { 87 | return "[ChangeDelta, position: " + getOriginal().getPosition() + ", lines: " 88 | + getOriginal().getLines() + " to " + getRevised().getLines() + "]"; 89 | } 90 | 91 | @Override 92 | public TYPE getType() { 93 | return Delta.TYPE.CHANGE; 94 | } 95 | } 96 | -------------------------------------------------------------------------------- /src/difflib/StringUtills.java: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2010 Dmitry Naumenko (dm.naumenko@gmail.com) 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | package difflib; 17 | 18 | import java.util.Iterator; 19 | import java.util.LinkedList; 20 | import java.util.List; 21 | 22 | public class StringUtills { 23 | 24 | public static String join(final Iterable objs, final String delimiter) { 25 | Iterator iter = objs.iterator(); 26 | if (!iter.hasNext()) { 27 | return ""; 28 | } 29 | StringBuffer buffer = new StringBuffer(String.valueOf(iter.next())); 30 | while (iter.hasNext()) { 31 | buffer.append(delimiter).append(String.valueOf(iter.next())); 32 | } 33 | return buffer.toString(); 34 | } 35 | 36 | /** 37 | * Replaces all tabs with 4 spaces. 38 | * @param str The string. 39 | * @return 40 | */ 41 | public static String expandTabs(String str) { 42 | return str.replace("\t", " "); 43 | } 44 | 45 | /** 46 | * Replaces all opening an closing tags with < or >. 47 | * @param str 48 | * @return 49 | */ 50 | public static String htmlEntites(String str) { 51 | return str.replace("<", "<").replace(">", ">"); 52 | } 53 | 54 | public static String normalize(String str) { 55 | return expandTabs(htmlEntites(str)); 56 | } 57 | 58 | public static List normalize(List list) { 59 | List result = new LinkedList(); 60 | for (String line : list) { 61 | result.add(normalize(line)); 62 | } 63 | return result; 64 | } 65 | 66 | public static List wrapText(List list, int columnWidth) { 67 | List result = new LinkedList(); 68 | for (String line : list) { 69 | result.add(wrapText(line, columnWidth)); 70 | } 71 | return result; 72 | } 73 | 74 | /** 75 | * Wrap the text with the given column width 76 | * @param line the text 77 | * @param columnWidth the given column 78 | * @return the wrapped text 79 | */ 80 | public static String wrapText(String line, int columnWidth) { 81 | int lenght = line.length(); 82 | int delimiter = "
".length(); 83 | int widthIndex = columnWidth; 84 | 85 | for (int count = 0; lenght > widthIndex; count++) { 86 | line = line.subSequence(0, widthIndex + delimiter * count) + "
" 87 | + line.substring(widthIndex + delimiter * count); 88 | widthIndex += columnWidth; 89 | } 90 | 91 | return line; 92 | } 93 | } 94 | -------------------------------------------------------------------------------- /src/difflib/package.html: -------------------------------------------------------------------------------- 1 | 2 | 57 | 58 | 59 | 61 | 62 | 63 | 64 |

65 | The {@link difflib difflib} package 66 | implements general operation with diff files. 67 |

68 | @author Dmitry Naumenko 69 | 70 | 71 | -------------------------------------------------------------------------------- /src/difflib/myers/DiffException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ==================================================================== 3 | * 4 | * The Apache Software License, Version 1.1 5 | * 6 | * Copyright (c) 1999-2003 The Apache Software Foundation. 7 | * All rights reserved. 8 | * 9 | * Redistribution and use in source and binary forms, with or without 10 | * modification, are permitted provided that the following conditions 11 | * are met: 12 | * 13 | * 1. Redistributions of source code must retain the above copyright 14 | * notice, this list of conditions and the following disclaimer. 15 | * 16 | * 2. Redistributions in binary form must reproduce the above copyright 17 | * notice, this list of conditions and the following disclaimer in 18 | * the documentation and/or other materials provided with the 19 | * distribution. 20 | * 21 | * 3. The end-user documentation included with the redistribution, if 22 | * any, must include the following acknowledgement: 23 | * "This product includes software developed by the 24 | * Apache Software Foundation (http://www.apache.org/)." 25 | * Alternately, this acknowledgement may appear in the software itself, 26 | * if and wherever such third-party acknowledgements normally appear. 27 | * 28 | * 4. The names "The Jakarta Project", "Commons", and "Apache Software 29 | * Foundation" must not be used to endorse or promote products derived 30 | * from this software without prior written permission. For written 31 | * permission, please contact apache@apache.org. 32 | * 33 | * 5. Products derived from this software may not be called "Apache" 34 | * nor may "Apache" appear in their names without prior written 35 | * permission of the Apache Software Foundation. 36 | * 37 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED 38 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 39 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 40 | * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR 41 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 42 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 43 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 44 | * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 45 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 46 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 47 | * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 48 | * SUCH DAMAGE. 49 | * ==================================================================== 50 | * 51 | * This software consists of voluntary contributions made by many 52 | * individuals on behalf of the Apache Software Foundation. For more 53 | * information on the Apache Software Foundation, please see 54 | * . 55 | * 56 | */ 57 | 58 | package difflib.myers; 59 | 60 | /** 61 | * Base class for all exceptions emanating from this package. 62 | * 63 | * @version $Revision: 69 $ $Date: 2003-10-13 11:00:44 +0300 (Пнд, 13 Окт 2003) $ 64 | * 65 | * @author Juanco Anez 66 | */ 67 | public class DiffException extends Exception { 68 | 69 | private static final long serialVersionUID = 1L; 70 | 71 | public DiffException() { 72 | } 73 | 74 | public DiffException(String msg) { 75 | super(msg); 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /src/types/Activity.java: -------------------------------------------------------------------------------- 1 | package types; 2 | 3 | import java.util.ArrayList; 4 | /** 5 | * Write a description of class Activity here. 6 | * 7 | * @author Chazz Young 8 | * @version 0.1 9 | */ 10 | public class Activity 11 | { 12 | private String name, solnPath, studentSubPath , due_date, activityDesc, language; 13 | private int num_of_tests, num_of_files; 14 | //isGroup has been included, but it will be empty as this was discontinued 15 | //in the prioritization meeting 16 | private boolean isProgramming, isGroup; 17 | 18 | private ArrayList tests; 19 | 20 | private Rubric rubric; 21 | 22 | public Activity(String n, String desc, String studPath, String soln, String lang, String dueDate, boolean p, boolean g, int numTests) 23 | { 24 | name = n; 25 | activityDesc = desc; 26 | studentSubPath = studPath; 27 | solnPath = soln; 28 | language = lang; 29 | isProgramming = p; 30 | isGroup = g; 31 | num_of_tests = numTests; 32 | due_date = dueDate; 33 | isProgramming = p; 34 | isGroup = g; 35 | tests = new ArrayList(); 36 | //update Database 37 | } 38 | 39 | //Getters 40 | 41 | public String getActivityDesc() { 42 | return activityDesc; 43 | } 44 | 45 | public String getStudentSubPath() { 46 | return studentSubPath; 47 | } 48 | 49 | public String getSolnPath() { 50 | return solnPath; 51 | } 52 | 53 | public String getName() 54 | { 55 | return name; 56 | } 57 | 58 | public String getLanguage() 59 | { 60 | return language; 61 | } 62 | 63 | public String getDueDate() 64 | { 65 | return due_date; 66 | } 67 | 68 | public boolean isProgramming() 69 | { 70 | return isProgramming; 71 | } 72 | 73 | public boolean isGroup() 74 | { 75 | return isGroup; 76 | } 77 | 78 | public int getNumOfTests() 79 | { 80 | return num_of_tests; 81 | } 82 | 83 | public ArrayList getTests() 84 | { 85 | return tests; 86 | } 87 | 88 | //Setters 89 | 90 | public void setDueDate(String date) 91 | { 92 | due_date = date; 93 | } 94 | 95 | public void addProgrammingTest(String test) 96 | { 97 | ProgrammingTest p = new ProgrammingTest(test); 98 | tests.add(p); 99 | isProgramming = true; 100 | } 101 | 102 | public void addMultipleTests(ArrayList t) 103 | { 104 | for(ProgrammingTest p : t){ 105 | if(tests.contains(p)){ 106 | //do nothing 107 | }else{ 108 | tests.add(p); 109 | } 110 | } 111 | } 112 | 113 | public void setIsGroup(boolean b) 114 | { 115 | isGroup = b; 116 | } 117 | 118 | /** 119 | * @desc: Creates a rubric depending on teh flag isPassFail 120 | * @author: Chazz Young 121 | */ 122 | /*public void addRubric(boolean isPassFail) 123 | { 124 | Rubric r; 125 | if(isPassFail == true){ 126 | r = new Rubric(isPassFail); 127 | }else{ 128 | String path = (path_solutions + "/Rubric.txt"); 129 | r = new Rubric(path); 130 | } 131 | }*/ 132 | } 133 | -------------------------------------------------------------------------------- /src/database/Dbaccess.java: -------------------------------------------------------------------------------- 1 | /* 2 | * To change this license header, choose License Headers in Project Properties. 3 | * To change this template file, choose Tools | Templates 4 | * and open the template in the editor. 5 | */ 6 | 7 | package database; 8 | 9 | import java.sql.*; 10 | 11 | 12 | /** 13 | * 14 | * @author Pun 15 | */ 16 | public class Dbaccess { 17 | 18 | 19 | // ATTRIBUTES - CLASS VARIABLES 20 | 21 | private static Connection dbConnection; // The connection to the database 22 | 23 | // STATIC METHODS 24 | 25 | /* 26 | * Method to return the list of courses by course ID to be used in a course 27 | * selection dropdown box. 28 | */ 29 | public static void backupdatabase(String filepath) { 30 | // set up the query string here: 31 | String query = "BACKUP DATABASE c275g01A TO DISK = '"+ filepath+"wiresharkbackup.BAK'"; 32 | execUpdate(query); //execute backup 33 | } 34 | 35 | public static void restoredatabase(String filepath) { 36 | // set up the query string here: 37 | String query = "RESTORE DATABASE c275g01A FROM DISK = '"+ filepath+"'"; 38 | execUpdate(query); //execute backup 39 | } 40 | 41 | 42 | // HELPER METHODS 43 | 44 | /* 45 | * Method to execute an update (INSERT, DELETE, UPDATE) query on the 46 | * database connection. 47 | */ 48 | private static void execUpdate(String query) { 49 | PreparedStatement prepStatement = null; 50 | 51 | establishConnection(); // Establish connection to Cypress 52 | 53 | try { // Prepare and execute the query 54 | prepStatement = dbConnection.prepareStatement(query); 55 | prepStatement.executeUpdate(); 56 | } catch (SQLException e) { 57 | System.out.println("SQL Exception occured, the state : " 58 | + e.getSQLState() + "\nMessage: " + e.getMessage()); 59 | } 60 | } 61 | 62 | /* 63 | * Method to execute a query on the database connection and return a result 64 | * set for the query entered as a string argument. 65 | */ 66 | private static ResultSet execQuery(String query) { 67 | PreparedStatement prepStatement = null; 68 | ResultSet resSet = null; 69 | 70 | establishConnection(); 71 | try { // Prepare and execute query 72 | prepStatement = dbConnection.prepareStatement(query); 73 | resSet = prepStatement.executeQuery(); 74 | } catch (SQLException e) { 75 | System.out.println("SQL Exception occured, the state : " 76 | + e.getSQLState() + "\nMessage: " + e.getMessage()); 77 | } 78 | return resSet; 79 | } 80 | 81 | /* 82 | * Method to establish a connection to the Cypress SQL server. Uses 83 | * hard-coded login information of our group's SQL connection. 84 | */ 85 | private static void establishConnection() { 86 | try { // Access the JDBC driver 87 | Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver"); 88 | } catch (ClassNotFoundException e) { 89 | System.out.println("No JDBC driver found, exiting."); 90 | } 91 | 92 | try { // Connect to Cypress 93 | dbConnection = DriverManager 94 | .getConnection("jdbc:sqlserver://cypress.csil.sfu.ca;" 95 | + " user = c275g01; password = TAA2Md7nGrPj2LjN"); 96 | } catch (SQLException e) { 97 | System.out.println("Connection failed, exiting."); 98 | } 99 | } 100 | 101 | /* 102 | * Method to convert a boolean value to either 0 or 1 to be used as a bit in 103 | * SQL queries. 104 | */ 105 | private static int boolToBit(boolean b) { 106 | return b ? 1 : 0; 107 | } 108 | } 109 | 110 | 111 | -------------------------------------------------------------------------------- /src/difflib/myers/DifferentiationFailedException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ==================================================================== 3 | * 4 | * The Apache Software License, Version 1.1 5 | * 6 | * Copyright (c) 1999-2003 The Apache Software Foundation. 7 | * All rights reserved. 8 | * 9 | * Redistribution and use in source and binary forms, with or without 10 | * modification, are permitted provided that the following conditions 11 | * are met: 12 | * 13 | * 1. Redistributions of source code must retain the above copyright 14 | * notice, this list of conditions and the following disclaimer. 15 | * 16 | * 2. Redistributions in binary form must reproduce the above copyright 17 | * notice, this list of conditions and the following disclaimer in 18 | * the documentation and/or other materials provided with the 19 | * distribution. 20 | * 21 | * 3. The end-user documentation included with the redistribution, if 22 | * any, must include the following acknowledgement: 23 | * "This product includes software developed by the 24 | * Apache Software Foundation (http://www.apache.org/)." 25 | * Alternately, this acknowledgement may appear in the software itself, 26 | * if and wherever such third-party acknowledgements normally appear. 27 | * 28 | * 4. The names "The Jakarta Project", "Commons", and "Apache Software 29 | * Foundation" must not be used to endorse or promote products derived 30 | * from this software without prior written permission. For written 31 | * permission, please contact apache@apache.org. 32 | * 33 | * 5. Products derived from this software may not be called "Apache" 34 | * nor may "Apache" appear in their names without prior written 35 | * permission of the Apache Software Foundation. 36 | * 37 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED 38 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 39 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 40 | * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR 41 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 42 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 43 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 44 | * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 45 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 46 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 47 | * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 48 | * SUCH DAMAGE. 49 | * ==================================================================== 50 | * 51 | * This software consists of voluntary contributions made by many 52 | * individuals on behalf of the Apache Software Foundation. For more 53 | * information on the Apache Software Foundation, please see 54 | * . 55 | * 56 | */ 57 | 58 | package difflib.myers; 59 | 60 | /** 61 | * Thrown whenever the differencing engine cannot produce the differences 62 | * between two revisions of ta text. 63 | * 64 | * @version $Revision: 69 $ $Date: 2003-10-13 11:00:44 +0300 (Пнд, 13 Окт 2003) $ 65 | * 66 | * @author Juanco Anez 67 | * @see MyersDiff 68 | * @see difflib.DiffAlgorithm 69 | */ 70 | public class DifferentiationFailedException extends DiffException { 71 | private static final long serialVersionUID = 1L; 72 | 73 | public DifferentiationFailedException() { 74 | } 75 | 76 | public DifferentiationFailedException(String msg) { 77 | super(msg); 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /src/gui/SettingsPage.form: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 |
65 | -------------------------------------------------------------------------------- /nbproject/project.properties: -------------------------------------------------------------------------------- 1 | annotation.processing.enabled=true 2 | annotation.processing.enabled.in.editor=false 3 | annotation.processing.processor.options= 4 | annotation.processing.processors.list= 5 | annotation.processing.run.all.processors=true 6 | annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output 7 | build.classes.dir=${build.dir}/classes 8 | build.classes.excludes=**/*.java,**/*.form 9 | # This directory is removed when the project is cleaned: 10 | build.dir=build 11 | build.generated.dir=${build.dir}/generated 12 | build.generated.sources.dir=${build.dir}/generated-sources 13 | # Only compile against the classpath explicitly listed here: 14 | build.sysclasspath=ignore 15 | build.test.classes.dir=${build.dir}/test/classes 16 | build.test.results.dir=${build.dir}/test/results 17 | # Uncomment to specify the preferred debugger connection transport: 18 | #debug.transport=dt_socket 19 | debug.classpath=\ 20 | ${run.classpath} 21 | debug.test.classpath=\ 22 | ${run.test.classpath} 23 | # Files in build.classes.dir which should be excluded from distribution jar 24 | dist.archive.excludes= 25 | # This directory is removed when the project is cleaned: 26 | dist.dir=dist 27 | dist.jar=${dist.dir}/MarkShark.jar 28 | dist.javadoc.dir=${dist.dir}/javadoc 29 | excludes= 30 | file.reference.batik-awt-util.jar=src\\lib\\batik-awt-util.jar 31 | file.reference.batik-dom.jar=src\\lib\\batik-dom.jar 32 | file.reference.batik-svg-dom.jar=src\\lib\\batik-svg-dom.jar 33 | file.reference.batik-svggen.jar=src\\lib\\batik-svggen.jar 34 | file.reference.batik-util.jar=src\\lib\\batik-util.jar 35 | file.reference.batik-xml.jar=src\\lib\\batik-xml.jar 36 | file.reference.icepdf-core.jar=src\\lib\\icepdf-core.jar 37 | file.reference.icepdf-viewer.jar=src\\lib\\icepdf-viewer.jar 38 | file.reference.java-src=src 39 | file.reference.sqljdbc4.jar=/Users/Pun/Downloads/sqljdbc_4.0/enu/sqljdbc4.jar 40 | file.reference.sqljdbc4.jar-1=C:\\Users\\toeri_000\\Downloads\\Microsoft JDBC Driver 4.0 for SQL Server\\sqljdbc_4.0\\enu\\sqljdbc4.jar 41 | includes=** 42 | jar.compress=false 43 | javac.classpath=\ 44 | ${file.reference.sqljdbc4.jar}:\ 45 | ${file.reference.sqljdbc4.jar-1}:\ 46 | ${file.reference.icepdf-core.jar}:\ 47 | ${file.reference.batik-awt-util.jar}:\ 48 | ${file.reference.batik-dom.jar}:\ 49 | ${file.reference.batik-svg-dom.jar}:\ 50 | ${file.reference.batik-svggen.jar}:\ 51 | ${file.reference.batik-util.jar}:\ 52 | ${file.reference.batik-xml.jar}:\ 53 | ${file.reference.icepdf-viewer.jar} 54 | # Space-separated list of extra javac options 55 | javac.compilerargs= 56 | javac.deprecation=false 57 | javac.processorpath=\ 58 | ${javac.classpath} 59 | javac.source=1.8 60 | javac.target=1.8 61 | javac.test.classpath=\ 62 | ${javac.classpath}:\ 63 | ${build.classes.dir} 64 | javac.test.processorpath=\ 65 | ${javac.test.classpath} 66 | javadoc.additionalparam= 67 | javadoc.author=false 68 | javadoc.encoding=${source.encoding} 69 | javadoc.noindex=false 70 | javadoc.nonavbar=false 71 | javadoc.notree=false 72 | javadoc.private=false 73 | javadoc.splitindex=true 74 | javadoc.use=true 75 | javadoc.version=false 76 | javadoc.windowtitle= 77 | main.class=MarkShark 78 | manifest.file=manifest.mf 79 | meta.inf.dir=${src.dir}/META-INF 80 | mkdist.disabled=false 81 | platform.active=default_platform 82 | run.classpath=\ 83 | ${javac.classpath}:\ 84 | ${build.classes.dir} 85 | # Space-separated list of JVM arguments used when running the project. 86 | # You may also define separate properties like run-sys-prop.name=value instead of -Dname=value. 87 | # To set system properties for unit tests define test-sys-prop.name=value: 88 | run.jvmargs= 89 | run.test.classpath=\ 90 | ${javac.test.classpath}:\ 91 | ${build.test.classes.dir} 92 | source.encoding=UTF-8 93 | src.dir=${file.reference.java-src} 94 | -------------------------------------------------------------------------------- /src/gui/LogManagement.java: -------------------------------------------------------------------------------- 1 | /* 2 | * To change this license header, choose License Headers in Project Properties. 3 | * To change this template file, choose Tools | Templates 4 | * and open the template in the editor. 5 | */ 6 | 7 | package gui; 8 | 9 | import gui.types.*; 10 | import types.*; 11 | 12 | /** 13 | * 14 | * @author colin 15 | */ 16 | public class LogManagement extends MSPanel { 17 | private SystemAdmin a; 18 | 19 | /** 20 | * Creates new form LandingPageSysAdmin 21 | */ 22 | public LogManagement() { 23 | super("System Administrator"); 24 | initComponents(); 25 | } 26 | 27 | /** 28 | * This method is called from within the constructor to initialize the form. 29 | * WARNING: Do NOT modify this code. The content of this method is always 30 | * regenerated by the Form Editor. 31 | */ 32 | @SuppressWarnings("unchecked") 33 | // //GEN-BEGIN:initComponents 34 | private void initComponents() { 35 | 36 | tasks_panel = new javax.swing.JPanel(); 37 | system_log_scrollpane = new javax.swing.JScrollPane(); 38 | system_log_textpane = new javax.swing.JTextPane(); 39 | 40 | tasks_panel.setBorder(javax.swing.BorderFactory.createTitledBorder("System Log")); 41 | 42 | system_log_scrollpane.setViewportView(system_log_textpane); 43 | 44 | javax.swing.GroupLayout tasks_panelLayout = new javax.swing.GroupLayout(tasks_panel); 45 | tasks_panel.setLayout(tasks_panelLayout); 46 | tasks_panelLayout.setHorizontalGroup( 47 | tasks_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 48 | .addGroup(tasks_panelLayout.createSequentialGroup() 49 | .addContainerGap() 50 | .addComponent(system_log_scrollpane, javax.swing.GroupLayout.DEFAULT_SIZE, 480, Short.MAX_VALUE) 51 | .addContainerGap()) 52 | ); 53 | tasks_panelLayout.setVerticalGroup( 54 | tasks_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 55 | .addGroup(tasks_panelLayout.createSequentialGroup() 56 | .addContainerGap() 57 | .addComponent(system_log_scrollpane, javax.swing.GroupLayout.DEFAULT_SIZE, 237, Short.MAX_VALUE) 58 | .addContainerGap()) 59 | ); 60 | 61 | javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); 62 | this.setLayout(layout); 63 | layout.setHorizontalGroup( 64 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 65 | .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() 66 | .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) 67 | .addComponent(tasks_panel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 68 | .addContainerGap()) 69 | ); 70 | layout.setVerticalGroup( 71 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 72 | .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() 73 | .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) 74 | .addComponent(tasks_panel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 75 | .addContainerGap()) 76 | ); 77 | }// //GEN-END:initComponents 78 | 79 | 80 | // Variables declaration - do not modify//GEN-BEGIN:variables 81 | private javax.swing.JScrollPane system_log_scrollpane; 82 | private javax.swing.JTextPane system_log_textpane; 83 | private javax.swing.JPanel tasks_panel; 84 | // End of variables declaration//GEN-END:variables 85 | } 86 | -------------------------------------------------------------------------------- /src/gui/LogManagement.form: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 |
82 | -------------------------------------------------------------------------------- /src/difflib/myers/Snake.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ==================================================================== 3 | * 4 | * The Apache Software License, Version 1.1 5 | * 6 | * Copyright (c) 1999-2003 The Apache Software Foundation. 7 | * All rights reserved. 8 | * 9 | * Redistribution and use in source and binary forms, with or without 10 | * modification, are permitted provided that the following conditions 11 | * are met: 12 | * 13 | * 1. Redistributions of source code must retain the above copyright 14 | * notice, this list of conditions and the following disclaimer. 15 | * 16 | * 2. Redistributions in binary form must reproduce the above copyright 17 | * notice, this list of conditions and the following disclaimer in 18 | * the documentation and/or other materials provided with the 19 | * distribution. 20 | * 21 | * 3. The end-user documentation included with the redistribution, if 22 | * any, must include the following acknowledgement: 23 | * "This product includes software developed by the 24 | * Apache Software Foundation (http://www.apache.org/)." 25 | * Alternately, this acknowledgement may appear in the software itself, 26 | * if and wherever such third-party acknowledgements normally appear. 27 | * 28 | * 4. The names "The Jakarta Project", "Commons", and "Apache Software 29 | * Foundation" must not be used to endorse or promote products derived 30 | * from this software without prior written permission. For written 31 | * permission, please contact apache@apache.org. 32 | * 33 | * 5. Products derived from this software may not be called "Apache" 34 | * nor may "Apache" appear in their names without prior written 35 | * permission of the Apache Software Foundation. 36 | * 37 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED 38 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 39 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 40 | * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR 41 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 42 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 43 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 44 | * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 45 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 46 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 47 | * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 48 | * SUCH DAMAGE. 49 | * ==================================================================== 50 | * 51 | * This software consists of voluntary contributions made by many 52 | * individuals on behalf of the Apache Software Foundation. For more 53 | * information on the Apache Software Foundation, please see 54 | * . 55 | * 56 | */ 57 | 58 | package difflib.myers; 59 | 60 | /** 61 | * Represents a snake in a diffpath. 62 | *

63 | * 64 | * {@link DiffNode DiffNodes} and {@link Snake Snakes} allow for compression 65 | * of diffpaths, as each snake is represented by a single {@link Snake Snake} 66 | * node and each contiguous series of insertions and deletions is represented 67 | * by a single {@link DiffNode DiffNodes}. 68 | * 69 | * @version $Revision: 69 $ $Date: 2003-10-13 11:00:44 +0300 (Пнд, 13 Окт 2003) $ 70 | * @author Juanco Anez 71 | * 72 | */ 73 | public final class Snake extends PathNode { 74 | /** 75 | * Constructs a snake node. 76 | * 77 | * @param the position in the original sequence 78 | * @param the position in the revised sequence 79 | * @param prev the previous node in the path. 80 | */ 81 | public Snake(int i, int j, PathNode prev) { 82 | super(i, j, prev); 83 | } 84 | 85 | /** 86 | * {@inheritDoc} 87 | * @return true always 88 | */ 89 | public boolean isSnake() { 90 | return true; 91 | } 92 | 93 | } -------------------------------------------------------------------------------- /src/difflib/DiffRow.java: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2010 Dmitry Naumenko (dm.naumenko@gmail.com) 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | package difflib; 17 | 18 | /** 19 | * Describes the diff row in form [tag, oldLine, newLine) for showing the 20 | * difference between two texts 21 | * 22 | * @author Dmitry Naumenko 23 | */ 24 | public class DiffRow { 25 | private Tag tag; 26 | private String oldLine; 27 | private String newLine; 28 | 29 | public DiffRow(Tag tag, String oldLine, String newLine) { 30 | this.tag = tag; 31 | this.oldLine = oldLine; 32 | this.newLine = newLine; 33 | } 34 | 35 | public enum Tag { 36 | INSERT, DELETE, CHANGE, EQUAL 37 | } 38 | 39 | /** 40 | * @return the tag 41 | */ 42 | public Tag getTag() { 43 | return tag; 44 | } 45 | 46 | /** 47 | * @param tag the tag to set 48 | */ 49 | public void setTag(Tag tag) { 50 | this.tag = tag; 51 | } 52 | 53 | /** 54 | * @return the oldLine 55 | */ 56 | public String getOldLine() { 57 | return oldLine; 58 | } 59 | 60 | /** 61 | * @param oldLine the oldLine to set 62 | */ 63 | public void setOldLine(String oldLine) { 64 | this.oldLine = oldLine; 65 | } 66 | 67 | /** 68 | * @return the newLine 69 | */ 70 | public String getNewLine() { 71 | return newLine; 72 | } 73 | 74 | /** 75 | * @param newLine the newLine to set 76 | */ 77 | public void setNewLine(String newLine) { 78 | this.newLine = newLine; 79 | } 80 | 81 | /* 82 | * (non-Javadoc) 83 | * 84 | * @see java.lang.Object#hashCode() 85 | */ 86 | @Override 87 | public int hashCode() { 88 | final int prime = 31; 89 | int result = 1; 90 | result = prime * result + ((newLine == null) ? 0 : newLine.hashCode()); 91 | result = prime * result + ((oldLine == null) ? 0 : oldLine.hashCode()); 92 | result = prime * result + ((tag == null) ? 0 : tag.hashCode()); 93 | return result; 94 | } 95 | 96 | /* 97 | * (non-Javadoc) 98 | * 99 | * @see java.lang.Object#equals(java.lang.Object) 100 | */ 101 | @Override 102 | public boolean equals(Object obj) { 103 | if (this == obj) 104 | return true; 105 | if (obj == null) 106 | return false; 107 | if (getClass() != obj.getClass()) 108 | return false; 109 | DiffRow other = (DiffRow) obj; 110 | if (newLine == null) { 111 | if (other.newLine != null) 112 | return false; 113 | } else if (!newLine.equals(other.newLine)) 114 | return false; 115 | if (oldLine == null) { 116 | if (other.oldLine != null) 117 | return false; 118 | } else if (!oldLine.equals(other.oldLine)) 119 | return false; 120 | if (tag == null) { 121 | if (other.tag != null) 122 | return false; 123 | } else if (!tag.equals(other.tag)) 124 | return false; 125 | return true; 126 | } 127 | 128 | public String toString() { 129 | return "[" + this.tag + "," + this.oldLine + "," + this.newLine + "]"; 130 | } 131 | } 132 | -------------------------------------------------------------------------------- /src/shell/ThreadedStreamHandler.java: -------------------------------------------------------------------------------- 1 | package shell; 2 | 3 | import java.io.*; 4 | 5 | /** 6 | * This class is intended to be used with the SystemCommandExecutor 7 | * class to let users execute system commands from Java applications. 8 | * 9 | * This class is based on work that was shared in a JavaWorld article 10 | * named "When System.exec() won't". That article is available at this 11 | * url: 12 | * 13 | * http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html 14 | * 15 | * Documentation for this class is available at this URL: 16 | * 17 | * http://devdaily.com/java/java-processbuilder-process-system-exec 18 | * 19 | * 20 | * Copyright 2010 alvin j. alexander, devdaily.com. 21 | * 22 | * This program is free software: you can redistribute it and/or modify 23 | * it under the terms of the GNU Lesser Public License as published by 24 | * the Free Software Foundation, either version 3 of the License, or 25 | * (at your option) any later version. 26 | 27 | * This program is distributed in the hope that it will be useful, 28 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 29 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 30 | * GNU Lesser Public License for more details. 31 | 32 | * You should have received a copy of the GNU Lesser Public License 33 | * along with this program. If not, see . 34 | * 35 | * Please ee the following page for the LGPL license: 36 | * http://www.gnu.org/licenses/lgpl.txt 37 | * 38 | */ 39 | class ThreadedStreamHandler extends Thread { 40 | InputStream inputStream; 41 | String adminPassword; 42 | OutputStream outputStream; 43 | PrintWriter printWriter; 44 | StringBuilder outputBuffer = new StringBuilder(); 45 | private boolean sudoIsRequested = false; 46 | 47 | /** 48 | * A simple constructor for when the sudo command is not necessary. 49 | * This constructor will just run the command you provide, without 50 | * running sudo before the command, and without expecting a password. 51 | * 52 | * @param inputStream 53 | * @param streamType 54 | */ 55 | ThreadedStreamHandler(InputStream inputStream) { 56 | this.inputStream = inputStream; 57 | } 58 | 59 | /** 60 | * Use this constructor when you want to invoke the 'sudo' command. 61 | * The outputStream must not be null. If it is, you'll regret it. :) 62 | * 63 | * TODO this currently hangs if the admin password given for the sudo command is wrong. 64 | * 65 | * @param inputStream 66 | * @param streamType 67 | * @param outputStream 68 | * @param adminPassword 69 | */ 70 | ThreadedStreamHandler(InputStream inputStream, OutputStream outputStream, String adminPassword) { 71 | this.inputStream = inputStream; 72 | this.outputStream = outputStream; 73 | this.printWriter = new PrintWriter(outputStream); 74 | this.adminPassword = adminPassword; 75 | this.sudoIsRequested = true; 76 | } 77 | 78 | public void run() { 79 | // on mac os x 10.5.x, when i run a 'sudo' command, i need to write 80 | // the admin password out immediately; that's why this code is 81 | // here. 82 | if (sudoIsRequested) { 83 | //doSleep(500); 84 | printWriter.println(adminPassword); 85 | printWriter.flush(); 86 | } 87 | 88 | BufferedReader bufferedReader = null; 89 | try { 90 | bufferedReader = new BufferedReader(new InputStreamReader(inputStream)); 91 | String line = null; 92 | while ((line = bufferedReader.readLine()) != null) { 93 | outputBuffer.append(line + "\n"); 94 | } 95 | } catch (IOException ioe) { 96 | // TODO handle this better 97 | ioe.printStackTrace(); 98 | } catch (Throwable t) { 99 | // TODO handle this better 100 | t.printStackTrace(); 101 | } finally { 102 | try { 103 | bufferedReader.close(); 104 | } catch (IOException e) { 105 | // ignore this one 106 | } 107 | } 108 | } 109 | 110 | private void doSleep(long millis) { 111 | try { 112 | Thread.sleep(millis); 113 | } catch (InterruptedException e) { 114 | // ignore 115 | } 116 | } 117 | 118 | public StringBuilder getOutputBuffer() { 119 | return outputBuffer; 120 | } 121 | } 122 | -------------------------------------------------------------------------------- /src/gui/LandingPageTA.form: -------------------------------------------------------------------------------- 1 | 2 | 3 |

4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 |
85 | -------------------------------------------------------------------------------- /src/gui/LandingPageAdmin.form: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 |
85 | -------------------------------------------------------------------------------- /src/gui/LandingPageTA.java: -------------------------------------------------------------------------------- 1 | /* 2 | * To change this license header, choose License Headers in Project Properties. 3 | * To change this template file, choose Tools | Templates 4 | * and open the template in the editor. 5 | */ 6 | 7 | package gui; 8 | 9 | import javax.swing.*; 10 | import gui.utils.*; 11 | import gui.types.*; 12 | import types.*; 13 | 14 | /** 15 | * 16 | * @author Normal 17 | */ 18 | public class LandingPageTA extends MSPanel { 19 | private TATM a; 20 | 21 | /** 22 | * Creates new form LandingPageTA 23 | */ 24 | public LandingPageTA(TATM a) { 25 | super("TA/TM"); 26 | this.a = a; 27 | 28 | initComponents(); 29 | } 30 | 31 | /** 32 | * This method is called from within the constructor to initialize the form. 33 | * WARNING: Do NOT modify this code. The content of this method is always 34 | * regenerated by the Form Editor. 35 | */ 36 | @SuppressWarnings("unchecked") 37 | // //GEN-BEGIN:initComponents 38 | private void initComponents() { 39 | 40 | tasks_panel = new JPanel(); 41 | marking_button = new JButton(); 42 | 43 | tasks_panel.setBorder(BorderFactory.createTitledBorder("Tasks")); 44 | 45 | marking_button.setText("Marking"); 46 | marking_button.addActionListener(new java.awt.event.ActionListener() { 47 | public void actionPerformed(java.awt.event.ActionEvent evt) { 48 | marking_buttonActionPerformed(evt); 49 | } 50 | }); 51 | 52 | GroupLayout tasks_panelLayout = new GroupLayout(tasks_panel); 53 | tasks_panel.setLayout(tasks_panelLayout); 54 | tasks_panelLayout.setHorizontalGroup( 55 | tasks_panelLayout.createParallelGroup(GroupLayout.Alignment.LEADING) 56 | .addGroup(tasks_panelLayout.createSequentialGroup() 57 | .addGap(165, 165, 165) 58 | .addComponent(marking_button, GroupLayout.PREFERRED_SIZE, 133, GroupLayout.PREFERRED_SIZE) 59 | .addContainerGap(166, Short.MAX_VALUE)) 60 | ); 61 | tasks_panelLayout.setVerticalGroup( 62 | tasks_panelLayout.createParallelGroup(GroupLayout.Alignment.LEADING) 63 | .addGroup(tasks_panelLayout.createSequentialGroup() 64 | .addGap(131, 131, 131) 65 | .addComponent(marking_button) 66 | .addContainerGap(142, Short.MAX_VALUE)) 67 | ); 68 | 69 | GroupLayout layout = new GroupLayout(this); 70 | this.setLayout(layout); 71 | layout.setHorizontalGroup( 72 | layout.createParallelGroup(GroupLayout.Alignment.LEADING) 73 | .addGap(0, 496, Short.MAX_VALUE) 74 | .addGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING) 75 | .addGroup(layout.createSequentialGroup() 76 | .addContainerGap() 77 | .addComponent(tasks_panel, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) 78 | .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))) 79 | ); 80 | layout.setVerticalGroup( 81 | layout.createParallelGroup(GroupLayout.Alignment.LEADING) 82 | .addGap(0, 341, Short.MAX_VALUE) 83 | .addGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING) 84 | .addGroup(layout.createSequentialGroup() 85 | .addContainerGap() 86 | .addComponent(tasks_panel, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) 87 | .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))) 88 | ); 89 | }// //GEN-END:initComponents 90 | 91 | private void marking_buttonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_marking_buttonActionPerformed 92 | GUIUtils.getMasterFrame(this).movePage(new CourseSelection(TA_MARKING, a)); 93 | }//GEN-LAST:event_marking_buttonActionPerformed 94 | 95 | private static final int TA_MARKING = 7; 96 | 97 | // Variables declaration - do not modify//GEN-BEGIN:variables 98 | private JButton marking_button; 99 | private JPanel tasks_panel; 100 | // End of variables declaration//GEN-END:variables 101 | } 102 | -------------------------------------------------------------------------------- /final/README.txt: -------------------------------------------------------------------------------- 1 | **PLEASE READ IN WORDPAD FOR PROPER FORMATTING 2 | 3 | ,,,,, 4 | ,,,,, 5 | ,,,````, 6 | ,,,````, 7 | ,,,,```::`,, 8 | '' ' '''''''' ,,,, ,,``````````,,, 9 | '' ' '''''''' ,,,, ,,``````````,,, 10 | ''' ''' ' ,''''',,,, ,,,,```````````,,,, 11 | ''' ''' ' ,''''',,,, ,,,,```````````,,,, 12 | '' '' ' ''''' ,,''''''', ,,,``````````````, 13 | '' ' '' ,,'''''''',,,,,,,'',```````````````,, 14 | '' ' '' ,,'''''''',,,,,,,'',```````````````,, 15 | '' ' '''''''' ,,''''''''''''''',`````````````````,, 16 | '' ' '''''''' ,,''''''''''''''',`````````````````,, 17 | ,,''''''''''''''',`````````````````,, 18 | ,,;;''''''''''''',,`````:``````````````, 19 | ,,;;''''''''''''',,`````:``````````````, 20 | ,''''''''''''''',,```````:::``````````::`,, 21 | ,''''''''''''''',,```````:::``````````::`,, 22 | ,,, ,,''''''''''''''''`````````````````````````,, 23 | ,,''''',, ,,'''''''''''''''''```````````````,,,,,`````, 24 | ,,''''',, ,,'''''''''''''''''```````````````,,,,,`````, 25 | ,,''''',,, ,'''''''''''''''''```````````````,,, ,,,,, 26 | ,,''''',,, ,'''''''''''''''''```````````````,,, ,,,,, 27 | ,''''''',,,,,,,''''''''''''''''''````````````,,,,, 28 | ,,'''''''''''''''''''''''````'''''``````````, 29 | ,,'''''''''''''''''''''''````'''''``````````, 30 | ,,'''''''''''''````````````'''''```''''''', 31 | ,,'''''''''''''````````````'''''```''''''', 32 | ,'''''''''```````````,,,,'''''',,,,'''''',, 33 | ,,''''',,,,,,,,,,,,,,, '''''' ,''''',, 34 | ,,''''',,,,,,,,,,,,,,, '''''' ,''''',, 35 | ,,''',, ''''', ,,''',, 36 | ,,''',, ''''', ,,''',, 37 | ,''''',, ''''', ,,',, 38 | ,'''', ''',, , 39 | ,'''', ''',, , 40 | ,,''',, ,,, 41 | ,,''',, ,,, 42 | ,,''',, 43 | ,,, 44 | ,,, 45 | 46 | Assumed software present on CSIL Computers: 47 | =========================================== 48 | - Python 2.7 (Filepath: "C:\Python27\python") 49 | - Java JRE/JDK 1.7 50 | - Windows Vista or newer 51 | - Microsoft SQL Server 2003 or newer 52 | - Eclipse IDE 53 | 54 | 55 | Connections to External Servers: 56 | ================================ 57 | - SFU Cypress Database 58 | 59 | 60 | Instructions to Build from Included Files: 61 | ========================================== 62 | - Unzip the project archive. 63 | - Open Eclipse and create a project based in the top level of the decompressed folder. 64 | - Appropriate JAR libraries will be included automatically by Eclipse. 65 | - Export the project as a runnable JAR file. (Make sure to click 'package required libraries...' option) 66 | 67 | 68 | Last Two Parts of Getting Started Section: 69 | ========================================== 70 | 71 | Running the Application: 72 | ------------------------ 73 | - Double-click on the provided "MarkShark.jar" 74 | - Confirm network connection. 75 | - Log into the system with a valid user account. 76 | - Follow the instructions provided in this manual for the desired use case. 77 | 78 | Application Installation for UAT: 79 | --------------------------------- 80 | - Unzip the project archive. 81 | - Open Eclipse and create a project based in the top level of the decompressed folder. 82 | - Appropriate JAR libraries will be included automatically by Eclipse. 83 | - Export the project as a runnable JAR file. (Make sure to click 'package required libraries...' option) 84 | - If desired, run the MarkShark.jar file to start the program. 85 | -------------------------------------------------------------------------------- /src/gui/LandingPageAssistAdmin.form: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 |
89 | -------------------------------------------------------------------------------- /src/gui/LandingPageAdmin.java: -------------------------------------------------------------------------------- 1 | /* 2 | * To change this license header, choose License Headers in Project Properties. 3 | * To change this template file, choose Tools | Templates 4 | * and open the template in the editor. 5 | */ 6 | 7 | package gui; 8 | 9 | import gui.utils.*; 10 | import gui.types.*; 11 | import types.*; 12 | 13 | /** 14 | * 15 | * @author Ian 16 | */ 17 | public class LandingPageAdmin extends MSPanel { 18 | private AcademicAdmin a; 19 | 20 | /** 21 | * Creates new form LandingPageAdmin1 22 | */ 23 | public LandingPageAdmin(AcademicAdmin a) { 24 | super("Academic Administrator"); 25 | this.a = a; 26 | 27 | initComponents(); 28 | } 29 | 30 | /** 31 | * This method is called from within the constructor to initialize the form. 32 | * WARNING: Do NOT modify this code. The content of this method is always 33 | * regenerated by the Form Editor. 34 | */ 35 | @SuppressWarnings("unchecked") 36 | // //GEN-BEGIN:initComponents 37 | private void initComponents() { 38 | 39 | tasks_panel = new javax.swing.JPanel(); 40 | manage_grades_button = new javax.swing.JButton(); 41 | 42 | tasks_panel.setBorder(javax.swing.BorderFactory.createTitledBorder("Tasks")); 43 | 44 | manage_grades_button.setText("Manage Grades"); 45 | manage_grades_button.addActionListener(new java.awt.event.ActionListener() { 46 | public void actionPerformed(java.awt.event.ActionEvent evt) { 47 | manage_grades_buttonActionPerformed(evt); 48 | } 49 | }); 50 | 51 | javax.swing.GroupLayout tasks_panelLayout = new javax.swing.GroupLayout(tasks_panel); 52 | tasks_panel.setLayout(tasks_panelLayout); 53 | tasks_panelLayout.setHorizontalGroup( 54 | tasks_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 55 | .addGroup(tasks_panelLayout.createSequentialGroup() 56 | .addGap(120, 120, 120) 57 | .addComponent(manage_grades_button, javax.swing.GroupLayout.PREFERRED_SIZE, 131, javax.swing.GroupLayout.PREFERRED_SIZE) 58 | .addContainerGap(117, Short.MAX_VALUE)) 59 | ); 60 | tasks_panelLayout.setVerticalGroup( 61 | tasks_panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 62 | .addGroup(tasks_panelLayout.createSequentialGroup() 63 | .addGap(117, 117, 117) 64 | .addComponent(manage_grades_button) 65 | .addContainerGap(128, Short.MAX_VALUE)) 66 | ); 67 | 68 | javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); 69 | this.setLayout(layout); 70 | layout.setHorizontalGroup( 71 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 72 | .addGap(0, 400, Short.MAX_VALUE) 73 | .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 74 | .addGroup(layout.createSequentialGroup() 75 | .addContainerGap() 76 | .addComponent(tasks_panel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 77 | .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))) 78 | ); 79 | layout.setVerticalGroup( 80 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 81 | .addGap(0, 306, Short.MAX_VALUE) 82 | .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 83 | .addGroup(layout.createSequentialGroup() 84 | .addGap(4, 4, 4) 85 | .addComponent(tasks_panel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 86 | .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))) 87 | ); 88 | }// //GEN-END:initComponents 89 | 90 | private void manage_grades_buttonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_manage_grades_buttonActionPerformed 91 | GUIUtils.getMasterFrame(this).movePage(new CourseSelection(GRADING, a)); 92 | }//GEN-LAST:event_manage_grades_buttonActionPerformed 93 | 94 | private static final int GRADING = 5; 95 | private static final int VIEWING = 6; 96 | 97 | // Variables declaration - do not modify//GEN-BEGIN:variables 98 | private javax.swing.JButton manage_grades_button; 99 | private javax.swing.JPanel tasks_panel; 100 | // End of variables declaration//GEN-END:variables 101 | } 102 | -------------------------------------------------------------------------------- /src/gui/LandingPageInstructor.form: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 |
92 | -------------------------------------------------------------------------------- /src/gui/SettingsPage.java: -------------------------------------------------------------------------------- 1 | /* 2 | * To change this license header, choose License Headers in Project Properties. 3 | * To change this template file, choose Tools | Templates 4 | * and open the template in the editor. 5 | */ 6 | 7 | package gui; 8 | 9 | import database.AccountAccess; 10 | 11 | import javax.swing.*; 12 | 13 | import java.awt.event.*; 14 | import gui.utils.*; 15 | import gui.types.MSPanel; 16 | import types.Account; 17 | 18 | /** 19 | * 20 | * @author Colin 21 | */ 22 | public class SettingsPage extends MSPanel { 23 | private Account a; 24 | 25 | /** 26 | * Creates new form SettingsPage 27 | */ 28 | public SettingsPage(Account a) { 29 | super("User Settings"); 30 | 31 | this.a = a; 32 | 33 | initComponents(); 34 | } 35 | 36 | /** 37 | * This method is called from within the constructor to initialize the form. 38 | * WARNING: Do NOT modify this code. The content of this method is always 39 | * regenerated by the Form Editor. 40 | */ 41 | @SuppressWarnings("unchecked") 42 | // //GEN-BEGIN:initComponents 43 | private void initComponents() { 44 | 45 | jLabel1 = new javax.swing.JLabel(); 46 | curr_pass_field = new javax.swing.JPasswordField(); 47 | jLabel2 = new javax.swing.JLabel(); 48 | new_pass_field = new javax.swing.JPasswordField(); 49 | jLabel3 = new javax.swing.JLabel(); 50 | new_pass_field2 = new javax.swing.JPasswordField(); 51 | confirm_button = new javax.swing.JButton(); 52 | cancel_button = new javax.swing.JButton(); 53 | 54 | setLayout(new java.awt.GridLayout(4, 2, 20, 50)); 55 | 56 | jLabel1.setText("Current Password"); 57 | jLabel1.setName("curr_pass"); // NOI18N 58 | add(jLabel1); 59 | add(curr_pass_field); 60 | 61 | jLabel2.setText("New Password"); 62 | add(jLabel2); 63 | add(new_pass_field); 64 | 65 | jLabel3.setText("Repeat New Password"); 66 | add(jLabel3); 67 | add(new_pass_field2); 68 | 69 | confirm_button.setText("Confirm"); 70 | confirm_button.setName("confirm_button"); // NOI18N 71 | confirm_button.addActionListener(new java.awt.event.ActionListener() { 72 | public void actionPerformed(java.awt.event.ActionEvent evt) { 73 | confirm_buttonActionPerformed(evt); 74 | } 75 | }); 76 | add(confirm_button); 77 | 78 | cancel_button.setText("Cancel"); 79 | cancel_button.addActionListener(new java.awt.event.ActionListener() { 80 | public void actionPerformed(java.awt.event.ActionEvent evt) { 81 | cancel_buttonActionPerformed(evt); 82 | } 83 | }); 84 | add(cancel_button); 85 | }// //GEN-END:initComponents 86 | 87 | private void confirm_buttonActionPerformed(ActionEvent evt) {//GEN-FIRST:event_confirm_buttonActionPerformed 88 | String curr = new String(curr_pass_field.getPassword()); 89 | String newP = new String(new_pass_field.getPassword()); 90 | String newP2 = new String(new_pass_field2.getPassword()); 91 | 92 | if (! curr.equals(a.getPassword())) { 93 | JOptionPane.showMessageDialog(this, "Current password given isn't correct."); 94 | } else if (! newP.equals(newP2)) { 95 | JOptionPane.showMessageDialog(this, "The two new passwords given do not match."); 96 | } else if (newP.isEmpty() || newP2.isEmpty()) { 97 | JOptionPane.showMessageDialog(this, "Empty passwords are not allowed."); 98 | } else { 99 | int choice = JOptionPane.showConfirmDialog(this, "Really reset password?"); 100 | 101 | if (choice == JOptionPane.OK_OPTION) { 102 | a.setPassword(newP); 103 | AccountAccess.modifyAccount(a.getUsername(), a); 104 | 105 | System.out.println("Password changed to " + newP); 106 | } 107 | } 108 | }//GEN-LAST:event_confirm_buttonActionPerformed 109 | 110 | private void cancel_buttonActionPerformed(ActionEvent evt) {//GEN-FIRST:event_cancel_buttonActionPerformed 111 | GUIUtils.getMasterFrame(this).goBack(); 112 | }//GEN-LAST:event_cancel_buttonActionPerformed 113 | 114 | 115 | // Variables declaration - do not modify//GEN-BEGIN:variables 116 | private javax.swing.JButton cancel_button; 117 | private javax.swing.JButton confirm_button; 118 | private javax.swing.JPasswordField curr_pass_field; 119 | private javax.swing.JLabel jLabel1; 120 | private javax.swing.JLabel jLabel2; 121 | private javax.swing.JLabel jLabel3; 122 | private javax.swing.JPasswordField new_pass_field; 123 | private javax.swing.JPasswordField new_pass_field2; 124 | // End of variables declaration//GEN-END:variables 125 | } 126 | -------------------------------------------------------------------------------- /src/lib/versions-licenses.html: -------------------------------------------------------------------------------- 1 | 16 | 17 | 18 | 19 | 20 | ICEpdf v5.0.5 Versions & Licenses 21 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 69 | 71 | 72 | 73 | 74 | 75 | 77 | 79 | 80 | 81 | 82 | 83 | 85 | 87 | 88 | 89 | 90 | 91 | 93 | 95 | 96 | 97 | 98 | 99 | 101 | 103 | 104 | 105 | 106 | 107 | 109 | 111 | 112 | 113 | 114 | 115 | 117 | 119 | 120 | 121 | 122 | 123 | 125 | 127 | 128 | 129 | 130 |
File NameVersionProjectLicense
batik-awt-util.jar1.6 68 | Batik SVG ToolkitlApache License Version 2.0
batik-dom.jar1.6 76 | Batik SVG ToolkitApache License Version 2.0
batik-svg-dom.jar1.6 84 | Batik SVG ToolkitApache License Version 2.0
batik-svggen.jar1.6 92 | Batik SVG ToolkitApache License Version 2.0
batik-util.jar1.6 100 | Batik SVG ToolkitApache License Version 2.0
batik-xml.jar1.6 108 | Batik SVG ToolkitApache License Version 2.0
icepdf-core.jar5.0.5ICEpdf Rendering CoreApache License Version 2.0
icepdf-viewer.jar5.0.5ICEpdf Viewer Reference ImplementationApache License Version 2.0
131 | 132 | 133 | -------------------------------------------------------------------------------- /src/types/Account.java: -------------------------------------------------------------------------------- 1 | package types; 2 | 3 | /** 4 | * @desc: The Abstract Account class is used to hold all attributes 5 | * and methods of the Account object 6 | * @author Chazz Young 7 | */ 8 | public abstract class Account 9 | { 10 | /* 11 | Instructor==4 12 | TA/TM==5 13 | AcAdmin==2 14 | AssAdmin==3 15 | SysAdmin==1 16 | */ 17 | public enum Type { 18 | INSTRUCTOR, 19 | TATMMARKER, 20 | ACADEMICADMIN, 21 | ASSISTANTADMIN, 22 | SYSTEMADMIN 23 | } 24 | 25 | private static final int MAX_FAILS = 5; 26 | 27 | protected String first_name, last_name; 28 | protected Type accountType; 29 | protected String username; 30 | private String password; 31 | protected boolean blocked; 32 | protected int empID; 33 | private int bad_logins; 34 | 35 | public Account(String fn, String ln, int empID, String un, String pass, Type ut) { 36 | first_name = fn; 37 | last_name = ln; 38 | this.empID = empID; 39 | username = un; 40 | password = pass; 41 | //if(ut < 1 || ut > 5){} 42 | setAccountType(ut); 43 | blocked = false; 44 | } 45 | 46 | public void setBlocked(boolean blocked) { 47 | this.blocked = blocked; 48 | } 49 | 50 | public String getFirstName() { 51 | return first_name; 52 | } 53 | 54 | public String getLastName() { 55 | return last_name; 56 | } 57 | 58 | public String getUsername() { 59 | return username; 60 | } 61 | 62 | public int getEmpID() { 63 | return empID; 64 | } 65 | 66 | public Type getAccountType() { 67 | return accountType; 68 | } 69 | 70 | public boolean isBlocked() { 71 | return blocked; 72 | } 73 | 74 | public String getPassword() { 75 | return password; 76 | } 77 | 78 | /** 79 | * @desc: Returns the string representation of the account type. 80 | * @author Chazz Young 81 | */ 82 | public String getAccountTypeString() 83 | { 84 | String toReturn = null; 85 | if(accountType == Type.SYSTEMADMIN) { 86 | toReturn = "System Administrator"; 87 | } else if(accountType == Type.ACADEMICADMIN) { 88 | toReturn = "Academic Administrator"; 89 | } else if(accountType == Type.ASSISTANTADMIN) { 90 | toReturn = "Assistant Academic Administrator"; 91 | } else if(accountType == Type.INSTRUCTOR) { 92 | toReturn = "Instructor"; 93 | } else if(accountType == Type.TATMMARKER) { 94 | toReturn = "TA/TM Marker"; 95 | } else { 96 | toReturn = "Error: invalid account type"; 97 | } 98 | return toReturn; 99 | } 100 | 101 | /** 102 | * @desc: Tests to see if the inputted password is correct. 103 | * @author Chazz Young 104 | */ 105 | public boolean checkPassword(String pass) { 106 | boolean toReturn = false; 107 | if(password.matches(pass)) { 108 | bad_logins = 0; 109 | toReturn = true; 110 | } else { 111 | bad_logins++; 112 | if(bad_logins >= MAX_FAILS){ 113 | System.out.println("This account has been blocked due to the repeated number of failed logins."); 114 | blocked = true; 115 | } 116 | toReturn = false; 117 | } 118 | return toReturn; 119 | } 120 | 121 | public void setUsername(String name) { 122 | username = name; 123 | } 124 | 125 | /** 126 | * @desc Sets the new password. 127 | * @author Chazz Young 128 | */ 129 | public void setPassword(String new_pass) { 130 | password = new_pass; 131 | } 132 | 133 | /** 134 | * @desc: Although the dropdown menu to select the account type will 135 | * be represented by strings, the dropdown menu will actually 136 | * pass an integer value. 137 | */ 138 | public void setAccountType(Type type) { 139 | accountType = type; 140 | } 141 | 142 | public int getAccountTypeAsInt() { 143 | int typeInt; 144 | if (accountType==Type.INSTRUCTOR) { 145 | typeInt = 4; 146 | } 147 | else if (accountType==Type.TATMMARKER) { 148 | typeInt = 5; 149 | } 150 | else if (accountType==Type.ACADEMICADMIN) { 151 | typeInt = 2; 152 | } 153 | else if (accountType==Type.ASSISTANTADMIN) { 154 | typeInt = 3; 155 | } 156 | else if (accountType==Type.SYSTEMADMIN) { 157 | typeInt = 1; 158 | } 159 | else{ 160 | System.out.println("Invalid account type"); 161 | typeInt = 0; 162 | } 163 | return typeInt; 164 | } 165 | 166 | public void unblock() { 167 | blocked = false; 168 | } 169 | } 170 | -------------------------------------------------------------------------------- /src/difflib/Delta.java: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2010 Dmitry Naumenko (dm.naumenko@gmail.com) 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | package difflib; 17 | 18 | import java.util.*; 19 | 20 | /** 21 | * Describes the delta between original and revised texts. 22 | * 23 | * @author Dmitry Naumenko 24 | * @param T The type of the compared elements in the 'lines'. 25 | */ 26 | public abstract class Delta { 27 | 28 | /** The original chunk. */ 29 | private Chunk original; 30 | 31 | /** The revised chunk. */ 32 | private Chunk revised; 33 | 34 | /** 35 | * Specifies the type of the delta. 36 | * 37 | */ 38 | public enum TYPE { 39 | /** A change in the original. */ 40 | CHANGE, 41 | /** A delete from the original. */ 42 | DELETE, 43 | /** An insert into the original. */ 44 | INSERT 45 | } 46 | 47 | /** 48 | * Construct the delta for original and revised chunks 49 | * 50 | * @param original Chunk describing the original text. Must not be {@code null}. 51 | * @param revised Chunk describing the revised text. Must not be {@code null}. 52 | */ 53 | public Delta(Chunk original, Chunk revised) { 54 | if (original == null) { 55 | throw new IllegalArgumentException("original must not be null"); 56 | } 57 | if (revised == null) { 58 | throw new IllegalArgumentException("revised must not be null"); 59 | } 60 | this.original = original; 61 | this.revised = revised; 62 | } 63 | 64 | /** 65 | * Verifies that this delta can be used to patch the given text. 66 | * 67 | * @param target the text to patch. 68 | * @throws PatchFailedException if the patch cannot be applied. 69 | */ 70 | public abstract void verify(List target) throws PatchFailedException; 71 | 72 | /** 73 | * Applies this delta as the patch for a given target 74 | * 75 | * @param target the given target 76 | * @throws PatchFailedException 77 | */ 78 | public abstract void applyTo(List target) throws PatchFailedException; 79 | 80 | /** 81 | * Cancel this delta for a given revised text. The action is opposite to 82 | * patch. 83 | * 84 | * @param target the given revised text 85 | */ 86 | public abstract void restore(List target); 87 | 88 | /** 89 | * Returns the type of delta 90 | * @return the type enum 91 | */ 92 | public abstract TYPE getType(); 93 | 94 | /** 95 | * @return The Chunk describing the original text. 96 | */ 97 | public Chunk getOriginal() { 98 | return original; 99 | } 100 | 101 | /** 102 | * @param original The Chunk describing the original text to set. 103 | */ 104 | public void setOriginal(Chunk original) { 105 | this.original = original; 106 | } 107 | 108 | /** 109 | * @return The Chunk describing the revised text. 110 | */ 111 | public Chunk getRevised() { 112 | return revised; 113 | } 114 | 115 | /** 116 | * @param revised The Chunk describing the revised text to set. 117 | */ 118 | public void setRevised(Chunk revised) { 119 | this.revised = revised; 120 | } 121 | 122 | @Override 123 | public int hashCode() { 124 | final int prime = 31; 125 | int result = 1; 126 | result = prime * result + ((original == null) ? 0 : original.hashCode()); 127 | result = prime * result + ((revised == null) ? 0 : revised.hashCode()); 128 | return result; 129 | } 130 | 131 | @Override 132 | public boolean equals(Object obj) { 133 | if (this == obj) 134 | return true; 135 | if (obj == null) 136 | return false; 137 | if (getClass() != obj.getClass()) 138 | return false; 139 | Delta other = (Delta) obj; 140 | if (original == null) { 141 | if (other.original != null) 142 | return false; 143 | } else if (!original.equals(other.original)) 144 | return false; 145 | if (revised == null) { 146 | if (other.revised != null) 147 | return false; 148 | } else if (!revised.equals(other.revised)) 149 | return false; 150 | return true; 151 | } 152 | 153 | } 154 | -------------------------------------------------------------------------------- /src/gui/LandingPageAssistAdmin.java: -------------------------------------------------------------------------------- 1 | /* 2 | * To change this license header, choose License Headers in Project Properties. 3 | * To change this template file, choose Tools | Templates 4 | * and open the template in the editor. 5 | */ 6 | 7 | package gui; 8 | 9 | import gui.utils.*; 10 | import gui.types.*; 11 | import types.*; 12 | 13 | /** 14 | * 15 | * @author Jordan 16 | */ 17 | public class LandingPageAssistAdmin extends MSPanel { 18 | private AssistantAdmin a; 19 | 20 | /** 21 | * Creates new form LandingPageAssistAdmin1 22 | */ 23 | public LandingPageAssistAdmin(AssistantAdmin a) { 24 | super("Assistant Academic Administrator"); 25 | this.a = a; 26 | 27 | initComponents(); 28 | } 29 | 30 | /** 31 | * This method is called from within the constructor to initialize the form. 32 | * WARNING: Do NOT modify this code. The content of this method is always 33 | * regenerated by the Form Editor. 34 | */ 35 | @SuppressWarnings("unchecked") 36 | // //GEN-BEGIN:initComponents 37 | private void initComponents() { 38 | 39 | course_selection_header = new javax.swing.JPanel(); 40 | course_management_button = new javax.swing.JButton(); 41 | 42 | course_selection_header.setBorder(javax.swing.BorderFactory.createTitledBorder("Tasks")); 43 | course_selection_header.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR)); 44 | course_selection_header.setName(""); // NOI18N 45 | 46 | course_management_button.setText("Course Management"); 47 | course_management_button.addActionListener(new java.awt.event.ActionListener() { 48 | public void actionPerformed(java.awt.event.ActionEvent evt) { 49 | course_management_buttonActionPerformed(evt); 50 | } 51 | }); 52 | 53 | javax.swing.GroupLayout course_selection_headerLayout = new javax.swing.GroupLayout(course_selection_header); 54 | course_selection_header.setLayout(course_selection_headerLayout); 55 | course_selection_headerLayout.setHorizontalGroup( 56 | course_selection_headerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 57 | .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, course_selection_headerLayout.createSequentialGroup() 58 | .addContainerGap(193, Short.MAX_VALUE) 59 | .addComponent(course_management_button) 60 | .addGap(169, 169, 169)) 61 | ); 62 | course_selection_headerLayout.setVerticalGroup( 63 | course_selection_headerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 64 | .addGroup(course_selection_headerLayout.createSequentialGroup() 65 | .addGap(123, 123, 123) 66 | .addComponent(course_management_button) 67 | .addContainerGap(125, Short.MAX_VALUE)) 68 | ); 69 | 70 | javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); 71 | this.setLayout(layout); 72 | layout.setHorizontalGroup( 73 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 74 | .addGap(0, 525, Short.MAX_VALUE) 75 | .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 76 | .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() 77 | .addContainerGap() 78 | .addComponent(course_selection_header, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) 79 | .addContainerGap())) 80 | ); 81 | layout.setVerticalGroup( 82 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 83 | .addGap(0, 325, Short.MAX_VALUE) 84 | .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 85 | .addGroup(layout.createSequentialGroup() 86 | .addContainerGap() 87 | .addComponent(course_selection_header, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 88 | .addContainerGap(20, Short.MAX_VALUE))) 89 | ); 90 | }// //GEN-END:initComponents 91 | 92 | private void course_management_buttonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_course_management_buttonActionPerformed 93 | GUIUtils.getMasterFrame(this).movePage(new CourseManagement(a)); 94 | }//GEN-LAST:event_course_management_buttonActionPerformed 95 | 96 | private static final int MODIFY_COURSE = 1; 97 | private static final int DELETE_COURSE = 2; 98 | 99 | // Variables declaration - do not modify//GEN-BEGIN:variables 100 | private javax.swing.JButton course_management_button; 101 | private javax.swing.JPanel course_selection_header; 102 | // End of variables declaration//GEN-END:variables 103 | } 104 | -------------------------------------------------------------------------------- /src/difflib/Chunk.java: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2010 Dmitry Naumenko (dm.naumenko@gmail.com) 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | package difflib; 17 | 18 | import java.util.Arrays; 19 | import java.util.List; 20 | 21 | /** 22 | * Holds the information about the part of text involved in the diff process 23 | * 24 | *

25 | * Text is represented as Object[] because the diff engine is 26 | * capable of handling more than plain ascci. In fact, arrays or lists of any 27 | * type that implements {@link java.lang.Object#hashCode hashCode()} and 28 | * {@link java.lang.Object#equals equals()} correctly can be subject to 29 | * differencing using this library. 30 | *

31 | * 32 | * @author target size"); 76 | } 77 | for (int i = 0; i < size(); i++) { 78 | if (!target.get(position + i).equals(lines.get(i))) { 79 | throw new PatchFailedException( 80 | "Incorrect Chunk: the chunk content doesn't match the target"); 81 | } 82 | } 83 | } 84 | 85 | /** 86 | * @return the start position of chunk in the text 87 | */ 88 | public int getPosition() { 89 | return position; 90 | } 91 | 92 | public void setLines(List lines) { 93 | this.lines = lines; 94 | } 95 | 96 | /** 97 | * @return the affected lines 98 | */ 99 | public List getLines() { 100 | return lines; 101 | } 102 | 103 | public int size() { 104 | return lines.size(); 105 | } 106 | 107 | /** 108 | * Returns the index of the last line of the chunk. 109 | */ 110 | public int last() { 111 | return getPosition() + size() - 1; 112 | } 113 | 114 | /* 115 | * (non-Javadoc) 116 | * 117 | * @see java.lang.Object#hashCode() 118 | */ 119 | @Override 120 | public int hashCode() { 121 | final int prime = 31; 122 | int result = 1; 123 | result = prime * result + ((lines == null) ? 0 : lines.hashCode()); 124 | result = prime * result + position; 125 | result = prime * result + size(); 126 | return result; 127 | } 128 | 129 | /* 130 | * (non-Javadoc) 131 | * 132 | * @see java.lang.Object#equals(java.lang.Object) 133 | */ 134 | @Override 135 | public boolean equals(Object obj) { 136 | if (this == obj) 137 | return true; 138 | if (obj == null) 139 | return false; 140 | if (getClass() != obj.getClass()) 141 | return false; 142 | Chunk other = (Chunk) obj; 143 | if (lines == null) { 144 | if (other.lines != null) 145 | return false; 146 | } else if (!lines.equals(other.lines)) 147 | return false; 148 | if (position != other.position) 149 | return false; 150 | return true; 151 | } 152 | 153 | @Override 154 | public String toString() { 155 | return "[position: " + position + ", size: " + size() + ", lines: " + lines + "]"; 156 | } 157 | 158 | } 159 | -------------------------------------------------------------------------------- /src/database/GradeAccess.java: -------------------------------------------------------------------------------- 1 | package database; 2 | 3 | import java.sql.*; 4 | import java.util.ArrayList; 5 | 6 | /** 7 | * Class to access grades in project SQL database. 8 | * 9 | * NOTE: This class will NOT work outside of the SFU network. It also requires 10 | * the JDBC Driver for SQL server to be in the classpath of the JVM for it to 11 | * function. 12 | * 13 | * @author Markus Balaski 14 | * @version 0.1 - 22/03/2014 15 | */ 16 | public class GradeAccess { 17 | // ATTRIBUTES - CLASS VARIABLES 18 | 19 | private static Connection dbConnection; // The connection to the database 20 | 21 | // STATIC METHODS 22 | 23 | /* 24 | * Method to establish a connection to the Cypress SQL server. Uses 25 | * hard-coded login information of our group's SQL connection. 26 | */ 27 | private static void establishConnection() { 28 | try { // Access the JDBC driver 29 | Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver"); 30 | } catch (ClassNotFoundException e) { 31 | System.out.println("No JDBC driver found, exiting."); 32 | } 33 | 34 | try { // Connect to Cypress 35 | dbConnection = DriverManager 36 | .getConnection("jdbc:sqlserver://cypress.csil.sfu.ca;" 37 | + " user = c275g01; password = TAA2Md7nGrPj2LjN"); 38 | } catch (SQLException e) { 39 | System.out.println("Connection failed, exiting."); 40 | } 41 | } 42 | 43 | // NON-STATIC METHODS 44 | 45 | // public static int getStudentID(String stud_name) { 46 | // String query = 47 | // "SELECT StudentID FROM c275g01A.dbo.Student WHERE StudentName = '" + 48 | // stud_name + "'"; 49 | // ResultSet rs = execQuery(query); 50 | // int student_id = 666; //If you get this value, you'll know the database 51 | // didn't find anything. 52 | // 53 | // try { 54 | // rs.next(); 55 | // student_id = rs.getInt(1); 56 | // } catch (SQLException ex) { 57 | // ex.printStackTrace(); 58 | // } 59 | // 60 | // return student_id; 61 | // } 62 | // 63 | public static ResultSet accessGrades(String courseID, String actName) { 64 | String query = "SELECT StudentID,Grade FROM c275g01A.dbo.Grades WHERE" 65 | + " CourseID = '" + courseID + "' AND ActivityName = '" 66 | + actName + "' ORDER BY StudentID,RubricItem"; 67 | return execQuery(query); 68 | } 69 | 70 | public static Object[] accessGrades(String courseID, String actName, 71 | int studentID) { 72 | ArrayList grades = new ArrayList(); 73 | 74 | String query = "SELECT Grade FROM c275g01A.dbo.Grades WHERE" 75 | + " CourseID = '" + courseID + "' AND ActivityName = '" 76 | + actName + "' AND StudentID = " + studentID; 77 | ResultSet res = execQuery(query); 78 | 79 | try { 80 | while (res.next()) 81 | grades.add(res.getFloat(1)); 82 | } catch (SQLException e) { 83 | e.printStackTrace(); 84 | } 85 | 86 | return grades.toArray(); 87 | } 88 | 89 | public static void enterGrade(int studentID, String courseID, 90 | String actName, String rubricItem, float grade) throws SQLException { 91 | String query = "INSERT INTO c275g01A.dbo.Grades VALUES ('" + courseID 92 | + "','" + actName + "','" + rubricItem + "'," + studentID + "," 93 | + grade + ")"; 94 | PreparedStatement prepStatement; 95 | 96 | establishConnection(); // Establish connection to Cypress 97 | 98 | prepStatement = dbConnection.prepareStatement(query); 99 | prepStatement.executeUpdate(); 100 | 101 | } 102 | 103 | public static void updateGrade(int studentID, String courseID, 104 | String actName, String rubricItem, float grade) { 105 | String query = "UPDATE c275g01A.dbo.Grades SET Grade = " + grade 106 | + " WHERE StudentID = '" + studentID + "' AND CourseID = '" 107 | + courseID + "' AND ActivityName = '" + actName 108 | + "' AND RubricItem = '" + rubricItem + "'"; 109 | execUpdate(query); 110 | } 111 | 112 | // HELPER METHODS 113 | 114 | /* 115 | * Method to execute an update (INSERT, DELETE, UPDATE) query on the 116 | * database connection. 117 | */ 118 | private static void execUpdate(String query) { 119 | PreparedStatement prepStatement = null; 120 | 121 | establishConnection(); // Establish connection to Cypress 122 | 123 | try { // Prepare and execute the query 124 | prepStatement = dbConnection.prepareStatement(query); 125 | prepStatement.executeUpdate(); 126 | } catch (SQLException e) { 127 | System.out.println("SQL Exception occured, the state : " 128 | + e.getSQLState() + "\nMessage: " + e.getMessage()); 129 | } 130 | } 131 | 132 | /* 133 | * Method to execute a query on the database connection and return a result 134 | * set for the query entered as a string argument. 135 | */ 136 | private static ResultSet execQuery(String query) { 137 | PreparedStatement prepStatement = null; 138 | ResultSet resSet = null; 139 | 140 | establishConnection(); 141 | try { // Prepare and execute query 142 | prepStatement = dbConnection.prepareStatement(query); 143 | resSet = prepStatement.executeQuery(); 144 | } catch (SQLException e) { 145 | System.out.println("SQL Exception occured, the state : " 146 | + e.getSQLState() + "\nMessage: " + e.getMessage()); 147 | } 148 | return resSet; 149 | } 150 | } --------------------------------------------------------------------------------