Example #1
0
    def POST(self):
        form = xh_form()
        if not form.validates():
            return render.score(form=form)
        else:
            xh = form.d.xh

        from addons import get_gpa, get_score

        gpa = get_gpa(xh)
        score = get_score(xh)

        return render.old_result(score_table=score, jidian=gpa['ave_score'])
Example #2
0
    def POST(self):
        form = xh_form()
        if not form.validates():
            return render.score(form=form)
        else:
            xh = form.d.xh

        from addons import get_gpa, get_score

        gpa=get_gpa(xh)
        score=get_score(xh)

        return render.old_result(score_table=score, jidian=gpa['ave_score'])
Example #3
0
    def GET(self):

        if session['logged_in'] == False:
            raise web.seeother('/login')

        try:
            xh = session['xh']
        except KeyError:
            return render.key_error()

        gpa = get_gpa(xh)
        session['name'] = gpa['name']

        return render.succeed(gpa=gpa)
Example #4
0
    def GET(self):

        if session['logged_in']==False:
            raise web.seeother('/login')

        try:
            xh=session['xh']
        except KeyError:
            return render.key_error()

        gpa=get_gpa(xh) 
        session['name']=gpa['name']

        return render.succeed(gpa=gpa)