Esempio n. 1
0
def exam_history(page=1):
    if request.method == 'GET':
        pagination = ExamService.get_user_exam_history(current_user, page)
        exam_count = ExamConditionService.get_user_exam_count_all(
            current_user.user_id)
        return render_template('web/exam/own_exam.html',
                               pagination=pagination,
                               exam_count=exam_count,
                               exam_list=pagination.items,
                               current_user=current_user)
Esempio n. 2
0
def exam_list(page=1):
    if request.method == 'GET':
        pagination = ExamService.get_user_exam_during(current_user, page)
        exam_count = ExamConditionService.get_user_exam_count_all(
            current_user.user_id)
        now_time = int(time.time())
        return render_template('web/exam/exam_list.html',
                               pagination=pagination,
                               exam_count=exam_count,
                               nowtime=now_time,
                               exam_list=pagination.items,
                               current_user=current_user)