gbmodel/model_sqlalchemy.py
def remove_student(self, sts, t_name, session_id):
        """
        Remove a list of selected students
        Input: list of students, team name and session id
        Output: return False of the list of student is empty or if something went wrong
            otherwise, remove student from the team
        """
        try:
            if t_name is None or sts is None:
                return False
            removed_student = removed_students()
            team = teams.query.filter(teams.name == t_name,
                                      teams.session_id == session_id).first()
            for i in sts:
                student = students.query.filter(students.name == i,
                                                students.tid == team.id,
                                                students.session_id == session_id).first()
                removed_student.add_student(student)
                st = students.query.filter(students.id == student.id,
                                           students.session_id == session_id).first()
                db.session.delete(st)
                db.session.commit()
        except exc.SQLAlchemyError:
            handle_exception()
            return False

        return True

        Remove a list of selected students
        Input: list of students, team name and session id
        Output: return False of the list of student is empty or if something went wrong
            otherwise, remove student from the team
        
Remove a list of selected students
Input: list of students, team name and session id
Output: return False of the list of student is empty or if something went wrong
otherwise, remove student from the team
Remove a list of selected students Input : list of students team name and session id Output : return False of the list of student is empty or if something went wrong otherwise remove student from the team
def remove_student(self, sts, t_name, session_id):
        try:
            if t_name is None or sts is None:
                return False
            removed_student = removed_students()
            team = teams.query.filter(teams.name == t_name,
                                      teams.session_id == session_id).first()
            for i in sts:
                student = students.query.filter(students.name == i,
                                                students.tid == team.id,
                                                students.session_id == session_id).first()
                removed_student.add_student(student)
                st = students.query.filter(students.id == student.id,
                                           students.session_id == session_id).first()
                db.session.delete(st)
                db.session.commit()
        except exc.SQLAlchemyError:
            handle_exception()
            return False
        return True
def remove_student ( self , sts , t_name , session_id ) : try : if t_name is None or sts is None : return False removed_student = removed_students ( ) team = teams . query . filter ( teams . name == t_name , teams . session_id == session_id ) . first ( ) for i in sts : student = students . query . filter ( students . name == i , students . tid == team . id , students . session_id == session_id ) . first ( ) removed_student . add_student ( student ) st = students . query . filter ( students . id == student . id , students . session_id == session_id ) . first ( ) db . session . delete ( st ) db . session . commit ( ) except exc . SQLAlchemyError : handle_exception ( ) return False return True
Remove a list of selected students
Input: list of students, team name and session id
Output: return False of the list of student is empty or if something went wrong
otherwise, remove student from the team
Remove a list of selected students Input : list of students team name and session id Output : return False of the list of student is empty or if something went wrong otherwise remove student from the team
"""
        Remove a list of selected students
        Input: list of students, team name and session id
        Output: return False of the list of student is empty or if something went wrong
            otherwise, remove student from the team
        """
self
sts
t_name
session_id