gbmodel/model_sqlalchemy.py
def edit_student(self, id, new_name, new_email):
        """
        Allows students to edit their name and email address
        Input: student's new email and name and current user id
        Output: apply new name and email to students in student table
        """
        try:
            # Find the student
            student = students.query.filter(students.id == id).all()
            if student is None:
                return False

            # Change name and/or email, if either of them are non-blank
            for i in student:
                if new_name != '':
                    i.name = new_name
                if new_email != '':
                    i.email_address = new_email
                db.session.commit()
            return True
        except exc.SQLAlchemyError:
            handle_exception()
            return False

        Allows students to edit their name and email address
        Input: student's new email and name and current user id
        Output: apply new name and email to students in student table
        
Allows students to edit their name and email address
Input: student's new email and name and current user id
Output: apply new name and email to students in student table
Allows students to edit their name and email address Input : student ' s new email and name and current user id Output : apply new name and email to students in student table
def edit_student(self, id, new_name, new_email):
        try:
            student = students.query.filter(students.id == id).all()
            if student is None:
                return False
            for i in student:
                if new_name != '':
                    i.name = new_name
                if new_email != '':
                    i.email_address = new_email
                db.session.commit()
            return True
        except exc.SQLAlchemyError:
            handle_exception()
            return False
def edit_student ( self , id , new_name , new_email ) : try : student = students . query . filter ( students . id == id ) . all ( ) if student is None : return False for i in student : if new_name != '' : i . name = new_name if new_email != '' : i . email_address = new_email db . session . commit ( ) return True except exc . SQLAlchemyError : handle_exception ( ) return False
Allows students to edit their name and email address
Input: student's new email and name and current user id
Output: apply new name and email to students in student table
Allows students to edit their name and email address Input : student ' s new email and name and current user id Output : apply new name and email to students in student table
"""
        Allows students to edit their name and email address
        Input: student's new email and name and current user id
        Output: apply new name and email to students in student table
        """ # Find the student # Change name and/or email, if either of them are non-blank
self
id
new_name
new_email