diff --git a/README.md b/README.md index 6199dd9..53b3aa3 100644 --- a/README.md +++ b/README.md @@ -1,41 +1,54 @@ # SerialExaminer -SerialExaminer is a small tool to speed up assessing tests and detecting potential fraudsters. It's easy to use, fast to use and will be long developed and improved + SerialExaminer is a small tool to speed up assessing tests and detecting potential fraudsters. It's easy to use, fast to use and will be long developed and improved -Ask your students to send you test responses in .txt files named after their full names, journal number, any ID numbers or anything else, that can identify them. Aks them to write answers in these files in format `.`, line by line. The order of questions and letter size don't matter + Ask your students to send you test responses in .txt files named after their full names, journal number, any ID numbers or anything else, that can identify them. Aks them to write answers in these files in format `.`, line by line. The order of questions and letter size don't matter -## Table of Contents -- [Installation](https://github.com/Pixel48/SerialExaminer#installation) -- [Usage](https://github.com/Pixel48/SerialExaminer#usage) +#### Table of Contents + - [Installation](https://github.com/Pixel48/SerialExaminer#installation) + - [Windows](https://github.com/Pixel48/SerialExaminer#windows) + - [Linux](https://github.com/Pixel48/SerialExaminer#linux) + - [Usage](https://github.com/Pixel48/SerialExaminer#usage) + - [Generating an exam key](https://github.com/Pixel48/SerialExaminer#generating-an-exam-key) + - [Importing an exam key](https://github.com/Pixel48/SerialExaminer#importing-an-exam-key) + - [Checking tests](https://github.com/Pixel48/SerialExaminer#checking-tests) + - [Searching for cheaters](https://github.com/Pixel48/SerialExaminer#searching-for-cheaters) ## Installation -Download application installer from [last release](https://github.com/Pixel48/SerialExaminer/releases/latest), install it and run using fresh desktop shortcut -> For now every installer will trigger [UAC](https://en.wikipedia.org/wiki/User_Account_Control), because it's not digitally signed, because I'm just a student developing a small project and (for now) I can't afford digital certification + Download the latest [SerialExaminer installer](https://github.com/Pixel48/SerialExaminer/releases/latest) + > For now, downloading the installer will launch [UAC](https://en.wikipedia.org/wiki/User_Account_Control) *Unknown publisher* alert because it is not digitally signed - I'm just a student developing a small project and I can't afford digital certification ## Usage -### Creating exam key file -![Exam file example](docs/img/exam_file.png) -1. Run SerialExaminer from desktop shortcut and create or import exam key file (\*.exkey). - - If you create exam key file... - - Provide the exact number of questions and answers in the exam and hit `Create key!` button + How to use SerialExaminer interface - ![Key parameters](docs/img/key_parameters.png) - > Now the key creator supports the number of answers from 4 to 12, future updates will gradually expand this range until they finally remove this restriction + ![Main window dummy](./docs/img/main_window.png) - - Provide answers to questions about the given number. If you make a mistake you can go back using the `<` button. Window will disappear automatically after entering the last answer +### Generating an exam key + 1. Provide the exact number of questions and answers in the exam and hit `Create key!` button - ![Key answers](docs/img/key_ans.png) + ![Key parameters](./docs/img/key_parameters.png) - - After key answer window vanish, hit `Done` button and provide where to save exam key for potential future use. (You dont need to import key after creating it, it's imported immediately after save). - - If you already had created exam key file... -2. Hit `Browse` button and provide folder with files from step 1. -3. Hit `Check!` button to calculate results + 2. Provide answers to questions about the given number. If you make a mistake you can go back using the `<` button. Window will disappear automatically after entering the last answer -![Check button](docs/img/check_button.png) -> Future updates will automate this process and remove this button + ![Key data](./docs/img/key_ans.png) + > Now the key creator supports the number of answers in range from 4 to 12, future updates will gradually expand this range until they finally remove this restriction -4. Use `Display` button to show test results + 3. After key answer window vanish, hit `Done` button and provide where to save exam key for potential future use. (You dont need to import key after creating it, it's imported immediately after save). -![Example results table](docs/img/results.png) -> Future updates will add export options and `predicted grade` column in results +### Checking tests + 1. Create or import correct exam key + 2. Hit `Browse` button and provide folder with files written by your students + 3. Hit `Check!` button to calculate results + 4. Hit `Display` button to show test results -Copyright (c) 2020 [Pixel48](https://github.com/Pixel48/) All Rights Reserved. + ![Result window](./docs/img/results.png) + > Future updates will add export options and `predicted grade` column in results + +### Searching for cheaters + 1. Hit `Import` button + 2. In new dialog change file extension to ***Plain text (\*.txt)*** + 3. Select the source file to which you want to check the similarity in other tests + 4. Hit `Browse` button and provide folder with other tests + 5. Hit `Check!` button to calculate results + 6. Hit `Display` button to show similarity of other tests to source test + +###### Copyright (c) 2020 [Pixel48](https://github.com/Pixel48/) All Rights Reserved diff --git a/SerialExaminer.py b/SerialExaminer.py index 7d4b163..56f8de6 100644 --- a/SerialExaminer.py +++ b/SerialExaminer.py @@ -9,7 +9,7 @@ import tkinter.font as tkFont import os, pickle -versionTag = 'v0.2.2' +versionTag = 'v0.3.0' # SOME GLOBALS R = 0 @@ -145,15 +145,22 @@ def importKey(self): KEY_FILE = os.path.normpath(filedialog.askopenfilename( title = "Select exam key file", initialdir = '.', - filetypes =(("Exam Key File", "*.exkey"), - ("All files", "*.*")) + filetypes =(("Exam key file", "*.exkey"), + ("Plain text", "*.txt"), + ) )) self.keyButtonImport['state'] = NORMAL self.keyButtonCreate['state'] = NORMAL - if ('.exkey', '.txt') in KEY_FILE: + if '.exkey' in KEY_FILE or '.txt' in KEY_FILE: global questionCount, KEY_DICT - with open(KEY_FILE, 'rb') as keyf: - KEY_DICT = pickle.load(keyf) + if '.exkey' in KEY_FILE: + with open(KEY_FILE, 'rb') as keyf: + KEY_DICT = pickle.load(keyf) + elif '.txt' in KEY_FILE: + with open(KEY_FILE, 'r') as keyf: + for line in keyf: + line = splitLine(line) + KEY_DICT[line[0]] = line[1] questionCount = len(KEY_DICT.keys()) self.inputButton['state'] = NORMAL def browseExams(self): @@ -379,7 +386,7 @@ def die(self): global KEY_FILE KEY_FILE = os.path.normpath(filedialog.asksaveasfilename( title = "Select exam key file", - initialdir = '.', + initialdir = './keys', filetypes =(("Exam Key File", "*.exkey"),) )) if '.exkey' not in KEY_FILE: diff --git a/installer.nsi b/installer.nsi index be19f30..303cc1b 100644 --- a/installer.nsi +++ b/installer.nsi @@ -4,7 +4,7 @@ ;------------------ ;Atributes Name "SerialExaminer" -OutFile "InstallSerialExaminer.exe" +OutFile "SerialExaminerSetup.exe" InstallDir $PROGRAMFILES\SerialExaminer RequestExecutionLevel admin ;Unicode True @@ -22,29 +22,27 @@ RequestExecutionLevel admin Section "SerialExaminer" SerialExaminer SetOutPath $INSTDIR File /r "dist\SerialExaminer\*" - ;InstallDirRegKey HKLM "Software\SerialExaminer" "" - - WriteRegStr HKLM SOFTWARE\NSIS_Example2 "Install_Dir" "$INSTDIR" + CreateDirectory "$INSTDIR\keys" + WriteRegStr HKLM "SOFTWARE\SerialExaminer" "InstallPath" "$INSTDIR" WriteRegStr HKLM "Software\SerialExaminer" "DisplayName" "SerialExaminer" WriteRegStr HKLM "Software\SerialExaminer" "UninstallString" '"$INSTDIR\Uninstall.exe"' - WriteRegDWORD HKLM "Software\SerialExaminer" "NoModify" 1 - WriteRegDWORD HKLM "Software\SerialExaminer" "NoRepair" 1 + WriteUninstaller "$INSTDIR\Uninstall.exe" SectionEnd +Section "Desktop shortcut" + CreateShortcut "$DESKTOP\SerialExaminer.lnk" "$INSTDIR\SerialExaminer.exe" +SectionEnd + ;------------------ ;Uninstaller !insertmacro MUI_UNPAGE_CONFIRM !insertmacro MUI_UNPAGE_INSTFILES Section "Uninstall" + Delete "$DESKTOP\SerialExaminer.lnk" Delete "$INSTDIR\Uninstall.exe" - RMDir "$INSTDIR\*" RMDir /r "$INSTDIR" DeleteRegKey HKLM "Software\SerialExaminer" SectionEnd - -Section "Desktop shortcut" - CreateShortcut "$DESKTOP\SerialExaminer.lnk" "$INSTDIR\SerialExaminer.exe" -SectionEnd