def page_not_found(e): if session['user_role'] == 'Student': assignment_list = Assignment.get_assignment_list() else: assignment_list = [] return render_template('user_details.html', user=User.get_user_by_id(session['user_id']), assignment_list=assignment_list)
def index(): if session['user_role'] == 'Student': assignment_list = Assignment.get_assignment_list() else: assignment_list = [] return render_template('user_details.html', user=User.get_user_by_id(session['user_id']), assignment_list=assignment_list, mainmenu=mainmenu, dashboard=True)
def user_details(user_id): if not user_id.isnumeric(): flash("Site not found") return redirect('/') assignment_list = Assignment.get_assignment_list() return render_template('user_details.html', assignment_list=assignment_list, user=User.get_user_by_id(user_id), mainmenu=mainmenu, dashboard=False)
def assignments(): return render_template("assignments.html", assignment_list=Assignment.get_assignment_list(), mainmenu=mainmenu)