Skip to content

Commit 9e4668e

Browse files
committed
Merge branch 'Dev'
2 parents 46b937b + ab13f7e commit 9e4668e

9 files changed

Lines changed: 463 additions & 101 deletions

File tree

.gitignore

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1-
TeamsDB
21
.venv/
3-
database/
2+
databases/
43
src/__pycache__/
5-
test.py
4+
test.py
5+
test.ipynb
6+
settings.json
7+
TestDB.db
8+
testitodb.zip

input/DeleteAnswer.png

15.2 KB
Loading

input/LogoIcon.png

22.7 KB
Loading

input/LogoStart.png

42.4 KB
Loading

main.py

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,29 @@
11
from src.gui import *
22

3+
sg.popup_auto_close(
4+
title = "Bienvenid@ a ExamMaker",
5+
button_type = 5,
6+
auto_close = True,
7+
auto_close_duration = 2,
8+
icon = None,
9+
no_titlebar = True,
10+
grab_anywhere = False,
11+
keep_on_top = True,
12+
image = "input/LogoStart.png")
13+
314
InitialGui()
415

16+
17+
18+
19+
20+
21+
22+
23+
24+
25+
26+
27+
28+
29+

src/db.py

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,27 @@
44

55

66
def SqlConnection(routeDB):
7+
78
try:
89
con = sqlite3.connect(routeDB)
9-
cur = con.cursor()
10-
cur.execute("SELECT * from MainExam WHERE ID=1")
10+
cur = con.cursor()
11+
cur.execute("SELECT * from MainTest WHERE ID=1")
1112
print("Conexión establecida")
12-
return cur
13+
return con, cur
1314

1415
except:
1516
print("Conexión NO establecida")
1617
return False
18+
19+
1720

21+
def GetThings(cur, idQuestion, option="Question"):
22+
23+
cur.execute(f"SELECT ID,{option} FROM MainTest WHERE ID ={idQuestion}")
24+
thingExtract = cur.fetchall()[0][1]
25+
return thingExtract
26+
27+
1828

1929

2030

0 commit comments

Comments
 (0)