def __init__(self, maxDate, previousTotal, newTotal, error=False, attainedDate=None): WCSPageTemplateBase.__init__(self, None, "Vidyo", None) self._maxDate = maxDate self._previousTotal = previousTotal self._newTotal = newTotal self._error = error self._attainedDate = attainedDate
def getVars(self): variables = WCSPageTemplateBase.getVars(self) variables["Booking"] = self._booking variables["PhoneNumbers"] = getVidyoOptionValue("phoneNumbers") return variables
def getVars(self): variables = WCSPageTemplateBase.getVars(self) bookingClass = CollaborationTools.getCSBookingClass(self._pluginId) variables["CanBeNotified"] = bookingClass._canBeNotifiedOfEventDateChanges return variables
def getVars(self): vars = WCSPageTemplateBase.getVars(self) resultGetOrphans = getOrphans() if resultGetOrphans["success"] == True: orphans = resultGetOrphans["result"] else: raise RecordingManagerException(resultGetOrphans["result"]) vars["Orphans"] = orphans talks = getTalks(self._conf, sort=True) vars["Talks"] = talks vars["Conference"] = self._conf previewURL = CollaborationTools.getOptionValue("RecordingManager", "micalaPreviewURL") if self._rh.use_https(): previewURL = previewURL.replace("http", "https") vars["PreviewURL"] = previewURL langPrimary = CollaborationTools.getOptionValue( "RecordingManager", "languageCodePrimary") langSecondary = CollaborationTools.getOptionValue( "RecordingManager", "languageCodeSecondary") langDict = CollaborationTools.getOptionValue("RecordingManager", "languageDictionary") (vars["FlagLanguageDataOK"], vars["LanguageErrorMessages"]) = \ self._checkLanguageData(langPrimary, langSecondary, langDict) vars["LanguageCodePrimary"] = langPrimary vars["LanguageCodeSecondary"] = langSecondary vars["LanguageDictionary"] = langDict vars["LanguageCodes"] = sorted( CollaborationTools.getOptionValue("RecordingManager", "languageDictionary").keys()) return vars
def getVars(self): vars = WCSPageTemplateBase.getVars(self) vars["EventTitle"] = self._conf.getTitle() vars["EventDescription"] = unescape_html( strip_ml_tags(self._conf.getDescription())).strip() vars["DefaultStartDate"] = formatDateTime( self._conf.getAdjustedStartDate()) vars["DefaultEndDate"] = formatDateTime( self._conf.getAdjustedEndDate()) vars["DefaultWebExUser"] = "" vars["DefaultWebExPass"] = "" vars["TimeZone"] = self._conf.getTimezone() sessions = "<select name='session' id='session' onchange='updateSessionTimes()'><option value=''>None</option>" count = 0 sessionList = self._conf.getSessionList() for session in sessionList: count = count + 1 sessions = sessions + "<option value='%s'>%s</option>" % (str( session.getId()), session.getTitle()) sessions += "</select>" vars["SessionList"] = sessions return vars
def getVars(self): vars = WCSPageTemplateBase.getVars(self) vars["EventTitle"] = self._conf.getTitle() vars["EventDescription"] = unescape_html(strip_ml_tags(self._conf.getDescription())).strip() defaultStartDate = self._conf.getAdjustedStartDate() - timedelta( 0, 0, 0, 0, self._EVOOptions["defaultMinutesBefore"].getValue() ) nowStartDate = getAdjustedDate( nowutc() - timedelta(0, 0, 0, 0, self._EVOOptions["allowedPastMinutes"].getValue() / 2), self._conf ) vars["DefaultStartDate"] = formatDateTime(max(defaultStartDate, nowStartDate)) defaultEndDate = self._conf.getAdjustedEndDate() + timedelta( 0, 0, 0, 0, self._EVOOptions["defaultMinutesAfter"].getValue() ) nowEndDate = nowStartDate + timedelta(0, 0, 0, 0, self._EVOOptions["extraMinutesAfter"].getValue()) vars["DefaultEndDate"] = formatDateTime(max(defaultEndDate, nowEndDate)) communities = self._EVOOptions["communityList"].getValue() # a dict communityId : communityName communityItems = communities.items() # a list of tuples (communityId, communityName) communityItems.sort(key=lambda t: t[1]) # we sort by the second member of the tuple (the name) vars["Communities"] = communityItems return vars
def getVars(self): vars = WCSPageTemplateBase.getVars(self) vars["EventTitle"] = self._conf.getTitle() vars["EventDescription"] = unescape_html( strip_ml_tags(self._conf.getDescription())).strip() defaultStartDate = self._conf.getAdjustedStartDate() - timedelta( 0, 0, 0, 0, self._EVOOptions["defaultMinutesBefore"].getValue()) nowStartDate = getAdjustedDate( nowutc() - timedelta(0, 0, 0, 0, self._EVOOptions["allowedPastMinutes"].getValue() / 2), self._conf) vars["DefaultStartDate"] = formatDateTime( max(defaultStartDate, nowStartDate)) defaultEndDate = self._conf.getAdjustedEndDate() + timedelta( 0, 0, 0, 0, self._EVOOptions["defaultMinutesAfter"].getValue()) nowEndDate = nowStartDate + timedelta( 0, 0, 0, 0, self._EVOOptions["extraMinutesAfter"].getValue()) vars["DefaultEndDate"] = formatDateTime(max(defaultEndDate, nowEndDate)) communities = self._EVOOptions["communityList"].getValue( ) # a dict communityId : communityName communityItems = communities.items( ) # a list of tuples (communityId, communityName) communityItems.sort(key=lambda t: t[ 1]) # we sort by the second member of the tuple (the name) vars["Communities"] = communityItems return vars
def getVars(self): vars = WCSPageTemplateBase.getVars( self ) vars["Booking"] = self._booking vars["ListOfPhoneBridgeNumbersURL"] = getEVOOptionValueByName("phoneBridgeNumberList") return vars
def getVars(self): vars = WCSPageTemplateBase.getVars( self ) vars["IsSingleBooking"] = not CollaborationTools.getCSBookingClass(self._pluginId)._allowMultiple vars["Conference"] = self._conf isLecture = self._conf.getType() == 'simple_event' vars["IsLecture"] = isLecture underTheLimit = self._conf.getNumberOfContributions() <= self._RecordingRequestOptions["contributionLoadLimit"].getValue() manager = self._conf.getCSBookingManager() user = self._rh._getUser() isManager = user.isAdmin() or RCCollaborationAdmin.hasRights(user=user) or RCCollaborationPluginAdmin.hasRights(user=user, plugins=['RecordingRequest']) booking = manager.getSingleBooking('RecordingRequest') initialChoose = booking is not None and booking._bookingParams['talks'] == 'choose' initialDisplay = (self._conf.getNumberOfContributions() > 0 and underTheLimit) or (booking is not None and initialChoose) vars["InitialChoose"] = initialChoose vars["DisplayTalks"] = initialDisplay vars["isManager"] = isManager talks, rRoomFullNames, rRoomNames, recordingAbleTalks, recordingUnableTalks = getCommonTalkInformation(self._conf) nRecordingCapable = len(recordingAbleTalks) vars["HasRecordingCapableTalks"] = nRecordingCapable > 0 vars["NTalks"] = len(talks) # list of "locationName:roomName" strings vars["RecordingCapableRooms"] = rRoomFullNames vars["NRecordingCapableContributions"] = nRecordingCapable # we check if the event itself is recoring capable (depends on event's room) confLocation = self._conf.getLocation() confRoom = self._conf.getRoom() if confLocation and confRoom and (confLocation.getName() + ":" + confRoom.getName() in rRoomNames): topLevelRecordingCapable = True else: topLevelRecordingCapable = False # Finally, this event is recoring capable if the event itself # or one of its talks are capable or user is admin, collaboration # manager or recording plugin manager vars["RecordingCapable"] = topLevelRecordingCapable or nRecordingCapable > 0 or isManager recordingAbleTalks.sort(key = Contribution.contributionStartDateForSort) talks.sort(key = Contribution.contributionStartDateForSort) fossil_args = dict(tz=self._conf.getTimezone(), units='(hours)_minutes', truncate=True) vars["Contributions"] = fossilize(talks, IContributionRRFossil, **fossil_args) vars["ContributionsAble"] = fossilize(recordingAbleTalks, IContributionRRFossil, **fossil_args) vars["ContributionsUnable"] = fossilize(recordingUnableTalks, IContributionRRFossil, **fossil_args) vars["PostingUrgency"] = postingUrgency vars["linkToEA"] = collaborationUrlHandlers.UHCollaborationElectronicAgreement.getURL(self._conf) vars["agreementName"] = CollaborationTools.getOptionValue("RecordingRequest", "AgreementName") return vars
def getVars(self): vars=WCSPageTemplateBase.getVars( self ) vars["Conference"] = self._conf vars["IsSingleBooking"] = not CollaborationTools.getCSBookingClass(self._pluginName)._allowMultiple isLecture = self._conf.getType() == 'simple_event' vars["IsLecture"] = isLecture underTheLimit = self._conf.getNumberOfContributions() <= self._WebcastRequestOptions["contributionLoadLimit"].getValue() booking = self._conf.getCSBookingManager().getSingleBooking('WebcastRequest') initialChoose = booking is not None and booking._bookingParams['talks'] == 'choose' initialDisplay = (self._conf.getNumberOfContributions() > 0 and underTheLimit) or (booking is not None and initialChoose) vars["DisplayTalks"] = initialDisplay vars["InitialChoose"] = initialChoose talks, webcastCapableRooms, webcastAbleTalks = getCommonTalkInformation(self._conf) nTalks = len(talks) nWebcastCapable = len(webcastAbleTalks) vars["HasWebcastCapableTalks"] = nWebcastCapable > 0 vars["NTalks"] = nTalks #list of "locationName:roomName" strings vars["WebcastCapableRooms"] = webcastCapableRooms vars["NWebcastCapableContributions"] = nWebcastCapable #we see if the event itself is webcast capable (depends on event's room) confLocation = self._conf.getLocation() confRoom = self._conf.getRoom() if confLocation and confRoom and (confLocation.getName() + ":" + confRoom.getName() in webcastCapableRooms): topLevelWebcastCapable = True else: topLevelWebcastCapable = False #Finally, this event is webcast capable if the event itself or one of its talks are vars["WebcastCapable"] = topLevelWebcastCapable or nWebcastCapable > 0 if initialDisplay: webcastAbleTalks.sort(key = Contribution.contributionStartDateForSort) vars["Contributions"] = fossilize(webcastAbleTalks, IContributionWithSpeakersFossil, tz = self._conf.getTimezone(), units = '(hours)_minutes', truncate = True) else: vars["Contributions"] = [] vars["LectureOptions"] = lectureOptions vars["TypesOfEvents"] = typeOfEvents vars["PostingUrgency"] = postingUrgency vars["WebcastPurpose"] = webcastPurpose vars["IntendedAudience"] = intendedAudience vars["SubjectMatter"] = subjectMatter vars["ConsentFormURL"] = self._WebcastRequestOptions["ConsentFormURL"].getValue() return vars
def getVars(self): variables = WCSPageTemplateBase.getVars(self) variables["EventTitle"] = VidyoTools.defaultRoomName(self._conf) variables["EventDescription"] = unescape_html(strip_ml_tags(self._conf.getDescription())).strip() return variables
def getVars(self): vars = WCSPageTemplateBase.getVars( self ) resultGetOrphans = getOrphans() if resultGetOrphans["success"] == True: orphans = resultGetOrphans["result"] else: raise RecordingManagerException(resultGetOrphans["result"]) vars["Orphans"] = orphans talks = getTalks(self._conf, sort = True) vars["Talks"] = talks vars["Conference"] = self._conf previewURL = CollaborationTools.getOptionValue("RecordingManager", "micalaPreviewURL") if self._rh.use_https(): previewURL = previewURL.replace("http","https") vars["PreviewURL"] = previewURL langPrimary = CollaborationTools.getOptionValue("RecordingManager", "languageCodePrimary") langSecondary = CollaborationTools.getOptionValue("RecordingManager", "languageCodeSecondary") langDict = CollaborationTools.getOptionValue("RecordingManager", "languageDictionary") (vars["FlagLanguageDataOK"], vars["LanguageErrorMessages"]) = \ self._checkLanguageData(langPrimary, langSecondary, langDict) vars["LanguageCodePrimary"] = langPrimary vars["LanguageCodeSecondary"] = langSecondary vars["LanguageDictionary"] = langDict vars["LanguageCodes"] = sorted(CollaborationTools.getOptionValue("RecordingManager", "languageDictionary").keys()) return vars
def getVars(self): vars = WCSPageTemplateBase.getVars(self) vars["Booking"] = self._booking vars["ListOfPhoneBridgeNumbersURL"] = getEVOOptionValueByName( "phoneBridgeNumberList") return vars
def getVars(self): variables = WCSPageTemplateBase.getVars(self) variables["BookingsPerConfIterator"] = self._bookingsPerConfIterator variables["ServerTZ"] = info.HelperMaKaCInfo.getMaKaCInfoInstance().getTimezone() variables["PairSorter"] = lambda pair: pair[0].getTitle() # we cannot have ":" in the template return variables
def getVars(self): variables = WCSPageTemplateBase.getVars(self) variables["EventTitle"] = VidyoTools.defaultRoomName(self._conf) variables["EventDescription"] = unescape_html( strip_ml_tags(self._conf.getDescription())).strip() return variables
def getVars(self): vars = WCSPageTemplateBase.getVars( self ) vars["IsSingleBooking"] = not CollaborationTools.getCSBookingClass(self._pluginName)._allowMultiple vars["Conference"] = self._conf isLecture = self._conf.getType() == 'simple_event' vars["IsLecture"] = isLecture location = self._conf.getLocation() room = self._conf.getRoom() if location and location.getName() and location.getName().strip() and \ room and room.getName() and room.getName().strip(): vars["HasRoom"] = True else: vars["HasRoom"] = False booking = self._conf.getCSBookingManager().getSingleBooking('RecordingRequest') initialChoose = booking is not None and booking._bookingParams['talks'] == 'choose' vars["InitialChoose"] = initialChoose contributions = [] if not isLecture and self._conf.getNumberOfContributions() > 0: underTheLimit = self._conf.getNumberOfContributions() <= self._RecordingRequestOptions["contributionLoadLimit"].getValue() initialDisplay = underTheLimit or (booking is not None and initialChoose) vars["DisplayTalks"] = initialDisplay #a talk is defined as a non-poster contribution talks = getTalks(self._conf, oneIsEnough = not initialDisplay) nTalks = len(talks) vars["HasTalks"] = nTalks > 0 if initialDisplay: talks.sort(key = Contribution.contributionStartDateForSort) contributions = fossilize(talks, IContributionWithSpeakersFossil, tz = self._conf.getTimezone(), units = '(hours)_minutes', truncate = True) else: vars["DisplayTalks"] = booking is not None and initialChoose vars["HasTalks"] = False vars["Contributions"] = contributions vars["ConsentFormURL"] = self._RecordingRequestOptions["ConsentFormURL"].getValue() vars["LectureOptions"] = lectureOptions vars["TypesOfEvents"] = typeOfEvents vars["PostingUrgency"] = postingUrgency vars["RecordingPurpose"] = recordingPurpose vars["IntendedAudience"] = intendedAudience vars["SubjectMatter"] = subjectMatter return vars
def getVars(self): variables = WCSPageTemplateBase.getVars(self) variables["BookingsPerConfIterator"] = self._bookingsPerConfIterator variables["ServerTZ"] = info.HelperMaKaCInfo.getMaKaCInfoInstance( ).getTimezone() variables["PairSorter"] = lambda pair: pair[0].getTitle( ) #we cannot have ":" in the template return variables
def getVars(self): vars = WCSPageTemplateBase.getVars( self ) vars["EventTitle"] = self._conf.getTitle() vars["EventDescription"] = unescape_html(strip_ml_tags( self._conf.getDescription())).strip() vars["DefaultStartDate"] = formatDateTime(self._conf.getAdjustedStartDate() - timedelta(0, 0, 0, 0, getCERNMCUOptionValueByName("defaultMinutesBefore"))) vars["DefaultEndDate"] = formatDateTime(self._conf.getAdjustedEndDate() + timedelta(0, 0, 0, 0, getCERNMCUOptionValueByName("defaultMinutesAfter"))) vars["MinStartDate"] = formatDateTime(self._conf.getAdjustedStartDate()) vars["MaxEndDate"] = formatDateTime(self._conf.getAdjustedEndDate()) return vars
def getVars(self): vars = WCSPageTemplateBase.getVars( self ) vars["Booking"] = self._booking vars["CERNGatekeeperPrefix"] = getCERNMCUOptionValueByName("CERNGatekeeperPrefix") vars["GDSPrefix"] = getCERNMCUOptionValueByName("GDSPrefix") vars["MCU_IP"] = getCERNMCUOptionValueByName("MCU_IP") vars["Phone_number"] = getCERNMCUOptionValueByName("Phone_number") return vars
def getVars(self): vars = WCSPageTemplateBase.getVars( self ) vars["EventTitle"] = self._conf.getTitle() vars["EventDescription"] = unescape_html(strip_ml_tags( self._conf.getDescription())).strip() vars["DefaultStartDate"] = formatDateTime(self._conf.getAdjustedStartDate()) vars["DefaultEndDate"] = formatDateTime(self._conf.getAdjustedEndDate()) vars["MinStartDate"] = formatDateTime(self._conf.getAdjustedStartDate()) vars["MaxEndDate"] = formatDateTime(self._conf.getAdjustedEndDate()) return vars
def getVars(self): vars = WCSPageTemplateBase.getVars( self ) vars["IsSingleBooking"] = not CollaborationTools.getCSBookingClass(self._pluginId)._allowMultiple vars["Conference"] = self._conf isLecture = self._conf.getType() == 'simple_event' vars["IsLecture"] = isLecture underTheLimit = self._conf.getNumberOfContributions() <= self._RecordingRequestOptions["contributionLoadLimit"].getValue() booking = self._conf.getCSBookingManager().getSingleBooking('RecordingRequest') initialChoose = booking is not None and booking._bookingParams['talks'] == 'choose' initialDisplay = (self._conf.getNumberOfContributions() > 0 and underTheLimit) or (booking is not None and initialChoose) vars["InitialChoose"] = initialChoose vars["DisplayTalks"] = initialDisplay talks, rRoomFullNames, rRoomNames, recordingAbleTalks = getCommonTalkInformation(self._conf) nTalks = len(talks) nRecordingCapable = len(recordingAbleTalks) vars["HasRecordingCapableTalks"] = nRecordingCapable > 0 vars["NTalks"] = nTalks #list of "locationName:roomName" strings vars["RecordingCapableRooms"] = rRoomFullNames vars["NRecordingCapableContributions"] = nRecordingCapable #we see if the event itself is webcast capable (depends on event's room) confLocation = self._conf.getLocation() confRoom = self._conf.getRoom() if confLocation and confRoom and (confLocation.getName() + ":" + confRoom.getName() in rRoomNames): topLevelRecordingCapable = True else: topLevelRecordingCapable = False #Finally, this event is webcast capable if the event itself or one of its talks are vars["RecordingCapable"] = topLevelRecordingCapable or nRecordingCapable > 0 if initialDisplay: recordingAbleTalks.sort(key = Contribution.contributionStartDateForSort) vars["Contributions"] = fossilize(recordingAbleTalks, IContributionWithSpeakersFossil, tz = self._conf.getTimezone(), units = '(hours)_minutes', truncate = True) else: vars["Contributions"] = [] vars["PostingUrgency"] = postingUrgency vars["linkToEA"] = collaborationUrlHandlers.UHCollaborationElectronicAgreement.getURL(self._conf) vars["agreementName"] = CollaborationTools.getOptionValue("RecordingRequest", "AgreementName") return vars
def getVars(self): variables = WCSPageTemplateBase.getVars(self) variables["MaxDate"] = self._maxDate variables["ServerTZ"] = info.HelperMaKaCInfo.getMaKaCInfoInstance().getTimezone() variables["PreviousTotal"] = self._previousTotal variables["NewTotal"] = self._newTotal variables["Error"] = self._error variables["AttainedDate"] = self._attainedDate return variables
def getVars(self): variables = WCSPageTemplateBase.getVars(self) variables["MaxDate"] = self._maxDate variables["ServerTZ"] = info.HelperMaKaCInfo.getMaKaCInfoInstance( ).getTimezone() variables["PreviousTotal"] = self._previousTotal variables["NewTotal"] = self._newTotal variables["Error"] = self._error variables["AttainedDate"] = self._attainedDate return variables
def getVars(self): variables = WCSPageTemplateBase.getVars(self) variables["MaxDate"] = self._maxDate variables["TotalRoomCount"] = VidyoTools.getEventEndDateIndex().getCount() oldBookingsPerConfIterator = VidyoTools.getEventEndDateIndex().iterBookingsPerConf(maxDate = self._maxDate) newBookingsPerConfIterator = VidyoTools.getEventEndDateIndex().iterBookingsPerConf(minDate = self._maxDate + timedelta(seconds = 1)) variables["OldBookings"] = WBookingsList(oldBookingsPerConfIterator).getHTML() variables["NewBookings"] = WBookingsList(newBookingsPerConfIterator).getHTML() variables["ServerTZ"] = info.HelperMaKaCInfo.getMaKaCInfoInstance().getTimezone() return variables
def getVars(self): variables = WCSPageTemplateBase.getVars(self) variables["MaxDate"] = self._maxDate variables["TotalRoomCount"] = VidyoTools.getEventEndDateIndex( ).getCount() oldBookingsPerConfIterator = VidyoTools.getEventEndDateIndex( ).iterbookings(maxDate=self._maxDate) newBookingsPerConfIterator = VidyoTools.getEventEndDateIndex( ).iterbookings(minDate=self._maxDate + timedelta(seconds=1)) oldBookingsPerConf, newBookingsPerConf = self._postProcessingClones( oldBookingsPerConfIterator, newBookingsPerConfIterator) variables["OldBookings"] = WBookingsList(oldBookingsPerConf).getHTML() variables["NewBookings"] = WBookingsList(newBookingsPerConf).getHTML() variables["ServerTZ"] = info.HelperMaKaCInfo.getMaKaCInfoInstance( ).getTimezone() return variables
def getVars(self): vars = WCSPageTemplateBase.getVars(self) vars["EventTitle"] = self._conf.getTitle() vars["EventDescription"] = unescape_html(strip_ml_tags(self._conf.getDescription())).strip() vars["DefaultStartDate"] = formatDateTime(self._conf.getAdjustedStartDate()) vars["DefaultEndDate"] = formatDateTime(self._conf.getAdjustedEndDate()) vars["DefaultWebExUser"] = "" vars["DefaultWebExPass"] = "" vars["TimeZone"] = self._conf.getTimezone() sessions = "<select name='session' id='session' onchange='updateSessionTimes()'><option value=''>None</option>" count = 0 sessionList = self._conf.getSessionList() for session in sessionList: count = count + 1 sessions = sessions + "<option value='%s'>%s</option>" % (str(session.getId()), session.getTitle()) sessions += "</select>" vars["SessionList"] = sessions return vars
def getVars(self): vars=WCSPageTemplateBase.getVars( self ) vars["Conference"] = self._conf vars["IsSingleBooking"] = not CollaborationTools.getCSBookingClass(self._pluginId)._allowMultiple isLecture = self._conf.getType() == 'simple_event' vars["IsLecture"] = isLecture underTheLimit = self._conf.getNumberOfContributions() <= self._WebcastRequestOptions["contributionLoadLimit"].getValue() manager = self._conf.getCSBookingManager() user = self._rh._getUser() isManager = user.isAdmin() or RCCollaborationAdmin.hasRights(user=user) or RCCollaborationPluginAdmin.hasRights(user=user, plugins=['WebcastRequest']) booking = manager.getSingleBooking('WebcastRequest') initialChoose = booking is not None and booking._bookingParams['talks'] == 'choose' initialDisplay = (self._conf.getNumberOfContributions() > 0 and underTheLimit) or (booking is not None and initialChoose) vars["DisplayTalks"] = initialDisplay vars["InitialChoose"] = initialChoose vars["isManager"] = isManager talks, wcRoomFullNames, wcRoomNames, webcastAbleTalks, webcastUnableTalks = getCommonTalkInformation(self._conf) nWebcastCapable = len(webcastAbleTalks) vars["HasWebcastCapableTalks"] = nWebcastCapable > 0 vars["NTalks"] = len(talks) # list of "locationName:roomName" strings vars["WebcastCapableRooms"] = wcRoomFullNames vars["NWebcastCapableContributions"] = nWebcastCapable # we see if the event itself is webcast capable (depends on event's room) confLocation = self._conf.getLocation() confRoom = self._conf.getRoom() if confLocation and confRoom and (confLocation.getName() + ":" + confRoom.getName() in wcRoomNames): topLevelWebcastCapable = True else: topLevelWebcastCapable = False # Finally, this event is webcast capable if the event itself or # or one of its talks are capable or user is admin, collaboration # manager or webcast plugin manager vars["WebcastCapable"] = topLevelWebcastCapable or nWebcastCapable > 0 or isManager if initialDisplay: webcastAbleTalks.sort(key = Contribution.contributionStartDateForSort) fossil_args = dict(tz=self._conf.getTimezone(), units='(hours)_minutes', truncate=True) vars["Contributions"] = fossilize(talks, IContributionWRFossil, **fossil_args) vars["ContributionsAble"] = fossilize(webcastAbleTalks, IContributionWRFossil, **fossil_args) vars["ContributionsUnable"] = fossilize(webcastUnableTalks, IContributionWRFossil, **fossil_args) else: vars["Contributions"] = [] vars["ContributionsAble"] = [] vars["ContributionsUnable"] = [] vars["Audiences"] = CollaborationTools.getOptionValue('WebcastRequest', "webcastAudiences") vars["linkToEA"] = collaborationUrlHandlers.UHCollaborationElectronicAgreement.getURL(self._conf) vars["agreementName"] = CollaborationTools.getOptionValue("WebcastRequest", "AgreementName") return vars
def getVars(self): vars = WCSPageTemplateBase.getVars(self) vars["Conference"] = self._conf vars["IsSingleBooking"] = not CollaborationTools.getCSBookingClass( self._pluginName)._allowMultiple isLecture = self._conf.getType() == 'simple_event' vars["IsLecture"] = isLecture underTheLimit = self._conf.getNumberOfContributions( ) <= self._WebcastRequestOptions["contributionLoadLimit"].getValue() booking = self._conf.getCSBookingManager().getSingleBooking( 'WebcastRequest') initialChoose = booking is not None and booking._bookingParams[ 'talks'] == 'choose' initialDisplay = (self._conf.getNumberOfContributions() > 0 and underTheLimit) or (booking is not None and initialChoose) vars["DisplayTalks"] = initialDisplay vars["InitialChoose"] = initialChoose talks, webcastCapableRooms, webcastAbleTalks = getCommonTalkInformation( self._conf) nTalks = len(talks) nWebcastCapable = len(webcastAbleTalks) vars["HasWebcastCapableTalks"] = nWebcastCapable > 0 vars["NTalks"] = nTalks #list of "locationName:roomName" strings vars["WebcastCapableRooms"] = webcastCapableRooms vars["NWebcastCapableContributions"] = nWebcastCapable #we see if the event itself is webcast capable (depends on event's room) confLocation = self._conf.getLocation() confRoom = self._conf.getRoom() if confLocation and confRoom and (confLocation.getName() + ":" + confRoom.getName() in webcastCapableRooms): topLevelWebcastCapable = True else: topLevelWebcastCapable = False #Finally, this event is webcast capable if the event itself or one of its talks are vars["WebcastCapable"] = topLevelWebcastCapable or nWebcastCapable > 0 if initialDisplay: webcastAbleTalks.sort( key=Contribution.contributionStartDateForSort) vars["Contributions"] = fossilize(webcastAbleTalks, IContributionWithSpeakersFossil, tz=self._conf.getTimezone(), units='(hours)_minutes', truncate=True) else: vars["Contributions"] = [] vars["LectureOptions"] = lectureOptions vars["TypesOfEvents"] = typeOfEvents vars["PostingUrgency"] = postingUrgency vars["WebcastPurpose"] = webcastPurpose vars["IntendedAudience"] = intendedAudience vars["SubjectMatter"] = subjectMatter vars["ConsentFormURL"] = self._WebcastRequestOptions[ "ConsentFormURL"].getValue() return vars
def getVars(self): vars = WCSPageTemplateBase.getVars(self) vars["Booking"] = self._booking return vars
def __init__(self, booking, displayTz): WCSPageTemplateBase.__init__(self, booking.getConference(), 'WebEx', None) self._booking = booking self._displayTz = displayTz
def getVars(self): vars = WCSPageTemplateBase.getVars(self) vars["Conference"] = self._conf vars["IsSingleBooking"] = not CollaborationTools.getCSBookingClass(self._pluginId)._allowMultiple isLecture = self._conf.getType() == "simple_event" vars["IsLecture"] = isLecture underTheLimit = ( self._conf.getNumberOfContributions() <= self._WebcastRequestOptions["contributionLoadLimit"].getValue() ) manager = self._conf.getCSBookingManager() user = self._rh._getUser() isManager = ( user.isAdmin() or RCCollaborationAdmin.hasRights(user=user) or RCCollaborationPluginAdmin.hasRights(user=user, plugins=["WebcastRequest"]) ) booking = manager.getSingleBooking("WebcastRequest") initialChoose = booking is not None and booking._bookingParams["talks"] == "choose" initialDisplay = (self._conf.getNumberOfContributions() > 0 and underTheLimit) or ( booking is not None and initialChoose ) vars["DisplayTalks"] = initialDisplay vars["InitialChoose"] = initialChoose vars["isManager"] = isManager talks, wcRoomFullNames, wcRoomNames, webcastAbleTalks, webcastUnableTalks = getCommonTalkInformation(self._conf) nWebcastCapable = len(webcastAbleTalks) vars["HasWebcastCapableTalks"] = nWebcastCapable > 0 vars["NTalks"] = len(talks) # list of "locationName:roomName" strings vars["WebcastCapableRooms"] = wcRoomFullNames vars["NWebcastCapableContributions"] = nWebcastCapable # we see if the event itself is webcast capable (depends on event's room) confLocation = self._conf.getLocation() confRoom = self._conf.getRoom() if confLocation and confRoom and (confLocation.getName() + ":" + confRoom.getName() in wcRoomNames): topLevelWebcastCapable = True else: topLevelWebcastCapable = False # Finally, this event is webcast capable if the event itself or # or one of its talks are capable or user is admin, collaboration # manager or webcast plugin manager vars["WebcastCapable"] = topLevelWebcastCapable or nWebcastCapable > 0 or isManager if initialDisplay: webcastAbleTalks.sort(key=Contribution.contributionStartDateForSort) fossil_args = dict(tz=self._conf.getTimezone(), units="(hours)_minutes", truncate=True) vars["Contributions"] = fossilize(talks, IContributionWRFossil, **fossil_args) vars["ContributionsAble"] = fossilize(webcastAbleTalks, IContributionWRFossil, **fossil_args) vars["ContributionsUnable"] = fossilize(webcastUnableTalks, IContributionWRFossil, **fossil_args) else: vars["Contributions"] = [] vars["ContributionsAble"] = [] vars["ContributionsUnable"] = [] vars["Audiences"] = CollaborationTools.getOptionValue("WebcastRequest", "webcastAudiences") vars["linkToEA"] = collaborationUrlHandlers.UHCollaborationElectronicAgreement.getURL(self._conf) vars["agreementName"] = CollaborationTools.getOptionValue("WebcastRequest", "AgreementName") return vars
def __init__(self, maxDate): WCSPageTemplateBase.__init__(self, None, "Vidyo", None) self._maxDate = maxDate
def __init__(self, bookingsPerConfIterator): WCSPageTemplateBase.__init__(self, None, "Vidyo", None) self._bookingsPerConfIterator = bookingsPerConfIterator