def isOnEvaluation(id_subject, id_postulant): try: conn = getConnection() cur = conn.cursor() PUTAssistence(cur, id_subject, id_postulant) conn.commit() cur.close() except Exception as e: print(e)
def mainSignUp(name, username, password): try: conn = getConnection() cur = conn.cursor() signUp(cur, name, username, password) conn. commit() cur.close() except Exception as e : print(e)
def getEvaluations(id_subject, id_postulant): try: conn = getConnection() cur = conn.cursor() response = SHOW(cur, id_subject, id_postulant) conn.commit() cur.close() return response except Exception as e: print(e)
def getStudents(id_subject, id_teacher): try: conn = getConnection() cur = conn.cursor() response = GETStundentByTeacherAndSubject(cur, id_subject, id_teacher) conn.commit() cur.close() return response except Exception as e: print(e)
def getSubjects(id_teacher): try: conn = getConnection() cur = conn.cursor() response = GETSubjectsByTeacher(cur, id_teacher) conn.commit() cur.close() return response except Exception as e: print(e)
def insertPostulation(id_subject, id_postulant): try: conn = getConnection() cur = conn.cursor() msg = POST(cur, id_subject, id_postulant) conn.commit() cur.close() return msg except Exception as e: print(e)
def getSubjectsByPostulant(id_postulant): try: conn = getConnection() cur = conn.cursor() subjects = GETSubjectsOfPostulations(cur, id_postulant) conn.commit() cur.close() return subjects except Exception as e: print(e)
def getPostulation(id_student): try: conn = getConnection() cur = conn.cursor() postulations = GET(cur, id_student) conn.commit() cur.close() return postulations except Exception as e: print(e)
def signOff(): try: conn = getConnection() cur = conn.cursor() updateClosingTime(cur) conn. commit() cur.close() conn.close() except Exception as e: print(e)
def insertExam(id_subject, id_teacher, image): try: conn = getConnection() cur = conn.cursor() msg = POST(cur, id_subject, id_teacher, image) conn.commit() cur.close() return msg except Exception as e: print(e)
def getUIByID_user(id_user): try: conn = getConnection() cur = conn.cursor() res = GETUIByID(cur, id_user) conn.commit() cur.close() return res except Exception as e: print(e) return tuple()
def showUi(id_ui): try: conn = getConnection() cur = conn.cursor() res = SHOWUI(cur, id_ui) conn.commit() cur.close() return res except Exception as e: print(e) return tuple()
def getTeachers(): try: conn = getConnection() cur = conn.cursor() res = GET(cur) conn.commit() cur.close() return res except Exception as e: print(e) return None
def getTeacherById(id): try: conn = getConnection() cur = conn.cursor() res = SHOW(cur, id) conn.commit() cur.close() return res except Exception as e: print(e) return None