gbmodel/model_sqlalchemy.py
def insert_student(self, name, email_address, id, session_id, t_name):
        """
        Add new student
        Input: student name, student email address, student id, team name and id of the selected session
        Output: return False if student id already exists in the current session
                add student to the database and return True otherwise
        """
        try:
            result = teams.query.filter(teams.name == t_name, teams.session_id == session_id).first()
            tid = result.id
            new_student = students(id=id,
                                   tid=tid,
                                   session_id=session_id,
                                   name=name,
                                   email_address=email_address,
                                   is_lead=False,
                                   midterm_done=False,
                                   final_done=False,
                                   active="open")
            db.session.add(new_student)
            db.session.commit()
        except exc.SQLAlchemyError:
            handle_exception()
            return False

        return True

        Add new student
        Input: student name, student email address, student id, team name and id of the selected session
        Output: return False if student id already exists in the current session
                add student to the database and return True otherwise
        
Add new student
Input: student name, student email address, student id, team name and id of the selected session
Output: return False if student id already exists in the current session
add student to the database and return True otherwise
Add new student Input : student name student email address student id team name and id of the selected session Output : return False if student id already exists in the current session add student to the database and return True otherwise
def insert_student(self, name, email_address, id, session_id, t_name):
        try:
            result = teams.query.filter(teams.name == t_name, teams.session_id == session_id).first()
            tid = result.id
            new_student = students(id=id,
                                   tid=tid,
                                   session_id=session_id,
                                   name=name,
                                   email_address=email_address,
                                   is_lead=False,
                                   midterm_done=False,
                                   final_done=False,
                                   active="open")
            db.session.add(new_student)
            db.session.commit()
        except exc.SQLAlchemyError:
            handle_exception()
            return False
        return True
def insert_student ( self , name , email_address , id , session_id , t_name ) : try : result = teams . query . filter ( teams . name == t_name , teams . session_id == session_id ) . first ( ) tid = result . id new_student = students ( id = id , tid = tid , session_id = session_id , name = name , email_address = email_address , is_lead = False , midterm_done = False , final_done = False , active = "open" ) db . session . add ( new_student ) db . session . commit ( ) except exc . SQLAlchemyError : handle_exception ( ) return False return True
Add new student
Input: student name, student email address, student id, team name and id of the selected session
Output: return False if student id already exists in the current session
add student to the database and return True otherwise
Add new student Input : student name student email address student id team name and id of the selected session Output : return False if student id already exists in the current session add student to the database and return True otherwise
"""
        Add new student
        Input: student name, student email address, student id, team name and id of the selected session
        Output: return False if student id already exists in the current session
                add student to the database and return True otherwise
        """
self
name
email_address
id
session_id
t_name