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)})
def verifyCoef(num, pwd, term, classNum, classSeq, classType): scores = putScore([num, pwd]) return jsonify({'data': scores.hasCoef(term, classNum, classSeq, classType)})
def getClassList(num, pwd, term): scores = putScore([num, pwd]) return jsonify({'data': scores.getClassList(term)})
def getScoreCoef(num, pwd, term, classNum, classSeq): scores = putScore([num, pwd]) return jsonify({'data': scores.getCoef(term, classNum, classSeq)})
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)})
def getTerms(num, pwd): scores = putScore([num, pwd]) return jsonify({'data': scores.getTerms()})
def getStudentsList(num, pwd, term, classNum, classSeq, classType): scores = putScore([num, pwd]) return jsonify({'data': scores.getStudents(term, classNum, classSeq, classType)})