def UpdateServerError(stdNum, problemNum, courseNum, submitCount):
     try :
         db_session.query(Submissions).\
             filter_by(memberId = stdNum,
                       problemId = problemNum,
                       courseId = courseNum,
                       submissionCount = submitCount).\
             update(dict(status = 8,
                         score = 0,
                         runTime = 0,
                         usedMemory = 0))
         db_session.commit()
         print '...server error...'
     except Exception as e:
         raise e
 def UpdateResutl(self, messageParaList):
     try:
         if len(messageParaList) != 4:
             return False
             
         else:
             result = messageParaList[0]
             score = messageParaList[1]
             runTime = messageParaList[2]
             usingMem = messageParaList[3]
         
             if result == ENUMResources.const.WRONG_ANSWER:
                 self.UpdateTable_SubmittedRecordsOfProblems_WrongAnswer()
             
             elif result == ENUMResources.const.TIME_OVER:
                 self.UpdateTable_SubmittedRecordsOfProblems_TimbeOver()
             
             elif result == ENUMResources.const.SOLVED:
                 self.UpdateTable_SubmittedRecordsOfProblems_Solved()
                 
             elif result == ENUMResources.const.RUNTIME_ERROR:
                 self.UpdateTable_SubmittedRecordsOfProblems_RunTimeError()
                 
             elif result == ENUMResources.const.COMPILE_ERROR:
                 self.UpdateTable_SubmittedRecordsOfProblems_CompileError()
                 
             else:
                 return False
             
             self.UpdateTableSubmissions(result, score, runTime, usingMem)
             
             db_session.commit()
             return True
     except Exception as e:
         db_session.rollback()
         return False