コード例 #1
0
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)
コード例 #2
0
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)
コード例 #3
0
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)
コード例 #4
0
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)
コード例 #5
0
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)
コード例 #6
0
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)
コード例 #7
0
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)
コード例 #8
0
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)
コード例 #9
0
def signOff():
    try:
        conn = getConnection()
        cur = conn.cursor()
        updateClosingTime(cur)
        conn. commit()
        cur.close()
        conn.close()
    except Exception as e:
        print(e)
コード例 #10
0
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)
コード例 #11
0
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()
コード例 #12
0
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()
コード例 #13
0
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
コード例 #14
0
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