Ejemplo n.º 1
0
def students_applied(iid):
    students = []
    for r in adb.view_student_t():
        if r[4][int(iid)] == '1':
            students.append(r)

    return students
Ejemplo n.º 2
0
def reg_student(name, password, cpassword, email):
    #return 1 if passwords not equal error
    if password != cpassword:
        return 1
    if '@' not in email:
        return 2
    for r in adb.view_student_t(): #students cant have same email
        if email == r[4]:
            return 4
    else:
        adb.add_student(name, password, email)
        return False
Ejemplo n.º 3
0
def adminViewS():
    s = ""
    for r in adb.view_student_t():
        s += str(r) + '\n'

    return s