gbmodel/model_sqlalchemy.py
def insert_dates(self, midterm_start, midterm_end, final_start, final_end, session_id):
        """
        Insert a start and end date for midterm and final review
        Input: start and end date for midterm review and final reviews
        Output: update the dates in the database
        """
        review_dates = {'midterm_start': midterm_start,
                        'midterm_end': midterm_end,
                        'final_start': final_start,
                        'final_end': final_end}
        dates = self.split_dates(review_dates)
        params = {'midterm_start': dates['midterm_start'],
                  'midterm_end': dates['midterm_end'],
                  'final_start': dates['final_start'],
                  'final_end': dates['final_end'],
                  'session_id': session_id}
        for i in params:
            if params[i]:
                params[i] = params[i]
            else:
                params[i] = None
        session = capstone_session.query.filter(capstone_session.id == session_id).first()
        session.midterm_start = params['midterm_start']
        session.midterm_end = params['midterm_end']
        session.final_start = params['final_start']
        session.final_end = params['final_end']
        db.session.commit()
        return True

        Insert a start and end date for midterm and final review
        Input: start and end date for midterm review and final reviews
        Output: update the dates in the database
        
Insert a start and end date for midterm and final review
Input: start and end date for midterm review and final reviews
Output: update the dates in the database
Insert a start and end date for midterm and final review Input : start and end date for midterm review and final reviews Output : update the dates in the database
def insert_dates(self, midterm_start, midterm_end, final_start, final_end, session_id):
        review_dates = {'midterm_start': midterm_start,
                        'midterm_end': midterm_end,
                        'final_start': final_start,
                        'final_end': final_end}
        dates = self.split_dates(review_dates)
        params = {'midterm_start': dates['midterm_start'],
                  'midterm_end': dates['midterm_end'],
                  'final_start': dates['final_start'],
                  'final_end': dates['final_end'],
                  'session_id': session_id}
        for i in params:
            if params[i]:
                params[i] = params[i]
            else:
                params[i] = None
        session = capstone_session.query.filter(capstone_session.id == session_id).first()
        session.midterm_start = params['midterm_start']
        session.midterm_end = params['midterm_end']
        session.final_start = params['final_start']
        session.final_end = params['final_end']
        db.session.commit()
        return True
def insert_dates ( self , midterm_start , midterm_end , final_start , final_end , session_id ) : review_dates = { 'midterm_start' : midterm_start , 'midterm_end' : midterm_end , 'final_start' : final_start , 'final_end' : final_end } dates = self . split_dates ( review_dates ) params = { 'midterm_start' : dates [ 'midterm_start' ] , 'midterm_end' : dates [ 'midterm_end' ] , 'final_start' : dates [ 'final_start' ] , 'final_end' : dates [ 'final_end' ] , 'session_id' : session_id } for i in params : if params [ i ] : params [ i ] = params [ i ] else : params [ i ] = None session = capstone_session . query . filter ( capstone_session . id == session_id ) . first ( ) session . midterm_start = params [ 'midterm_start' ] session . midterm_end = params [ 'midterm_end' ] session . final_start = params [ 'final_start' ] session . final_end = params [ 'final_end' ] db . session . commit ( ) return True
Insert a start and end date for midterm and final review
Input: start and end date for midterm review and final reviews
Output: update the dates in the database
Insert a start and end date for midterm and final review Input : start and end date for midterm review and final reviews Output : update the dates in the database
"""
        Insert a start and end date for midterm and final review
        Input: start and end date for midterm review and final reviews
        Output: update the dates in the database
        """
self
midterm_start
midterm_end
final_start
final_end
session_id