Changeset a6c717 in indico


Ignore:
Timestamp:
06/07/10 18:50:14 (3 years ago)
Author:
Jose Benito <jose.benito.gonzalez@…>
Branches:
master, burotel, hello-world-walkthrough, ipv6, new-webex, v0.97-series, v0.98-series, v0.98.2, v0.98.3, v0.98b1, v0.98b2, v0.99, 051b2622c51afb171a1dedb46a0df4fbb0cbd02e, d9941f8582b36b24821a11ea5ba16fda6a457fb1
Children:
e3ef9c
Parents:
16a6b5
git-author:
Ian Rolewicz <ian.rolewicz@…> (05/05/10 13:27:47)
git-committer:
Jose Benito <jose.benito.gonzalez@…> (06/07/10 18:50:14)
Message:

[IMP] RecReq? and Webcast notif email enhancement

  • fixes #27
  • Notification emails for recording and webcast responsibles, sent when a recording or webcast request is accepted, now includes the name of the responsible who accepted the request.
Location:
indico/MaKaC
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • indico/MaKaC/plugins/Collaboration/RecordingRequest/collaboration.py

    rd3cb3f ra6c717  
    111111        pass 
    112112 
    113     def _accept(self): 
     113    def _accept(self, user = None): 
    114114        self._statusMessage = "Request accepted" 
    115115        self._statusClass = "statusMessageOK" 
     
    127127        if MailTools.needToSendEmails('RecordingRequest'): 
    128128            try: 
    129                 notificationAdmin = RequestAcceptedNotificationAdmin(self) 
     129                notificationAdmin = RequestAcceptedNotificationAdmin(self, user) 
    130130                GenericMailer.sendAndLog(notificationAdmin, self.getConference(), 
    131131                                     "MaKaC/plugins/Collaboration/RecordingRequest/collaboration.py", 
  • indico/MaKaC/plugins/Collaboration/RecordingRequest/common.py

    r5a8326 ra6c717  
    9999 
    100100    def __init__(self, operation, inner): 
    101         CSErrorBase.__init__(self) 
    102101        self._operation = operation 
    103102        self._inner = inner 
  • indico/MaKaC/plugins/Collaboration/RecordingRequest/mail.py

    r398f39 ra6c717  
    405405    """ 
    406406 
    407     def __init__(self, booking): 
     407    def __init__(self, booking, user = None): 
    408408        RecordingRequestAdminNotificationBase.__init__(self, booking) 
    409409 
     
    411411                        % (self._conference.getTitle(), str(self._conference.getId()))) 
    412412 
     413        userInfo = "" 
     414        if user : 
     415            userInfo = " by %s %s"%(user.getFirstName(), user.getFamilyName().upper()) 
    413416        self.setBody("""Dear Recording Responsible,<br /> 
    414417<br /> 
    415 A recording request for the event: "%s" has been accepted in <a href="%s">%s</a><br /> 
     418A recording request for the event: "%s" has been accepted in <a href="%s">%s</a>"""%(self._conference.getTitle(), 
     419                                                                                     MailTools.getServerName(), 
     420                                                                                     MailTools.getServerName()) 
     421+ userInfo + """.<br /> 
    416422Click <a href="%s">here</a> to view the request.<br /> 
    417423 
    418 """ % ( self._conference.getTitle(), 
    419         MailTools.getServerName(), 
    420         MailTools.getServerName(), 
    421         self._modifLink 
    422       )) 
     424""" % ( self._modifLink )) 
    423425 
    424426 
  • indico/MaKaC/plugins/Collaboration/WebcastRequest/collaboration.py

    rd3cb3f ra6c717  
    108108        pass 
    109109 
    110     def _accept(self): 
     110    def _accept(self, user = None): 
    111111        self._statusMessage = "Request accepted" 
    112112        self._statusClass = "statusMessageOK" 
     
    126126        if MailTools.needToSendEmails('WebcastRequest'): 
    127127            try: 
    128                 notification = RequestAcceptedNotificationAdmin(self) 
     128                notification = RequestAcceptedNotificationAdmin(self, user) 
    129129                GenericMailer.sendAndLog(notification, self.getConference(), 
    130130                                     "MaKaC/plugins/Collaboration/WebcastRequest/collaboration.py", 
  • indico/MaKaC/plugins/Collaboration/WebcastRequest/mail.py

    r398f39 ra6c717  
    406406    """ 
    407407 
    408     def __init__(self, booking): 
     408    def __init__(self, booking, user = None): 
    409409        WebcastRequestAdminNotificationBase.__init__(self, booking) 
    410410 
     
    412412                        % (self._conference.getTitle(), str(self._conference.getId()))) 
    413413 
     414        userInfo = "" 
     415        if user : 
     416            userInfo = " by %s %s" %(user.getFirstName(), user.getFamilyName().upper()) 
    414417        self.setBody("""Dear Webcast Responsible,<br /> 
    415418<br /> 
    416 A webcast request for the event: "%s" has been accepted in <a href="%s">%s</a><br /> 
     419A webcast request for the event: "%s" has been accepted in <a href="%s">%s</a>""" %(self._conference.getTitle(), 
     420                                                                                    MailTools.getServerName(), 
     421                                                                                    MailTools.getServerName()) 
     422+ userInfo + """.<br /> 
    417423Click <a href="%s">here</a> to view the request.<br /> 
    418424 
    419 """ % ( self._conference.getTitle(), 
    420         MailTools.getServerName(), 
    421         MailTools.getServerName(), 
    422         self._modifLink 
    423       )) 
     425""" % (self._modifLink)) 
    424426 
    425427 
  • indico/MaKaC/plugins/Collaboration/base.py

    re11c57 ra6c717  
    374374            raise ServiceError(_("Tried to check status of booking ") + str(id) + _(" of meeting ") + str(self._conf.getId()) + _(" but this booking does not support the check status service.")) 
    375375 
    376     def acceptBooking(self, id): 
     376    def acceptBooking(self, id, user = None): 
    377377        booking = self._bookings[id] 
    378378        if booking.hasAcceptReject(): 
    379379            if booking.getAcceptRejectStatus() is None: 
    380380                self._removeFromPendingIndex(booking) 
    381             booking.accept() 
     381            booking.accept(user) 
    382382            return booking 
    383383        else: 
     
    10191019        return self._statusClass 
    10201020 
    1021     def accept(self): 
     1021    def accept(self, user = None): 
    10221022        """ Sets this booking as accepted 
    10231023        """ 
    10241024        self._acceptRejectStatus = True 
    1025         self._accept() 
     1025        self._accept(user) 
    10261026 
    10271027    def reject(self, reason): 
     
    14561456            pass 
    14571457 
    1458     def _accept(self): 
     1458    def _accept(self, user = None): 
    14591459        """ To be overriden by inheriting classes 
    14601460            This method is called when a user with privileges presses the "Accept" button 
  • indico/MaKaC/services/implementation/collaboration.py

    r299cb7 ra6c717  
    189189    """ 
    190190    def _getAnswer(self): 
    191         return fossilize(self._CSBookingManager.acceptBooking(self._bookingId), 
     191        return fossilize(self._CSBookingManager.acceptBooking(self._bookingId, self.getAW().getUser()), 
    192192                                  None, tz = self._conf.getTimezone()) 
    193193 
  • indico/MaKaC/services/interface/rpc/process.py

    r626e2c ra6c717  
    2222        handler = endpoint.methodMap.get(functionName, None) 
    2323        if handler != None: 
    24             break         
     24            break 
    2525        try: 
    2626            endpointName, functionName = method.split(".", 1) 
     
    3434        else: 
    3535            raise RequestError("ERR-R1", "Unsupported method") 
    36          
     36 
    3737    return handler 
    3838 
     
    110110        if minfo.getRoomBookingModuleActive(): 
    111111            CrossLocationDB.connect() 
    112          
     112 
    113113def _endRequestSpecific2RH( commit = True ): 
    114114    minfo = info.HelperMaKaCInfo.getMaKaCInfoInstance() 
    115115    if minfo.getRoomBookingModuleActive(): 
    116         if commit:  
     116        if commit: 
    117117            CrossLocationDB.commit() 
    118         else:  
     118        else: 
    119119            CrossLocationDB.rollback() 
    120120        CrossLocationDB.disconnect() 
Note: See TracChangeset for help on using the changeset viewer.