Exemplo n.º 1
0
 def selectCourse(username, courseId):
     id = AccountDAO.getStudentIdByUserName(username)
     result = CourseDAO.selectCourse(id, courseId)
     return xmlutil.loginResultToXml({
         'success': result[0],
         'message': result[1]
     })
Exemplo n.º 2
0
    def wsSelectCourse(username, courseId, courseDept):
        result = None
        id = AccountDAO.getStudentIdByUserName(username)

        if (courseDept == departmentId):
            result = CourseDAO.selectCourse(id, courseId)
        else:
            result = CourseWebService.__wsSelectCourse(id, departmentId,
                                                       courseId, courseDept)

        return xmlutil.loginResultToXml({
            'success': unicode(result[0]),
            'message': unicode(result[1])
        })