def _delete_section_schedule(database,
                             sectionschedules,
                             allsectionschedules=False):
    for idsectionschedule in sectionschedules:
        with database:
            tbl_row_delete(database, "SectionSchedule",
                           [["idSectionSched", "=", idsectionschedule]])
Exemple #2
0
def _delete_class_lecture_teacher_enroll(database,
                                         classlectures,
                                         allclasslectures=False):
    for idclasslecture in classlectures:
        with database:
            tbl_row_delete(database, "ClassLectureFacultyEnroll",
                           [["idClassLecture", "=", idclasslecture]])
Exemple #3
0
def _delete_class_lecture_student_enroll(database,
                                         classlectures,
                                         allclasslectures=False):
    for idclasslecture in classlectures:
        with database:
            tbl_row_delete(database, "ClassLectureStudentEnroll",
                           [["idClassLecture", "=", idclasslecture]])
Exemple #4
0
def _delete_student_level(database,
                          students,
                          idacadperiods=[1],
                          allstudents=False):
    for studentid in students:
        for idacadperiod in idacadperiods:
            with database:
                tbl_row_delete(database, "StudentLevel",
                               [["idStudent", "=", studentid],
                                ["idAcadPeriod", "=", idacadperiod]])
Exemple #5
0
def clean_database(database, likestr="2018070"):

    tables = [
        "SectionSchedule", "SectionScheduleFaculty", "SectionScheduleStudent",
        "Section", "Course", "Subject", "Student", "StudentLevel", "Faculty"
    ]

    with database:
        for _table in tables:
            tbl_row_delete(database, _table,
                           [["dtAdd", "like", "\"" + likestr + "%\""]])
def delete_section(database, sections):
    for idsection in sections:
        with database:
            tbl_row_delete(database, "Section",
                           [["idSection", "=", idsection]])
    return [], []
Exemple #7
0
def _delete_student(database, students, allstudents=False):
    for studentid in students:
        with database:
            tbl_row_delete(database, "Student",
                           [["idStudent", "=", studentid]])
Exemple #8
0
def _delete_subject(database, subjects, allsubjects=False):
    for subjectid in subjects:
        with database:
            tbl_row_delete(database, "Subject",
                           [["idSubject", "=", subjectid]])
Exemple #9
0
def _delete_course(database, courses, allcourses=False):
    for courseid in courses:
        with database:
            tbl_row_delete(database, "Course", [["idCourse", "=", courseid]])
Exemple #10
0
def _delete_teacher(database, teachers, allteachers=False):
    for teacherid in teachers:
        with database:
            tbl_row_delete(database, "Faculty",
                           [["idFaculty", "=", teacherid]])