Skip to content

Commit

Permalink
Merge branch 'release/v0.2.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
Pixel48 committed May 21, 2020
2 parents 61d93e3 + d40da45 commit 38ef478
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 17 deletions.
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,20 +81,23 @@ Just `git clone https://github.com/Pixel48/SerialExaminer.git` and use python. O
- [x] Set custom answers quantity
- [ ] Key import from selected file in
- [x] ... \*.exkey format
- [ ] ... \*.txt format ('Cheater Provider' feature)
- [ ] ... \*.txt format
- [ ] ... \*.xml format
- [ ] Import test files from provided directory in selected format
- [x] ... \*.txt
- [ ] ... \*.csv
- [ ] ... \*.xml
- [ ] Automate importing and examining process
- [x] Test test files with imported/created key
- [ ] Cheater finder
- [x] Display test results
- [ ] ... `predicted grade` column in results
- [ ] Export test results to selected file in
- [ ] ... \*.csv format
- [ ] ... \*.xml format
- [ ] ... \*.txt format
- [x] Release basic aplha
- [ ] ~~Send it to my highschool teachers~~ (I fu**ed it up)
- [x] ~~Send it to my highschool teachers~~ (I fu**ed it up)
- [ ] Give it to somebody who will actually use it
- [ ] Make it usable and useful
- [ ] Add autoupdate faeture from [SerialExaminer](https://github.com/Pixel48/SerialExaminer) repository
Expand Down
23 changes: 8 additions & 15 deletions SerialExaminer.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
from tkinter import filedialog
from functools import partial
import tkinter.font as tkFont
import os, pickle#, shutil, csv # NOTE: not used yet
import os, pickle

versionTag = 'v0.2.1'
versionTag = 'v0.2.2'

# SOME GLOBALS
R = 0
Expand Down Expand Up @@ -146,13 +146,11 @@ def importKey(self):
title = "Select exam key file",
initialdir = '.',
filetypes =(("Exam Key File", "*.exkey"),
# ("Csv files", "*.csv"), # TODO: add csv key import
# ("Excel sheets", "*.xml"), # TODO: add xml key import
("All files", "*.*"))
))
self.keyButtonImport['state'] = NORMAL
self.keyButtonCreate['state'] = NORMAL
if ".exkey" in KEY_FILE:
if ('.exkey', '.txt') in KEY_FILE:
global questionCount, KEY_DICT
with open(KEY_FILE, 'rb') as keyf:
KEY_DICT = pickle.load(keyf)
Expand Down Expand Up @@ -189,7 +187,7 @@ def examinate(self):
resultName = os.path.basename(testFile).split('.')[0]
RESULT_DICT[resultName] = [str(points) + '/' + str(questionCount), str(round(points*100/questionCount, 2)) + '%']
# NOTE: Result format: {<Filename>: ['<points>/<maxPoints', '<goodAnswersIn%>%']}
# self.outputButtonExport['state'] = NORMAL # NOTE: for future use
# self.outputButtonExport['state'] = NORMAL # NOTE: export feature
self.outputButtonDsiplay['state'] = NORMAL
def resultDisplay(self):
self.masterResultDisplayWindow = Toplevel(self.master)
Expand Down Expand Up @@ -339,14 +337,10 @@ def questionCountMinus1(self):
def questionCountPlus1(self):
global questionCount
questionCount += 1
# if questionCount > 100:
# questionCount = 1
self.questionLabelCount['text'] = questionCount
def questionCountPlus10(self):
global questionCount
questionCount += 10
# if questionCount > 100:
# questionCount = 10
self.questionLabelCount['text'] = questionCount

def answerCountMinus4(self):
Expand Down Expand Up @@ -390,11 +384,10 @@ def die(self):
))
if '.exkey' not in KEY_FILE:
KEY_FILE += '.exkey'
if KEY_FILE is '':
return # if no filename provided, don't proceed
self.exportKeyFile(KEY_FILE)
self.above.inputButton['state'] = NORMAL
self.master.destroy()
if KEY_FILE != '..exkey': # if no filename provided, don't proceed
self.exportKeyFile(KEY_FILE)
self.above.inputButton['state'] = NORMAL
self.master.destroy()

class MainKeyCreatorWindow(object):
"""Window to create exam key"""
Expand Down
Binary file modified docs/img/results.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added unico.ico
Binary file not shown.

0 comments on commit 38ef478

Please sign in to comment.