示例#1
0
def update_student():
    email = input('Please enter student email: ')
    student = data_services.get_student_by_email(email)
    firstname = input('Please enter student first name (Enter to skip): ')
    lastname = input('Please enter student last name (Enter to skip): ')
    email = input('Please enter student new email (Enter to skip): ')
    data_services.update_student(student, firstname, lastname, email)
示例#2
0
def add_grade_student():
    email = input('Please enter student email: ')
    student = data_services.get_student_by_email(email)
    crs = input('Please enter a course name: ')
    course = data_services.get_course(crs)
    degree = input('Please enter the grade: ')
    data_services.student_add_degree(student=student,
                                     course=course,
                                     degree=degree)
示例#3
0
def delete_student():
    email = input('Please enter student email: ')
    student = data_services.get_student_by_email(email)
    data_services.delete_student(student)
示例#4
0
def get_student_by_email():
    email = input('Please enter student email: ')
    student = data_services.get_student_by_email(email)
    print(
        f'Student with email {email} first name is {student.first_name} and last name is {student.last_name}'
    )
示例#5
0
def add_student_course():
    name = input('Please enter course name: ')
    crs = data_services.get_course(name)
    email = input('Please enter student email: ')
    student = data_services.get_student_by_email(email)
    data_services.add_student(crs, student)