Esempio n. 1
0
 def getCourseInfo(username):
     id = AccountDAO.getStudentIdByUserName(username)
     return xmlutil.courseResultToXml({
         'success':
         unicode(True),
         'message':
         u'获取选课信息成功',
         'courses':
         CourseService.__toCourseDict(CourseDAO.getCourseInfo(id))
     })
Esempio n. 2
0
    def iGetSelectCourseInfo(username):
        id = AccountDAO.getStudentIdByUserName(username)
        info = CourseDAO.getCourseInfo(id)
        info = map(lambda x: (departmentId, ) + x, info)
        otherInfo = NetCourse.__iGetOtherSelectCourseInfo(id, departmentId)
        info.extend(otherInfo)

        return xmlutil.icourseResultToXml({
            'success':
            unicode(True),
            'message':
            u'获取选课信息成功',
            'courses':
            NetCourse.__itoCourseDict(info)
        })