def index_booking(self, bk): conf = bk.getConference() contribs = bk.getTalkSelectionList() choose = bk.isChooseTalkSelected() # if contributions chosen individually if choose and contribs: for contrib_id in contribs: # check that contrib is in valid room if CollaborationTools.isAbleToBeWebcastOrRecorded(conf.getContributionById(contrib_id), bk.getType()): self.index_obj(CSBookingInstanceWrapper(bk, conf.getContributionById(contrib_id))) # We need to check if it is a lecture with a correct room elif CollaborationTools.isAbleToBeWebcastOrRecorded(conf, bk.getType()) or conf.getType() !="simple_event": for day in daysBetween(conf.getStartDate(), conf.getEndDate()): bkw = CSBookingInstanceWrapper(bk, conf, day.replace(hour=0, minute=0, second=0), day.replace(hour=23, minute=59, second=59)) self.index_obj(bkw)
def index_booking(self, bk): conf = bk.getConference() contribs = bk.getTalkSelectionList() choose = bk.isChooseTalkSelected() # if contributions chosen individually if choose and contribs: for contrib_id in contribs: # check that contrib is in valid room if CollaborationTools.isAbleToBeWebcastOrRecorded(conf.getContributionById(contrib_id), bk.getType()): self.index_obj(CSBookingInstanceWrapper(bk, conf.getContributionById(contrib_id))) # We need to check if it is a lecture with a correct room elif CollaborationTools.isAbleToBeWebcastOrRecorded(conf, bk.getType()) or conf.getType() !="simple_event": for day in iterdays(conf.getStartDate(), conf.getEndDate()): bkw = CSBookingInstanceWrapper(bk, conf, day.replace(hour=0, minute=0, second=0), day.replace(hour=23, minute=59, second=59)) self.index_obj(bkw)
def index_talk(self, talk): if CollaborationTools.isAbleToBeWebcastOrRecorded(talk, "WebcastRequest") and self.isChooseTalkSelected() \ and talk.getId() in self.getTalkSelectionList(): idx = Catalog.getIdx('cs_booking_instance') idx['WebcastRequest'].index_talk(self, talk) idx['All Requests'].index_talk(self, talk)
def index_talk(self, talk): if CollaborationTools.isAbleToBeWebcastOrRecorded(talk, "WebcastRequest") and self.isChooseTalkSelected() \ and talk.getId() in self.getTalkSelectionList(): idx = Catalog.getIdx('cs_booking_instance') idx['WebcastRequest'].index_talk(self, talk) idx['All Requests'].index_talk(self, talk)