Example #1
0
def getCommonTalkInformation(conference):
    """ Returns a tuple of 3 lists:
        -List of talks (Contribution objects which are not in a Poster session)
        -List of webcast capable rooms, as a list of "locationName:roomName" strings
        -List of webcast-able talks (list of Contribution objects who take place in a webcast capable room)
    """

    #a talk is defined as a non-poster contribution
    filter = PosterFilterField(conference, False, False)
    talks = [cont for cont in conference.getContributionList() if filter.satisfies(cont)]

    #list of "locationName:roomName" strings
    webcastCapableRooms = CollaborationTools.getOptionValueRooms('WebcastRequest', "webcastCapableRooms")
    wcRoomFullNames = [r.locationName + ':' + r.getFullName() for r in webcastCapableRooms]
    wcRoomNames = [r.locationName + ':' + r.name for r in webcastCapableRooms]

    #a webcast-able talk is defined as a talk talking place in a webcast-able room
    webcastAbleTalks = []
    for t in talks:
        location = t.getLocation()
        room = t.getRoom()
        if location and room and (location.getName() + ":" + room.getName() in wcRoomNames):
            webcastAbleTalks.append(t)

    return (talks, wcRoomFullNames, wcRoomNames, webcastAbleTalks)