Пример #1
0
def statistics():
    text = db_queries.get_page_content('statistics')
    statistics = db_queries.get_users_statistics(current_user.primary_email, None)

    #get user id to pass to the template to build the link to the last correctly submitted exercise
    user_id = db_queries.get_user(current_user.primary_email).user_id
    link_dir = app.config['STORAGE_FOLDER']
    return render_template("statistics.html", text=text, statistics=statistics, link_dir=link_dir, user_id=user_id)
Пример #2
0
def display_profile(profile_id):
    profile = db_queries.get_profile_from_id(profile_id)
    statistics = db_queries.get_users_statistics(None, profile_id)
    return render_template('view_profile.html', profile=profile, statistics=statistics)