form.py
def confirm_user(self, user_id, capstone_id):
        """
        This method checks to ensure that the user trying to access
        the review exists and has an open review.
        Input: self and user_id
        Output: A boolean indication for
         if the user was successfully confirmed (true) or not (false)
        """
        # check if the current user is found in the database
        student = gbmodel.students().get_student_in_session(user_id, capstone_id)
        if student is None:
            return False

        # check review availability
        available = self.check_available(user_id, capstone_id)
        if available is False:
            return False

        # check the user's active reports
        state = self.get_state(user_id, capstone_id)
        if state == 'Error':
            return False

        # depending on the user's active state, check if the user is done
        done = 0
        if state == 'midterm':
            # check if already submitted
            done = student.midterm_done
        elif state == 'final':
            # check if already submitted
            done = student.final_done
        else:
            return False

        if done == 0:
            return True

        # no errors, so return true
        return True

        This method checks to ensure that the user trying to access
        the review exists and has an open review.
        Input: self and user_id
        Output: A boolean indication for
         if the user was successfully confirmed (true) or not (false)
        
This method checks to ensure that the user trying to access
the review exists and has an open review.
Input: self and user_id
Output: A boolean indication for
if the user was successfully confirmed (true) or not (false)
This method checks to ensure that the user trying to access the review exists and has an open review . Input : self and user_id Output : A boolean indication for if the user was successfully confirmed ( true ) or not ( false )
def confirm_user(self, user_id, capstone_id):
        student = gbmodel.students().get_student_in_session(user_id, capstone_id)
        if student is None:
            return False
        available = self.check_available(user_id, capstone_id)
        if available is False:
            return False
        state = self.get_state(user_id, capstone_id)
        if state == 'Error':
            return False
        done = 0
        if state == 'midterm':
            done = student.midterm_done
        elif state == 'final':
            done = student.final_done
        else:
            return False
        if done == 0:
            return True
        return True
def confirm_user ( self , user_id , capstone_id ) : student = gbmodel . students ( ) . get_student_in_session ( user_id , capstone_id ) if student is None : return False available = self . check_available ( user_id , capstone_id ) if available is False : return False state = self . get_state ( user_id , capstone_id ) if state == 'Error' : return False done = 0 if state == 'midterm' : done = student . midterm_done elif state == 'final' : done = student . final_done else : return False if done == 0 : return True return True
This method checks to ensure that the user trying to access
the review exists and has an open review.
This method checks to ensure that the user trying to access the review exists and has an open review .
"""
        This method checks to ensure that the user trying to access
        the review exists and has an open review.
        Input: self and user_id
        Output: A boolean indication for
         if the user was successfully confirmed (true) or not (false)
        """ # check if the current user is found in the database # check review availability # check the user's active reports # depending on the user's active state, check if the user is done # check if already submitted # check if already submitted # no errors, so return true
self
user_id
capstone_id