Exemple #1
0
def saveScore(num, pwd, term, classNum, classSeq, classType):
    scores = putScore([num, pwd])
    score = []
    for x in request.get_json():
        tmp = {}
        try:
            tmp['number'] = x['num']
            try:
                tmp['daily'] = x['daily']
            except:
                tmp['daily'] = ''
            try:
                tmp['exam'] = x['exam']
            except:
                tmp['exam'] = ''
            try:
                tmp['examMid'] = x['examMid']
            except:
                tmp['examMid'] = ''
            try:
                tmp['examExp'] = x['examExp']
            except:
                tmp['examExp'] = ''
            try:
                tmp['total'] = x['total']
            except:
                tmp['total'] = ''
            try:
                tmp['failRes'] = x['failRes']
            except:
                tmp['failRes'] = ''
        except:
            pass
        score.append(tmp)
    return jsonify({'data': scores.saveScore(term, classNum, classSeq, classType, score)})
Exemple #2
0
def verifyCoef(num, pwd, term, classNum, classSeq, classType):
    scores = putScore([num, pwd])
    return jsonify({'data': scores.hasCoef(term, classNum, classSeq, classType)})
Exemple #3
0
def getClassList(num, pwd, term):
    scores = putScore([num, pwd])
    return jsonify({'data': scores.getClassList(term)})
Exemple #4
0
def getScoreCoef(num, pwd, term, classNum, classSeq):
    scores = putScore([num, pwd])
    return jsonify({'data': scores.getCoef(term, classNum, classSeq)})
Exemple #5
0
def saveScoreCoef(num, pwd, term, classNum, classSeq, dailyScore, examScore, examExp, examMid):
    scores = putScore([num, pwd])
    return jsonify({'data': scores.saveCoef(term, classNum, classSeq, dailyScore, examScore, examExp, examMid)})
Exemple #6
0
def getTerms(num, pwd):
    scores = putScore([num, pwd])
    return jsonify({'data': scores.getTerms()})
Exemple #7
0
def getStudentsList(num, pwd, term, classNum, classSeq, classType):
    scores = putScore([num, pwd])
    return jsonify({'data': scores.getStudents(term, classNum, classSeq, classType)})