student_dashboard.py
def post(self):
        """
        This method handles post request from editStudent.html
        Input: only self
        Output: prompt to the user error message if the inputs are invalid
                Add new info to the database and return to studentDashboard.html
        """
        student = gbmodel.students()
        student_name = validate_student().name
        user_name = validate_student().id
        new_name = request.form.get('student_new_name')
        new_email = request.form.get('student_new_email')
        caps = gbmodel.students().get_user_sessions(user_name)
        # Only check email validation if new email is entered
        if new_email != '':
            if self.valid_email(str(new_email)) is False:
                error = "Invalid Email Address"
                return render_template('editStudent.html',
                                       error=error,
                                       user_name=user_name)
        student.edit_student(user_name, new_name, new_email)
        # Get new name
        student_name = validate_student().name
        return render_template('studentDashboard.html',
                               name=student_name,
                               user_name=user_name,
                               caps=caps)

        This method handles post request from editStudent.html
        Input: only self
        Output: prompt to the user error message if the inputs are invalid
                Add new info to the database and return to studentDashboard.html
        
This method handles post request from editStudent.html
Input: only self
Output: prompt to the user error message if the inputs are invalid
Add new info to the database and return to studentDashboard.html
This method handles post request from editStudent . html Input : only self Output : prompt to the user error message if the inputs are invalid Add new info to the database and return to studentDashboard . html
def post(self):
        student = gbmodel.students()
        student_name = validate_student().name
        user_name = validate_student().id
        new_name = request.form.get('student_new_name')
        new_email = request.form.get('student_new_email')
        caps = gbmodel.students().get_user_sessions(user_name)
        if new_email != '':
            if self.valid_email(str(new_email)) is False:
                error = "Invalid Email Address"
                return render_template('editStudent.html',
                                       error=error,
                                       user_name=user_name)
        student.edit_student(user_name, new_name, new_email)
        student_name = validate_student().name
        return render_template('studentDashboard.html',
                               name=student_name,
                               user_name=user_name,
                               caps=caps)
def post ( self ) : student = gbmodel . students ( ) student_name = validate_student ( ) . name user_name = validate_student ( ) . id new_name = request . form . get ( 'student_new_name' ) new_email = request . form . get ( 'student_new_email' ) caps = gbmodel . students ( ) . get_user_sessions ( user_name ) if new_email != '' : if self . valid_email ( str ( new_email ) ) is False : error = "Invalid Email Address" return render_template ( 'editStudent.html' , error = error , user_name = user_name ) student . edit_student ( user_name , new_name , new_email ) student_name = validate_student ( ) . name return render_template ( 'studentDashboard.html' , name = student_name , user_name = user_name , caps = caps )
This method handles post request from editStudent.html
Input: only self
Output: prompt to the user error message if the inputs are invalid
Add new info to the database and return to studentDashboard.html
This method handles post request from editStudent . html Input : only self Output : prompt to the user error message if the inputs are invalid Add new info to the database and return to studentDashboard . html
"""
        This method handles post request from editStudent.html
        Input: only self
        Output: prompt to the user error message if the inputs are invalid
                Add new info to the database and return to studentDashboard.html
        """ # Only check email validation if new email is entered # Get new name
self