Esempio n. 1
0
 def getAllCourseInfo():
     return xmlutil.courseResultToXml({
         'success':
         unicode(True),
         'message':
         u'获取课程信息成功',
         'courses':
         CourseService.__toCourseDict(CourseDAO.getAllCourseInfo())
     })
Esempio n. 2
0
 def getCourseStatistics():
     allInfo = CourseDAO.getAllCourseInfo()
     result = []
     for info in allInfo:
         num = CourseService.__getSelectStudentNum(info[0])
         result.append({
             "courseId": unicode(info[0]),
             "studentNum": unicode(num),
             "name": info[1],
             "institutionId": unicode(departmentId)
         })
     return xmlutil.icourseStatisticsToXml(result)
Esempio n. 3
0
    def wsGetAllCourseInfo():
        info = CourseDAO.getAllCourseInfo()
        info = map(lambda x: (departmentId, ) + x, info)
        otherInfo = CourseWebService.__wsGetOtherCourseInfo(departmentId)
        info.extend(otherInfo)

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