Exemple #1
0
    def _getAnswer(self):
        spkWrapper = None
        manager = self._conf.getCSBookingManager()
        for sw in manager.getSpeakerWrapperList():
            if sw.getUniqueIdHash() == self.authKey:
                spkWrapper = sw

        if spkWrapper:
            spkWrapper.setStatus(SpeakerStatusEnum.REFUSED)
            spkWrapper.setRejectReason(self.reason)
            spkWrapper.triggerNotification()
            if manager.notifyElectronicAgreementAnswer():
                subject = """[Indico] Electronic Agreement Rejected: '%s'""" % (
                    self._conf.getTitle())
                content = _(self.MESSAGE_REJECT).format(
                    speaker=spkWrapper.getObject().getDirectFullName(),
                    title=self._conf.getTitle(),
                    reason=self.reason,
                    url=self._conf.getURL())
                emailToList = [self._conf.getCreator().getEmail()]
                for event_manager in self._conf.getManagerList():
                    emailToList.append(event_manager.getEmail())
                notification = ElectronicAgreementOrganiserNotification(
                    emailToList,
                    Config.getInstance().getNoReplyEmail(), content, subject)

                GenericMailer.sendAndLog(notification, self._conf, MODULE_NAME)
Exemple #2
0
    def _sendMail(self, operation):
        """
        Overloads _sendMail behavior for EVO
        """

        if operation == 'new':
            #notification to admin
            try:
                notification = notifications.NewVidyoPublicRoomNotificationAdmin(self)
                GenericMailer.sendAndLog(notification, self.getConference(),
                                         self.getPlugin().getName())
            except Exception, e:
                Logger.get('Vidyo').error(
                    """Could not send NewVidyoPublicRoomNotificationAdmin for booking with id %s of event with id %s, exception: %s""" %
                    (self.getId(), self.getConference().getId(), str(e)))

            #notification to owner
            if isinstance(self.getOwnerObject(), Avatar):
                try:
                    notification = notifications.VidyoOwnerChosenNotification(self)
                    GenericMailer.sendAndLog(notification, self.getConference(),
                                             self.getPlugin().getName())

                except Exception, e:
                    Logger.get('Vidyo').error(
                        """Could not send VidyoOwnerChosenNotification for booking with id %s of event with id %s, exception: %s""" %
                        (self.getId(), self.getConference().getId(), str(e)))
Exemple #3
0
    def sendNotificationEmail(self, withdrawn = False):
        """ Sends an email to the contribution's submitters when the referee, editor or reviewer
            pass a judgement on the contribution and only if the manager has enabled the option in 'Automatic e-mails' section.
        """
        review_manager = self.getReviewManager()
        authorList = review_manager.contribution.submitters
        referee = self.getReviewManager().getReferee()
        for author in authorList:
            if (isinstance(self, RefereeJudgement) and self.getConfPaperReview().getEnableRefereeJudgementEmailNotif()) \
            or (isinstance(self, EditorJudgement) and (self._review.getConference().getConfPaperReview().getChoice() == ConferencePaperReview.LAYOUT_REVIEWING or not self.getJudgement() in ["Accept", "Reject"]) and self.getConfPaperReview().getEnableEditorJudgementEmailNotif()) \
            or (isinstance(self, ReviewerJudgement) and not self.getJudgement() in ["Accept", "Reject"] and self.getConfPaperReview().getEnableReviewerJudgementEmailNotif()):
                if withdrawn:
                    notification = ContributionReviewingJudgementWithdrawalNotification(author, self, self.getReviewManager().contribution)
                else:
                    notification = ContributionReviewingJudgementNotification(author, self, self.getReviewManager().contribution)
                GenericMailer.sendAndLog(notification,
                                         self._review.getConference(),
                                         'Paper Reviewing')

        # We send an email to the Referee if the layout or the content reviewer has sent a judgement

        if (self.getConfPaperReview().getChoice() == 4 and isinstance(self, EditorJudgement) \
        and self.getConfPaperReview().getEnableEditorSubmittedRefereeEmailNotif()) \
        or ((self.getConfPaperReview().getChoice() == 2 or self.getConfPaperReview().getChoice() == 4) and isinstance(self, ReviewerJudgement) \
        and self.getConfPaperReview().getEnableReviewerSubmittedRefereeEmailNotif()):
            if withdrawn:
                notification = ContributionReviewingJudgementRefereeWithdrawalNotification(referee, self, self.getReviewManager().contribution)
            else:
                notification = ContributionReviewingJudgementRefereeNotification(referee, self, self.getReviewManager().contribution)
            GenericMailer.sendAndLog(notification,
                                     self._review.getConference(),
                                     'Paper Reviewing')
Exemple #4
0
    def _getAnswer(self):
        report = ""
        i = 0
        for email in self.emailToList:
            i += 1
            if i != len(self.emailToList):
                report += "%s, " % email
            else:
                report += "%s." % email

        #{url} and {talkTitle} are mandatory to send the EA link
        if self.content.find('{url}') == -1:
            report = "url_error"
        elif self.content.find('{talkTitle}') == -1:
            report = "talkTitle_error"
        else:
            manager = self._conf.getCSBookingManager()
            for uniqueId in self.uniqueIdList:
                sw = manager.getSpeakerWrapperByUniqueId(uniqueId)
                if sw.getStatus() not in [
                        SpeakerStatusEnum.SIGNED, SpeakerStatusEnum.FROMFILE
                ]:
                    sw.setStatus(SpeakerStatusEnum.PENDING)
                    subject = """[Indico] Electronic Agreement: '%s'""" % (
                        self._conf.getTitle())
                    notification = ElectronicAgreementNotification(
                        [sw.getObject().getEmail()], self.cc, self.fromEmail,
                        self.fromName, self.processContent(sw), subject)

                    GenericMailer.sendAndLog(
                        notification, self._conf,
                        "MaKaC/plugins/Collaboration/RecordingRequest/collaboration.py",
                        None)
        return report
Exemple #5
0
    def _getAnswer(self):
        spkWrapper = None
        manager = Catalog.getIdx("cs_bookingmanager_conference").get(self._conf.getId())
        for sw in manager.getSpeakerWrapperList():
            if sw.getUniqueIdHash() == self.authKey:
                spkWrapper = sw

        if spkWrapper:
            spkWrapper.setStatus(SpeakerStatusEnum.REFUSED)
            spkWrapper.setRejectReason(self.reason)
            spkWrapper.triggerNotification()
            if manager.notifyElectronicAgreementAnswer():
                subject = """[Indico] Electronic Agreement Rejected: '%s'""" % (self._conf.getTitle())
                content = _(self.MESSAGE_REJECT).format(
                    speaker=spkWrapper.getObject().getDirectFullName(),
                    title=self._conf.getTitle(),
                    reason=self.reason,
                    url=self._conf.getURL())
                emailToList = [self._conf.getCreator().getEmail()]
                for event_manager in self._conf.getManagerList():
                    emailToList.append(event_manager.getEmail())
                notification = ElectronicAgreementOrganiserNotification(emailToList, Config.getInstance().getNoReplyEmail(), content, subject)

                GenericMailer.sendAndLog(notification, self._conf,
                                         MODULE_NAME)
Exemple #6
0
    def _getAnswer(self):
        report = ", ".join(self.emailToList) + "."

        # {url} and {talkTitle} are mandatory to send the EA link
        if self.content.find("{url}") == -1:
            report = "url_error"
        elif self.content.find("{talkTitle}") == -1:
            report = "talkTitle_error"
        else:
            manager = Catalog.getIdx("cs_bookingmanager_conference").get(self._conf.getId())
            for uniqueId in self.uniqueIdList:
                sw = manager.getSpeakerWrapperByUniqueId(uniqueId)
                if sw.getStatus() not in [SpeakerStatusEnum.SIGNED, SpeakerStatusEnum.FROMFILE]:
                    sw.setStatus(SpeakerStatusEnum.PENDING)
                    subject = """[Indico] Electronic Agreement: '%s'""" % (self._conf.getTitle())
                    notification = ElectronicAgreementNotification(
                        [sw.getObject().getEmail()],
                        self.cc,
                        self.fromEmail,
                        self.fromName,
                        self.processContent(sw),
                        subject,
                    )

                    GenericMailer.sendAndLog(notification, self._conf, MODULE_NAME)
        return report
Exemple #7
0
    def _getAnswer(self):
        report = ', '.join(self.emailToList) + '.'

        #{url} and {talkTitle} are mandatory to send the EA link
        if self.content.find('{url}') == -1:
            report = "url_error"
        elif self.content.find('{talkTitle}') == -1:
            report = "talkTitle_error"
        else:
            manager = Catalog.getIdx("cs_bookingmanager_conference").get(
                self._conf.getId())
            for uniqueId in self.uniqueIdList:
                sw = manager.getSpeakerWrapperByUniqueId(uniqueId)
                if sw.getStatus() not in [
                        SpeakerStatusEnum.SIGNED, SpeakerStatusEnum.FROMFILE
                ]:
                    sw.setStatus(SpeakerStatusEnum.PENDING)
                    subject = """[Indico] Electronic Agreement: '%s'""" % (
                        self._conf.getTitle())
                    notification = ElectronicAgreementNotification(
                        [sw.getObject().getEmail()], self.cc, self.fromEmail,
                        self.fromName, self.processContent(sw), subject)

                    GenericMailer.sendAndLog(notification, self._conf,
                                             MODULE_NAME)
        return report
Exemple #8
0
    def _sendMail(self, operation):
        """
        Overloads _sendMail behavior for EVO
        """

        if operation == 'new':
            #notification to admin
            try:
                notification = notifications.NewVidyoPublicRoomNotificationAdmin(
                    self)
                GenericMailer.sendAndLog(
                    notification, self.getConference(),
                    "MaKaC/plugins/Collaboration/Vidyo/collaboration.py",
                    self.getConference().getCreator())
            except Exception, e:
                Logger.get('Vidyo').error(
                    """Could not send NewVidyoPublicRoomNotificationAdmin for booking with id %s of event with id %s, exception: %s"""
                    % (self.getId(), self.getConference().getId(), str(e)))

            #notification to owner
            if isinstance(self.getOwnerObject(), Avatar):
                try:
                    notification = notifications.VidyoOwnerChosenNotification(
                        self)
                    GenericMailer.sendAndLog(
                        notification, self.getConference(),
                        "MaKaC/plugins/Collaboration/Vidyo/collaboration.py",
                        self.getConference().getCreator())

                except Exception, e:
                    Logger.get('Vidyo').error(
                        """Could not send VidyoOwnerChosenNotification for booking with id %s of event with id %s, exception: %s"""
                        % (self.getId(), self.getConference().getId(), str(e)))
Exemple #9
0
    def _getAnswer(self):
        spkWrapper = None
        manager = self._conf.getCSBookingManager()
        for sw in manager.getSpeakerWrapperList():
            if sw.getUniqueIdHash() == self.authKey:
                spkWrapper = sw

        if spkWrapper:
            spkWrapper.setStatus(SpeakerStatusEnum.SIGNED,
                                 self._req.get_remote_ip())
            spkWrapper.triggerNotification()
            if manager.notifyElectronicAgreementAnswer():
                subject = """[Indico] Electronic Agreement Accepted: '%s'""" % (
                    self._conf.getTitle())
                content = _(self.MESSAGE_ACCEPT).format(
                    speaker=spkWrapper.getObject().getDirectFullName(),
                    title=self._conf.getTitle(),
                    url=self._conf.getURL())
                emailToList = [self._conf.getCreator().getEmail()]
                for event_manager in self._conf.getManagerList():
                    emailToList.append(event_manager.getEmail())
                notification = ElectronicAgreementOrganiserNotification(
                    emailToList,
                    Config.getInstance().getNoReplyEmail(), content, subject)

                GenericMailer.sendAndLog(
                    notification, self._conf,
                    "MaKaC/plugins/Collaboration/RecordingRequest/collaboration.py",
                    None)
Exemple #10
0
    def _getAnswer(self):
        spkWrapper = None
        manager = Catalog.getIdx("cs_bookingmanager_conference").get(
            self._conf.getId())
        for sw in manager.getSpeakerWrapperList():
            if sw.getUniqueIdHash() == self.authKey:
                spkWrapper = sw

        if spkWrapper:
            spkWrapper.setStatus(SpeakerStatusEnum.SIGNED, request.remote_addr)
            spkWrapper.triggerNotification()
            if manager.notifyElectronicAgreementAnswer():
                subject = """[Indico] Electronic Agreement Accepted: '%s'""" % (
                    self._conf.getTitle())
                content = _(self.MESSAGE_ACCEPT).format(
                    speaker=spkWrapper.getObject().getDirectFullName(),
                    title=self._conf.getTitle(),
                    url=self._conf.getURL())
                emailToList = [self._conf.getCreator().getEmail()]
                for event_manager in self._conf.getManagerList():
                    emailToList.append(event_manager.getEmail())
                notification = ElectronicAgreementOrganiserNotification(
                    emailToList,
                    Config.getInstance().getNoReplyEmail(), content, subject)

                GenericMailer.sendAndLog(notification, self._conf, MODULE_NAME)
 def addReviewer(self, reviewer):
     """ Adds a reviewer to this contribution.
         reviewer has to be an Avatar object.
     """
     if reviewer in self.getReviewersList():
         raise MaKaCError(
             "This contribution is already assigned to the chosen reviewer")
     elif self.hasReferee():
         self._reviewersList.append(reviewer)
         self.notifyModification()
         reviewer.linkTo(self._contribution, "reviewer")
         self.getConfReview().addReviewerContribution(
             reviewer, self._contribution)
         self.getLastReview().setReviewerDueDate(
             self.getConfReview().getDefaultReviewerDueDate())
         if self.getLastReview().getAdviceFrom(reviewer) is None:
             self.getLastReview().addReviewerJudgement(reviewer)
         notification = ContributionReviewingNotification(
             reviewer, 'Reviewer', self._contribution)
         GenericMailer.sendAndLog(notification,
                                  self._contribution.getConference(),
                                  "MaKaC/reviewing.py", reviewer)
     else:
         raise MaKaCError(
             "Please choose a referee before assigning a reviewer")
Exemple #12
0
    def _getAnswer(self):
        report = ""
        i = 0
        for email in self.emailToList:
            i += 1
            if i != len(self.emailToList):
                report += "%s, " % email
            else:
                report += "%s." % email

        # {url} and {talkTitle} are mandatory to send the EA link
        if self.content.find("{url}") == -1:
            report = "url_error"
        elif self.content.find("{talkTitle}") == -1:
            report = "talkTitle_error"
        else:
            manager = self._conf.getCSBookingManager()
            for uniqueId in self.uniqueIdList:
                sw = manager.getSpeakerWrapperByUniqueId(uniqueId)
                sw.setStatus(SpeakerStatusEnum.PENDING)
                subject = """[Indico] Electronic Agreement: %s (event id: %s)""" % (
                    self._conf.getTitle(),
                    self._conf.getId(),
                )
                notification = ElectroniAgreementNotification(
                    [sw.getObject().getEmail()], self.fromEmail, self.processContent(sw), subject
                )

                GenericMailer.sendAndLog(
                    notification, self._conf, "MaKaC/plugins/Collaboration/RecordingRequest/collaboration.py", None
                )
        return report
Exemple #13
0
 def removePaperReviewManager(self, paperReviewManager):
     """ Remove a paper review manager from the conference.
         paperReviewManager has to be an Avatar object.
         The paper review manager is sent a mail notification.
     """
     if paperReviewManager in self._paperReviewManagersList:
         if self._userCompetences.has_key(paperReviewManager):
             if not ((paperReviewManager in self._editorsList) or \
                     (paperReviewManager in self._reviewersList) or \
                     (paperReviewManager in self._refereesList)):
                 self.clearUserCompetences(paperReviewManager)
                 del (self._userCompetences[paperReviewManager])
         self._paperReviewManagersList.remove(paperReviewManager)
         paperReviewManager.unlinkTo(self._conference, "paperReviewManager")
         self.notifyModification()
         if self._enablePRMEmailNotif == True:
             notification = ConferenceReviewingRemoveNotification(
                 paperReviewManager, 'Paper Review Manager',
                 self._conference)
             GenericMailer.sendAndLog(notification, self._conference,
                                      'Paper Reviewing')
     else:
         raise MaKaCError(
             "Cannot remove a paper review manager who is not yet paper review manager"
         )
Exemple #14
0
    def sendNotificationEmail(self, withdrawn = False):
        """ Sends an email to the contribution's submitters when the referee, editor or reviewer
            pass a judgement on the contribution and only if the manager has enabled the option in 'Automatic e-mails' section.
        """
        review_manager = self.getReviewManager()
        authorList = review_manager.contribution.submitters
        referee = self.getReviewManager().getReferee()
        for author in authorList:
            if (isinstance(self, RefereeJudgement) and self.getConfPaperReview().getEnableRefereeJudgementEmailNotif()) \
            or (isinstance(self, EditorJudgement) and (self._review.getConference().getConfPaperReview().getChoice() == ConferencePaperReview.LAYOUT_REVIEWING or not self.getJudgement() in ["Accept", "Reject"]) and self.getConfPaperReview().getEnableEditorJudgementEmailNotif()) \
            or (isinstance(self, ReviewerJudgement) and not self.getJudgement() in ["Accept", "Reject"] and self.getConfPaperReview().getEnableReviewerJudgementEmailNotif()):
                if withdrawn:
                    notification = ContributionReviewingJudgementWithdrawalNotification(author, self, self.getReviewManager().contribution)
                else:
                    notification = ContributionReviewingJudgementNotification(author, self, self.getReviewManager().contribution)
                GenericMailer.sendAndLog(notification,
                                         self._review.getConference(),
                                         'Paper Reviewing')

        # We send an email to the Referee if the layout or the content reviewer has sent a judgement

        if (self.getConfPaperReview().getChoice() == 4 and isinstance(self, EditorJudgement) \
        and self.getConfPaperReview().getEnableEditorSubmittedRefereeEmailNotif()) \
        or ((self.getConfPaperReview().getChoice() == 2 or self.getConfPaperReview().getChoice() == 4) and isinstance(self, ReviewerJudgement) \
        and self.getConfPaperReview().getEnableReviewerSubmittedRefereeEmailNotif()):
            if withdrawn:
                notification = ContributionReviewingJudgementRefereeWithdrawalNotification(referee, self, self.getReviewManager().contribution)
            else:
                notification = ContributionReviewingJudgementRefereeNotification(referee, self, self.getReviewManager().contribution)
            GenericMailer.sendAndLog(notification,
                                     self._review.getConference(),
                                     'Paper Reviewing')
Exemple #15
0
    def _getAnswer(self):
        report = ""
        i = 0
        for email in self.emailToList:
            i += 1
            if i != len(self.emailToList):
                report += "%s, "%email
            else:
                report += "%s."%email

        #{url} and {talkTitle} are mandatory to send the EA link
        if self.content.find('{url}') == -1:
            report = "url_error"
        elif self.content.find('{talkTitle}') == -1:
            report = "talkTitle_error"
        else:
            manager = self._conf.getCSBookingManager()
            for uniqueId in self.uniqueIdList:
                sw = manager.getSpeakerWrapperByUniqueId(uniqueId)
                if sw.getStatus() not in [SpeakerStatusEnum.SIGNED, SpeakerStatusEnum.FROMFILE]:
                    sw.setStatus(SpeakerStatusEnum.PENDING)
                    subject = """[Indico] Electronic Agreement: '%s'"""%(self._conf.getTitle())
                    notification = ElectronicAgreementNotification([sw.getObject().getEmail()], self.cc, self.fromEmail, self.fromName, self.processContent(sw), subject)

                    GenericMailer.sendAndLog(notification, self._conf,
                                             MODULE_NAME)
        return report
 def removeEditor(self):
     """ Removes the editor for this contribution.
         There is no 'editor' argument because there is only 1 editor by contribution.
         The ex-editor is notified by an email.
     """
     self._editor.unlinkTo(self._contribution, "editor")
     self.getConfReview().removeEditorContribution(self._editor, self._contribution)
     notification = ContributionReviewingRemoveNotification(self._editor, 'Editor', self._contribution)
     GenericMailer.sendAndLog(notification, self._contribution.getConference(), "MaKaC/reviewing.py", self._editor)
     self._editor = None
 def removeAllReviewers(self):
     """ Removes all the reviewers for this contribution
     """
     for reviewer in self._reviewersList:
         reviewer.unlinkTo(self._contribution, "reviewer")
         self.getConfReview().removeReviewerContribution(reviewer, self._contribution)
         self.notifyModification()
         notification = ContributionReviewingRemoveNotification(reviewer, 'Reviewer', self._contribution)
         GenericMailer.sendAndLog(notification, self._contribution.getConference(), "MaKaC/reviewing.py", reviewer)
     del(self._reviewersList[:])
Exemple #18
0
 def _delete(self):
     if MailTools.needToSendEmails('RecordingRequest'):
         try:
             notification = RequestDeletedNotification(self)
             GenericMailer.sendAndLog(notification, self.getConference(),
                                      self.getPlugin().getName())
         except Exception,e:
             Logger.get('RecReq').exception(
                 """Could not send RequestDeletedNotification for request with id %s of event %s, exception: %s""" % (self._id, self.getConference().getId(), str(e)))
             return RecordingRequestError('remove', e)
Exemple #19
0
 def _delete(self):
     if MailTools.needToSendEmails('RecordingRequest'):
         try:
             notification = RequestDeletedNotification(self)
             GenericMailer.sendAndLog(notification, self.getConference(),
                                      self.getPlugin().getName())
         except Exception,e:
             Logger.get('RecReq').exception(
                 """Could not send RequestDeletedNotification for request with id %s of event %s, exception: %s""" % (self._id, self.getConference().getId(), str(e)))
             return RecordingRequestError('remove', e)
Exemple #20
0
 def notifyLocationChange(self):
     if MailTools.needToSendEmails('WebcastRequest'):
         try:
             notification = RequestRelocatedNotification(self)
             GenericMailer.sendAndLog(notification, self.getConference(),
                                  "MaKaC/plugins/Collaboration/WebcastRequest/collaboration.py",
                                  self.getConference().getCreator())
         except Exception,e:
             Logger.get('RecReq').exception(
                 """Could not send RequestRelocatedNotification for request with id %s of event %s, exception: %s""" % (self._id, self.getConference().getId(), str(e)))
             return WebcastRequestError('edit', e)
    def removeReferee(self):
        """ Removes the referee for this contribution.
            There is no 'referee' argument because there is only 1 referee by contribution.
            The ex-referee is notified by an email.
        """

        self._referee.unlinkTo(self._contribution, "referee")
        self.getConfReview().removeRefereeContribution(self._referee, self._contribution)
        notification = ContributionReviewingRemoveNotification(self._referee, 'Referee', self._contribution)
        GenericMailer.sendAndLog(notification, self._contribution.getConference(), "MaKaC/reviewing.py", self._referee)
        self._referee = None
 def sendNotificationEmail(self, widthdrawn = False):
     """ Sends an email to the contribution's authors when the referee, editor or reviewer
         pass a judgement on the contribution.
     """
     authorList = self.getReviewManager().getContribution().getAuthorList()
     for author in authorList:
         if widthdrawn:
             notification = ContributionReviewingJudgementWithdrawalNotification(author, self, self.getReviewManager().getContribution())
         else:
             notification = ContributionReviewingJudgementNotification(author, self, self.getReviewManager().getContribution())
         GenericMailer.sendAndLog(notification, self._review.getConference(), "MaKaC/reviewing.py", author)
Exemple #23
0
 def removeEditor(self):
     """ Removes the editor for this contribution.
         There is no 'editor' argument because there is only 1 editor by contribution.
         The ex-editor is notified by an email.
     """
     editor = self.getEditor()
     self.getConfPaperReview().removeEditorContribution(editor, self.contribution)
     #e-mail notification will be send when editor is removed from contribution only if the manager enable the option in 'Automatic e-mails' section
     if self.getConfPaperReview().getEnableEditorEmailNotifForContribution():
         notification = ContributionReviewingRemoveNotification(editor.user, 'Layout Reviewer', self.contribution)
         GenericMailer.sendAndLog(notification, self.contribution.event_new.as_legacy, 'Paper Reviewing')
     self._editor = None
Exemple #24
0
 def notifyLocationChange(self):
     self.unindex_instances()
     self.index_instances()
     if MailTools.needToSendEmails('RecordingRequest'):
         try:
             notification = RequestRelocatedNotification(self)
             GenericMailer.sendAndLog(notification, self.getConference(),
                                      self.getPlugin().getName())
         except Exception,e:
             Logger.get('RecReq').exception(
                 """Could not send RequestRelocatedNotification for request with id %s of event %s, exception: %s""" % (self._id, self.getConference().getId(), str(e)))
             return RecordingRequestError('edit', e)
Exemple #25
0
 def notifyEventDateChanges(self, oldStartDate, newStartDate, oldEndDate, newEndDate):
     manager = self._conf.getCSBookingManager()
     manager._changeConfStartDateInIndex(self, oldStartDate, newStartDate)
     if MailTools.needToSendEmails('RecordingRequest'):
         try:
             notification = RequestRescheduledNotification(self)
             GenericMailer.sendAndLog(notification, self.getConference(),
                                      self.getPlugin().getName())
         except Exception,e:
             Logger.get('RecReq').exception(
                 """Could not send RequestRescheduledNotification for request with id %s of event %s, exception: %s""" % (self._id, self.getConference().getId(), str(e)))
             return RecordingRequestError('edit', e)
Exemple #26
0
    def _accept(self, user = None):
        self._statusMessage = "Request accepted"
        self._statusClass = "statusMessageOK"

        try:
            notification = RequestAcceptedNotification(self)
            GenericMailer.sendAndLog(notification, self.getConference(),
                                     self.getPlugin().getName())
        except Exception,e:
            Logger.get('RecReq').exception(
                """Could not send RequestAcceptedNotification for request with id %s of event %s, exception: %s""" % (self._id, self.getConference().getId(), str(e)))
            return RecordingRequestError('accept', e)
Exemple #27
0
    def _reject(self):
        self._statusMessage = "Request rejected by responsible"
        self._statusClass = "statusMessageError"

        try:
            notification = RequestRejectedNotification(self)
            GenericMailer.sendAndLog(notification, self.getConference(),
                                     self.getPlugin().getName())
        except Exception,e:
            Logger.get('RecReq').exception(
                """Could not send RequestRejectedNotification for request with id %s of event %s, exception: %s""" % (self._id, self.getConference().getId(), str(e)))
            return RecordingRequestError('reject', e)
Exemple #28
0
    def _accept(self, user = None):
        self._statusMessage = "Request accepted"
        self._statusClass = "statusMessageOK"

        try:
            notification = RequestAcceptedNotification(self)
            GenericMailer.sendAndLog(notification, self.getConference(),
                                     self.getPlugin().getName())
        except Exception,e:
            Logger.get('RecReq').exception(
                """Could not send RequestAcceptedNotification for request with id %s of event %s, exception: %s""" % (self._id, self.getConference().getId(), str(e)))
            return RecordingRequestError('accept', e)
Exemple #29
0
 def removeEditor(self):
     """ Removes the editor for this contribution.
         There is no 'editor' argument because there is only 1 editor by contribution.
         The ex-editor is notified by an email.
     """
     editor = self.getEditor()
     self.getConfPaperReview().removeEditorContribution(editor, self.contribution)
     #e-mail notification will be send when editor is removed from contribution only if the manager enable the option in 'Automatic e-mails' section
     if self.getConfPaperReview().getEnableEditorEmailNotifForContribution():
         notification = ContributionReviewingRemoveNotification(editor.user, 'Layout Reviewer', self.contribution)
         GenericMailer.sendAndLog(notification, self.contribution.event_new.as_legacy, 'Paper Reviewing')
     self._editor = None
Exemple #30
0
    def _reject(self):
        self._statusMessage = "Request rejected by responsible"
        self._statusClass = "statusMessageError"

        try:
            notification = RequestRejectedNotification(self)
            GenericMailer.sendAndLog(notification, self.getConference(),
                                     self.getPlugin().getName())
        except Exception,e:
            Logger.get('RecReq').exception(
                """Could not send RequestRejectedNotification for request with id %s of event %s, exception: %s""" % (self._id, self.getConference().getId(), str(e)))
            return RecordingRequestError('reject', e)
Exemple #31
0
 def notifyEventDateChanges(self, oldStartDate, newStartDate, oldEndDate, newEndDate):
     manager = Catalog.getIdx("cs_bookingmanager_conference").get(self._conf.getId())
     manager._changeConfStartDateInIndex(self, oldStartDate, newStartDate)
     if MailTools.needToSendEmails('WebcastRequest'):
         try:
             notification = RequestRescheduledNotification(self)
             GenericMailer.sendAndLog(notification, self.getConference(),
                                      self.getPlugin().getName())
         except Exception,e:
             Logger.get('RecReq').exception(
                 """Could not send RequestRescheduledNotification for request with id %s of event %s, exception: %s""" % (self._id, self.getConference().getId(), str(e)))
             return WebcastRequestError('edit', e)
Exemple #32
0
 def notifyLocationChange(self):
     self.unindex_instances()
     self.index_instances()
     if MailTools.needToSendEmails('WebcastRequest'):
         try:
             notification = RequestRelocatedNotification(self)
             GenericMailer.sendAndLog(notification, self.getConference(),
                                      self.getPlugin().getName())
         except Exception,e:
             Logger.get('RecReq').exception(
                 """Could not send RequestRelocatedNotification for request with id %s of event %s, exception: %s""" % (self._id, self.getConference().getId(), str(e)))
             return WebcastRequestError('edit', e)
Exemple #33
0
 def removeAllReviewers(self):
     """ Removes all the reviewers for this contribution
     """
     for reviewer in self._reviewersList:
         self.getConfPaperReview().removeReviewerContribution(reviewer, self.contribution)
         self.notifyModification()
         #e-mail notification will be send when reviewers are removed from contribution only if the manager enable the option in 'Automatic e-mails' section
         if self.getConfPaperReview().getEnableReviewerEmailNotifForContribution():
             notification = ContributionReviewingRemoveNotification(reviewer.user, 'Content Reviewer', self.contribution)
             GenericMailer.sendAndLog(notification,
                                      self.contribution.event_new.as_legacy,
                                      'Paper Reviewing')
     del(self._reviewersList[:])
Exemple #34
0
    def _create(self):
        self._statusMessage = "Request successfully sent"
        self._statusClass = "statusMessageOther"

        if MailTools.needToSendEmails('RecordingRequest'):
            try:
                notification = NewRequestNotification(self)
                GenericMailer.sendAndLog(notification, self.getConference(),
                                         self.getPlugin().getName())
            except Exception,e:
                Logger.get('RecReq').exception(
                    """Could not send NewRequestNotification for request with id %s of event %s, exception: %s""" % (self._id, self.getConference().getId(), str(e)))
                return RecordingRequestError('create', e)
Exemple #35
0
 def _accept(self):
     self._statusMessage = _("Request accepted")
     self._statusClass = "statusMessageOK"
     
     try:
         notification = RequestAcceptedNotification(self)
         GenericMailer.sendAndLog(notification, self.getConference(),
                              "MaKaC/plugins/Collaboration/RecordingRequest/collaboration.py",
                              None)
     except Exception,e:
         Logger.get('RecReq').exception(
             """Could not send RequestAcceptedNotification for request with id %s of event %s, exception: %s""" % (self._id, self.getConference().getId(), str(e)))
         return RecordingRequestError('accept', e)
Exemple #36
0
 def _reject(self):
     self._statusMessage = _("Request rejected by responsible")
     self._statusClass = "statusMessageError"
     
     try:
         notification = RequestRejectedNotification(self)
         GenericMailer.sendAndLog(notification, self.getConference(),
                              "MaKaC/plugins/Collaboration/WebcastRequest/collaboration.py",
                              None)
     except Exception,e:
         Logger.get('RecReq').exception(
             """Could not send RequestRejectedNotification for request with id %s of event %s, exception: %s""" % (self._id, self.getConference().getId(), str(e)))
         return WebcastRequestError('reject', e)
Exemple #37
0
 def _delete(self):
     if MailTools.needToSendEmails('WebcastRequest'):
         try:
             notification = RequestDeletedNotification(self)
             GenericMailer.sendAndLog(
                 notification, self.getConference(),
                 "MaKaC/plugins/Collaboration/WebcastRequest/collaboration.py",
                 self.getConference().getCreator())
         except Exception, e:
             Logger.get('RecReq').exception(
                 """Could not send RequestDeletedNotification for request with id %s of event %s, exception: %s"""
                 % (self._id, self.getConference().getId(), str(e)))
             return WebcastRequestError('remove', e)
Exemple #38
0
 def removeAllReviewers(self):
     """ Removes all the reviewers for this contribution
     """
     for reviewer in self._reviewersList:
         self.getConfPaperReview().removeReviewerContribution(reviewer, self.contribution)
         self.notifyModification()
         #e-mail notification will be send when reviewers are removed from contribution only if the manager enable the option in 'Automatic e-mails' section
         if self.getConfPaperReview().getEnableReviewerEmailNotifForContribution():
             notification = ContributionReviewingRemoveNotification(reviewer.user, 'Content Reviewer', self.contribution)
             GenericMailer.sendAndLog(notification,
                                      self.contribution.event_new.as_legacy,
                                      'Paper Reviewing')
     del(self._reviewersList[:])
 def removeReviewer(self, reviewer):
     """ Removes the reviewer for this contribution.
         The ex-reviewer is notified by an email.
     """
     if reviewer in self._reviewersList:
         reviewer.unlinkTo(self._contribution, "reviewer")
         self.getConfReview().removeReviewerContribution(reviewer, self._contribution)
         self._reviewersList.remove(reviewer)
         self.notifyModification()
         notification = ContributionReviewingRemoveNotification(reviewer, 'Reviewer', self._contribution)
         GenericMailer.sendAndLog(notification, self._contribution.getConference(), "MaKaC/reviewing.py", reviewer)
     else:
         raise MaKaCError("Cannot remove a reviewer who is not yet assigned to this contribution")
Exemple #40
0
 def notifyEventDateChanges(self, oldStartDate, newStartDate, oldEndDate, newEndDate):
     manager = self._conf.getCSBookingManager()
     manager._changeConfStartDateInIndex(self, oldStartDate, newStartDate)
     if MailTools.needToSendEmails('WebcastRequest'):
         try:
             notification = RequestRescheduledNotification(self)
             GenericMailer.sendAndLog(notification, self.getConference(),
                                  "MaKaC/plugins/Collaboration/WebcastRequest/collaboration.py",
                                  self.getConference().getCreator())
         except Exception,e:
             Logger.get('RecReq').exception(
                 """Could not send RequestRescheduledNotification for request with id %s of event %s, exception: %s""" % (self._id, self.getConference().getId(), str(e)))
             return WebcastRequestError('edit', e)
    def _sendNotificationToOldNewOwner(self, oldOwner):

        #notification to new owner
        if isinstance(self.getOwnerObject(), Avatar):
            try:
                notification = notifications.VidyoOwnerChosenNotification(self)
                GenericMailer.sendAndLog(notification, self.getConference(),
                                         self.getPlugin().getName())

            except Exception, e:
                Logger.get('Vidyo').error(
                    """Could not send VidyoOwnerChosenNotification for booking with id %s of event with id %s, exception: %s"""
                    % (self.getId(), self.getConference().getId(), str(e)))
Exemple #42
0
    def _modify(self, oldBookingParams):
        self._statusMessage = "Request successfully sent"
        self._statusClass = "statusMessageOther"

        if MailTools.needToSendEmails('WebcastRequest'):
            try:
                notification = RequestModifiedNotification(self)
                GenericMailer.sendAndLog(notification, self.getConference(),
                                         self.getPlugin().getName())
            except Exception,e:
                Logger.get('RecReq').exception(
                    """Could not send RequestModifiedNotification for request with id %s of event %s, exception: %s""" % (self._id, self.getConference().getId(), str(e)))
                return WebcastRequestError('edit', e)
Exemple #43
0
    def _sendNotificationToOldNewOwner(self, oldOwner):

        #notification to new owner
        if isinstance(self.getOwnerObject(), Avatar):
            try:
                notification = notifications.VidyoOwnerChosenNotification(self)
                GenericMailer.sendAndLog(notification, self.getConference(),
                                         self.getPlugin().getName())

            except Exception, e:
                Logger.get('Vidyo').error(
                    """Could not send VidyoOwnerChosenNotification for booking with id %s of event with id %s, exception: %s""" %
                    (self.getId(), self.getConference().getId(), str(e)))
Exemple #44
0
    def _modify(self, oldBookingParams):
        self._statusMessage = "Request successfully sent"
        self._statusClass = "statusMessageOther"

        if MailTools.needToSendEmails('RecordingRequest'):
            try:
                notification = RequestModifiedNotification(self)
                GenericMailer.sendAndLog(notification, self.getConference(),
                                         self.getPlugin().getName())
            except Exception,e:
                Logger.get('RecReq').exception(
                    """Could not send RequestModifiedNotification for request with id %s of event %s, exception: %s""" % (self._id, self.getConference().getId(), str(e)))
                return RecordingRequestError('edit', e)
Exemple #45
0
    def _delete(self):
        import MaKaC.webcast as webcast
        webcast.HelperWebcastManager.getWebcastManagerInstance().delForthcomingWebcast(self._conf)

        if MailTools.needToSendEmails('WebcastRequest'):
            try:
                notification = RequestDeletedNotification(self)
                GenericMailer.sendAndLog(notification, self.getConference(),
                                         self.getPlugin().getName())
            except Exception,e:
                Logger.get('RecReq').exception(
                    """Could not send RequestDeletedNotification for request with id %s of event %s, exception: %s""" % (self._id, self.getConference().getId(), str(e)))
                return WebcastRequestError('remove', e)
Exemple #46
0
 def notifyLocationChange(self):
     self.unindex_instances()
     self.index_instances()
     if MailTools.needToSendEmails('WebcastRequest'):
         try:
             notification = RequestRelocatedNotification(self)
             GenericMailer.sendAndLog(notification, self.getConference(),
                                  "MaKaC/plugins/Collaboration/WebcastRequest/collaboration.py",
                                  self.getConference().getCreator())
         except Exception,e:
             Logger.get('RecReq').exception(
                 """Could not send RequestRelocatedNotification for request with id %s of event %s, exception: %s""" % (self._id, self.getConference().getId(), str(e)))
             return WebcastRequestError('edit', e)
Exemple #47
0
 def removeReviewer(self, reviewer):
     """ Removes the reviewer for this contribution.
         The ex-reviewer is notified by an email.
     """
     reviewer_list = self.getReviewersList()
     if reviewer in reviewer_list:
         self.getConfPaperReview().removeReviewerContribution(reviewer, self.contribution)
         self.notifyModification()
         #e-mail notification will be send when reviewer is removed from contribution only if the manager enable the option in 'Automatic e-mails' section
         if self.getConfPaperReview().getEnableReviewerEmailNotifForContribution():
             notification = ContributionReviewingRemoveNotification(reviewer.user, 'Content Reviewer', self.contribution)
             GenericMailer.sendAndLog(notification,
                                      self.contribution.event_new.as_legacy,
                                      'Paper Reviewing')
 def removeEditor(self):
     """ Removes the editor for this contribution.
         There is no 'editor' argument because there is only 1 editor by contribution.
         The ex-editor is notified by an email.
     """
     self._editor.unlinkTo(self._contribution, "editor")
     self.getConfReview().removeEditorContribution(self._editor,
                                                   self._contribution)
     notification = ContributionReviewingRemoveNotification(
         self._editor, 'Editor', self._contribution)
     GenericMailer.sendAndLog(notification,
                              self._contribution.getConference(),
                              "MaKaC/reviewing.py", self._editor)
     self._editor = None
Exemple #49
0
 def removeReviewer(self, reviewer):
     """ Removes the reviewer for this contribution.
         The ex-reviewer is notified by an email.
     """
     reviewer_list = self.getReviewersList()
     if reviewer in reviewer_list:
         self.getConfPaperReview().removeReviewerContribution(reviewer, self.contribution)
         self.notifyModification()
         #e-mail notification will be send when reviewer is removed from contribution only if the manager enable the option in 'Automatic e-mails' section
         if self.getConfPaperReview().getEnableReviewerEmailNotifForContribution():
             notification = ContributionReviewingRemoveNotification(reviewer.user, 'Content Reviewer', self.contribution)
             GenericMailer.sendAndLog(notification,
                                      self.contribution.event_new.as_legacy,
                                      'Paper Reviewing')
Exemple #50
0
 def _modify(self):
     self._statusMessage = _("Request successfully sent")
     self._statusClass = "statusMessageOther"
     
     if MailTools.needToSendEmails('WebcastRequest'):
         try:
             notification = RequestModifiedNotification(self)
             GenericMailer.sendAndLog(notification, self.getConference(),
                                  "MaKaC/plugins/Collaboration/WebcastRequest/collaboration.py",
                                  self.getConference().getCreator())
         except Exception,e:
             Logger.get('RecReq').exception(
                 """Could not send RequestModifiedNotification for request with id %s of event %s, exception: %s""" % (self._id, self.getConference().getId(), str(e)))
             return WebcastRequestError('edit', e)
Exemple #51
0
    def _reject(self):
        self._statusMessage = "Request rejected by responsible"
        self._statusClass = "statusMessageError"
        import MaKaC.webcast as webcast
        webcast.HelperWebcastManager.getWebcastManagerInstance().delForthcomingWebcast(self._conf)

        try:
            notification = RequestRejectedNotification(self)
            GenericMailer.sendAndLog(notification, self.getConference(),
                                     self.getPlugin().getName())
        except Exception,e:
            Logger.get('RecReq').exception(
                """Could not send RequestRejectedNotification for request with id %s of event %s, exception: %s""" % (self._id, self.getConference().getId(), str(e)))
            return WebcastRequestError('reject', e)
Exemple #52
0
    def _accept(self, user = None):
        self._statusMessage = "Request accepted"
        self._statusClass = "statusMessageOK"
        import MaKaC.webcast as webcast
        webcast.HelperWebcastManager.getWebcastManagerInstance().addForthcomingWebcast(self._conf, self._bookingParams.get("audience", ""))

        try:
            notification = RequestAcceptedNotification(self)
            GenericMailer.sendAndLog(notification, self.getConference(),
                                     self.getPlugin().getName())
        except Exception,e:
            Logger.get('RecReq').exception(
                """Could not send RequestAcceptedNotification for request with id %s of event %s, exception: %s""" % (self._id, self.getConference().getId(), str(e)))
            return WebcastRequestError('accept', e)
Exemple #53
0
    def _create(self):
        self._statusMessage = "Request successfully sent"
        self._statusClass = "statusMessageOther"

        if MailTools.needToSendEmails('WebcastRequest'):
            try:
                notification = NewRequestNotification(self)
                GenericMailer.sendAndLog(notification, self.getConference(),
                                     "MaKaC/plugins/Collaboration/WebcastRequest/collaboration.py",
                                     self.getConference().getCreator())
            except Exception,e:
                Logger.get('RecReq').exception(
                    """Could not send NewRequestNotification for request with id %s of event %s, exception: %s""" % (self._id, self.getConference().getId(), str(e)))
                return WebcastRequestError('create', e)
 def removeAllReviewers(self):
     """ Removes all the reviewers for this contribution
     """
     for reviewer in self._reviewersList:
         reviewer.unlinkTo(self._contribution, "reviewer")
         self.getConfReview().removeReviewerContribution(
             reviewer, self._contribution)
         self.notifyModification()
         notification = ContributionReviewingRemoveNotification(
             reviewer, 'Reviewer', self._contribution)
         GenericMailer.sendAndLog(notification,
                                  self._contribution.getConference(),
                                  "MaKaC/reviewing.py", reviewer)
     del (self._reviewersList[:])
    def removeReferee(self):
        """ Removes the referee for this contribution.
            There is no 'referee' argument because there is only 1 referee by contribution.
            The ex-referee is notified by an email.
        """

        self._referee.unlinkTo(self._contribution, "referee")
        self.getConfReview().removeRefereeContribution(self._referee,
                                                       self._contribution)
        notification = ContributionReviewingRemoveNotification(
            self._referee, 'Referee', self._contribution)
        GenericMailer.sendAndLog(notification,
                                 self._contribution.getConference(),
                                 "MaKaC/reviewing.py", self._referee)
        self._referee = None
Exemple #56
0
    def _accept(self):
        self._statusMessage = _("Request accepted")
        self._statusClass = "statusMessageOK"

        try:
            notification = RequestAcceptedNotification(self)
            GenericMailer.sendAndLog(
                notification, self.getConference(),
                "MaKaC/plugins/Collaboration/RecordingRequest/collaboration.py",
                None)
        except Exception, e:
            Logger.get('RecReq').exception(
                """Could not send RequestAcceptedNotification for request with id %s of event %s, exception: %s"""
                % (self._id, self.getConference().getId(), str(e)))
            return RecordingRequestError('accept', e)
Exemple #57
0
    def _accept(self, user = None):
        self._statusMessage = "Request accepted"
        self._statusClass = "statusMessageOK"
        import MaKaC.webcast as webcast
        webcast.HelperWebcastManager.getWebcastManagerInstance().addForthcomingWebcast(self._conf, self._bookingParams.get("audience", ""))

        try:
            notification = RequestAcceptedNotification(self)
            GenericMailer.sendAndLog(notification, self.getConference(),
                                 "MaKaC/plugins/Collaboration/WebcastRequest/collaboration.py",
                                 None)
        except Exception,e:
            Logger.get('RecReq').exception(
                """Could not send RequestAcceptedNotification for request with id %s of event %s, exception: %s""" % (self._id, self.getConference().getId(), str(e)))
            return WebcastRequestError('accept', e)
Exemple #58
0
    def _delete(self):
        import MaKaC.webcast as webcast
        webcast.HelperWebcastManager.getWebcastManagerInstance(
        ).delForthcomingWebcast(self._conf)

        if MailTools.needToSendEmails('WebcastRequest'):
            try:
                notification = RequestDeletedNotification(self)
                GenericMailer.sendAndLog(notification, self.getConference(),
                                         self.getPlugin().getName())
            except Exception, e:
                Logger.get('RecReq').exception(
                    """Could not send RequestDeletedNotification for request with id %s of event %s, exception: %s"""
                    % (self._id, self.getConference().getId(), str(e)))
                return WebcastRequestError('remove', e)
Exemple #59
0
    def _reject(self):
        self._statusMessage = "Request rejected by responsible"
        self._statusClass = "statusMessageError"
        import MaKaC.webcast as webcast
        webcast.HelperWebcastManager.getWebcastManagerInstance().delForthcomingWebcast(self._conf)

        try:
            notification = RequestRejectedNotification(self)
            GenericMailer.sendAndLog(notification, self.getConference(),
                                 "MaKaC/plugins/Collaboration/WebcastRequest/collaboration.py",
                                 None)
        except Exception,e:
            Logger.get('RecReq').exception(
                """Could not send RequestRejectedNotification for request with id %s of event %s, exception: %s""" % (self._id, self.getConference().getId(), str(e)))
            return WebcastRequestError('reject', e)
Exemple #60
0
    def _modify(self):
        self._statusMessage = _("Request successfully sent")
        self._statusClass = "statusMessageOther"

        if MailTools.needToSendEmails('RecordingRequest'):
            try:
                notification = RequestModifiedNotification(self)
                GenericMailer.sendAndLog(
                    notification, self.getConference(),
                    "MaKaC/plugins/Collaboration/RecordingRequest/collaboration.py",
                    self.getConference().getCreator())
            except Exception, e:
                Logger.get('RecReq').exception(
                    """Could not send RequestModifiedNotification for request with id %s of event %s, exception: %s"""
                    % (self._id, self.getConference().getId(), str(e)))
                return RecordingRequestError('edit', e)