Changeset eefc00 in indico


Ignore:
Timestamp:
06/08/10 11:49:19 (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:
df3d1f
Parents:
b19615
git-author:
Ian Rolewicz <ian.rolewicz@…> (05/17/10 10:20:31)
git-committer:
Jose Benito <jose.benito.gonzalez@…> (06/08/10 11:49:19)
Message:

[FIX] enable/disable conference feature problem

  • Observed that toggling on and off the features for a conference (like cfa, evaluation or registration) wasn't working under Opera and Google Chrome.
  • After discussion, decided to remove the boxes that enable/disable the features since they were of no use
  • Now all features are available in the side menu of the managment area of a conference.
  • Modified the hasEnabledSection() and hasSection() methods (that checks if the feature has its menu entry to be displayed or not) so that they always return True. Consequently, all the statements in the code where those methods are used were checked and modified accordingly to whether the statement had to refer to the feature being active or simply to the feature being displayed in the side menu of the managment area.
  • Modified the user guide to not show those boxes anymore.
Files:
16 edited

Legend:

Unmodified
Added
Removed
  • indico/MaKaC/conference.py

    rbb4453 reefc00  
    49084908 
    49094909    def hasEnabledSection(self, section): 
    4910         return section in self.getSections() 
     4910        # This hack is there since there is no more enable/disable boxes 
     4911        # in the conference managment area corresponding to those features. 
     4912        # Until the managment area is improved to get a more user-friendly 
     4913        # way of enabling/disabling those features, we always make them 
     4914        # available for the time being, but we keep the previous code for 
     4915        # further improvements 
     4916        #return section in self.getSections() 
     4917        if section in ["paperReviewing"] : 
     4918            return False 
     4919        else : 
     4920            return True 
    49114921 
    49124922    def enableSection(self, section): 
     
    50495059            "videoconference": _("Videoconference"), # only for meetings 
    50505060            "collaboration": _("Collaboration"), # only for meetings 
    5051             "regForm": _("Registration Form") , 
    5052             "epay": _("e-payment") 
     5061            "regForm": _("Registration Form") 
    50535062        } 
    50545063 
    50555064    def hasSection(self, s): 
    5056         return self._sections.has_key(s) 
     5065        # This hack is there since there is no more enable/disable boxes 
     5066        # in the conference managment area corresponding to those features. 
     5067        # Until the managment area is improved to get a more user-friendly 
     5068        # way of enabling/disabling those features, we always make them 
     5069        # available in the side menu for the time being, but we keep 
     5070        # the previous code for further improvements 
     5071        #return self._sections.has_key(s) 
     5072        return True 
    50575073 
    50585074    def getSections(self): 
  • indico/MaKaC/registration.py

    rd9fa47 reefc00  
    631631 
    632632#        if rp.getConference().getModPay().isActivated(): 
    633         if rp.getConference().hasEnabledSection("epay") and rp.getConference().getModPay().isActivated() and rp.doPay(): 
     633        if rp.getConference().getModPay().isActivated() and rp.doPay(): 
    634634            epaymentLink = "If you haven't paid for your registration yet, you can do it at %s" % urlHandlers.UHConfRegistrationFormCreationDone.getURL(rp) 
    635635            paymentWarning = ", but please, do not forget to proceed with the payment if you haven't done it yet (see the link at the end of this email)." 
  • indico/MaKaC/services/implementation/reviewing.py

    rbdd862 reefc00  
    5858        else: 
    5959            raise ServiceError("ERR-REV1a",_("Paper Reviewing is not active for this conference")) 
    60      
     60 
    6161    def _checkParams(self): 
    6262        ConferenceModifBase._checkParams(self) 
    6363        self._confReview = self._conf.getConfReview() 
    64              
     64 
    6565class ConferenceReviewingPRMBase(ConferenceReviewingBase): 
    6666    """ This base class verifies that the user is a PRM 
     
    6969        if not RCPaperReviewManager.hasRights(self): 
    7070            ConferenceReviewingBase._checkProtection(self) 
    71              
     71 
    7272class ConferenceReviewingAMBase(ConferenceReviewingBase): 
    7373    """ This base class verifies that the user is an AM 
     
    7676        if not RCAbstractManager.hasRights(self): 
    7777            ConferenceReviewingBase._checkProtection(self) 
    78              
     78 
    7979class ConferenceReviewingPRMAMBase(ConferenceReviewingBase): 
    8080    """ This base class verifies that the user is a PRM or an AM 
     
    8383        if not RCPaperReviewManager.hasRights(self) and not RCAbstractManager.hasRights(self): 
    8484            ConferenceReviewingBase._checkProtection(self) 
    85              
    86              
     85 
     86 
    8787class ConferenceReviewingPRMRefereeBase(ConferenceReviewingBase): 
    8888    """ This base class verifies that the user is a PRM or a Referee of the Conference 
     
    9191        if not RCPaperReviewManager.hasRights(self) and not RCReferee.hasRights(self): 
    9292            ConferenceReviewingBase._checkProtection(self) 
    93              
    94              
     93 
     94 
    9595class ConferenceReviewingAssignStaffBase(UserModificationBase, ConferenceReviewingBase): 
    9696    """ Base class for assigning referees, editors, etc. to contributions. 
     
    107107        else: 
    108108            raise ServiceError("ERR-REV2",_("List of contribution ids not set")) 
    109      
     109 
    110110class ConferenceReviewingAssignStaffBasePRM(ConferenceReviewingAssignStaffBase): 
    111111    """ Base class that inherits from ConferenceReviewingAssignStaffBase, 
    112112        and gives modification rights only to PRMs or Managers. 
    113113    """ 
    114      
     114 
    115115    def _checkProtection(self): 
    116116        if not RCPaperReviewManager.hasRights(self): 
    117117            ProtectedModificationService._checkProtection(self) 
    118              
     118 
    119119class ConferenceReviewingAssignStaffBasePRMReferee(ConferenceReviewingAssignStaffBase): 
    120120    """ Base class that inherits from ConferenceReviewingAssignStaffBase, 
     
    122122        case, only to referees of contributions in self._contributions). 
    123123    """ 
    124      
     124 
    125125    def _checkProtection(self): 
    126126        hasRights = False; 
     
    134134                    break 
    135135            hasRights = isRefereeOfAllContributions 
    136          
     136 
    137137        if not hasRights: 
    138138            ProtectedModificationService._checkProtection(self) 
     
    155155    #Note: don't change the order of the inheritance here! 
    156156    pass 
    157              
    158              
     157 
     158 
    159159class ConferenceReviewingModeModification(ConferenceReviewingSetupTextModificationBase ): 
    160      
     160 
    161161    def _handleSet(self): 
    162162        self._confReview.setReviewingMode( self._value ) 
    163          
     163 
    164164    def _handleGet(self): 
    165165        return self._confReview.getReviewingMode() 
    166          
    167          
     166 
     167 
    168168class ConferenceReviewingStatesModification(ConferenceReviewingListModificationBase): 
    169          
     169 
    170170    def _handleGet(self): 
    171171        return self._confReview.getStates() 
    172      
     172 
    173173    def _handleSet(self): 
    174174        self._confReview.setStates(self._value) 
    175          
    176          
     175 
     176 
    177177class ConferenceReviewingQuestionsModification(ConferenceReviewingListModificationBase): 
    178          
     178 
    179179    def _handleGet(self): 
    180180        return self._confReview.getReviewingQuestions() 
    181      
     181 
    182182    def _handleSet(self): 
    183183        self._confReview.setReviewingQuestions(self._value) 
    184          
    185          
     184 
     185 
    186186class ConferenceReviewingCriteriaModification(ConferenceReviewingListModificationBase): 
    187          
     187 
    188188    def _handleGet(self): 
    189189        return self._confReview.getLayoutCriteria() 
    190      
     190 
    191191    def _handleSet(self): 
    192192        self._confReview.setLayoutCriteria(self._value) 
    193          
    194          
     193 
     194 
    195195class ConferenceReviewingDefaultDueDateModification(ConferenceReviewingDateTimeModificationBase): 
    196      
     196 
    197197    def _checkParams(self): 
    198198        ConferenceReviewingDateTimeModificationBase._checkParams(self) 
    199199        self._dueDateToChange = self._params.get("dueDateToChange") 
    200          
     200 
    201201    def _setParam(self): 
    202202        if self._dueDateToChange == "Referee": 
     
    208208        else: 
    209209            raise ServiceError("ERR-REV3a",_("Kind of due date to change not set")) 
    210          
     210 
    211211    def _handleGet(self): 
    212212        if self._dueDateToChange == "Referee": 
     
    218218        else: 
    219219            raise ServiceError("ERR-REV3b",_("Kind of due date to change not set")) 
    220          
     220 
    221221        if date is None: 
    222222            return 'No date set yet' 
    223223        else: 
    224224            return datetime.datetime.strftime(date,'%d/%m/%Y %H:%M') 
    225          
    226          
     225 
     226 
    227227class ConferenceAbstractReviewingDefaultDueDateModification(ConferenceAbstractReviewingDateTimeModificationBase): 
    228      
     228 
    229229    def _setParam(self): 
    230230        self._conf.getConfReview().setDefaultAbstractReviewerDueDate(self._pTime) 
    231          
     231 
    232232    def _handleGet(self): 
    233233        date = self._conf.getConfReview().getAdjustedDefaultAbstractReviewerDueDate() 
     
    236236        else: 
    237237            return datetime.datetime.strftime(date,'%d/%m/%Y %H:%M') 
    238          
    239          
     238 
     239 
    240240class ConferenceReviewingCompetenceModification(ListModificationBase, ConferenceReviewingPRMAMBase): 
    241241    #Note: don't change the order of the inheritance here! 
     
    244244        Note: don't change the order of the inheritance! 
    245245    """ 
    246      
     246 
    247247    def _checkParams(self): 
    248248        ConferenceReviewingPRMAMBase._checkParams(self) 
     
    253253        else: 
    254254            raise ServiceError("ERR-REV4",_("No user id specified")) 
    255          
     255 
    256256    def _handleGet(self): 
    257257        return self._confReview.getCompetencesByUser(self._user) 
    258      
     258 
    259259    def _handleSet(self): 
    260260        self._confReview.setUserCompetences(self._user, self._value) 
     
    267267        Note: don't change the order of the inheritance! 
    268268    """ 
    269          
     269 
    270270    def _handleGet(self): 
    271271        if self._destination == "left": #left select box is the list of non-reviewable materials 
     
    273273        if self._destination == "right": #right select box is the list of reviewable materials 
    274274            return self._confReview.getReviewableMaterials() 
    275      
     275 
    276276    def _handleSet(self): 
    277277        if self._destination == "right": #right select box is the list of reviewable materials 
     
    291291        if self._role is None: 
    292292            raise ServiceError("ERR-REV5",_("No role specified")) 
    293          
     293 
    294294    def _handleGet(self): 
    295295        return [{"id": user.getId(), "name": user.getStraightFullName(), "competences": c} 
    296296                for user, c in self._confReview.getAllUserCompetences(True, self._role)] 
    297          
    298          
    299          
     297 
     298 
     299 
    300300class ConferenceReviewingAssignReferee(ConferenceReviewingAssignStaffBasePRM): 
    301301    """ Assigns a referee to a list of contributions 
     
    312312                rm.setReferee(self._targetUser) 
    313313        return True 
    314          
     314 
    315315class ConferenceReviewingRemoveReferee(ConferenceReviewingAssignStaffBasePRM): 
    316316    """ Removes the referee from a list of contributions 
     
    322322                rm.removeReferee() 
    323323        return True 
    324          
    325          
     324 
     325 
    326326class ConferenceReviewingAssignEditor(ConferenceReviewingAssignStaffBasePRMReferee): 
    327327    """ Assigns an editor to a list of contributions 
     
    330330        if not self._targetUser: 
    331331            raise ServiceError("ERR-REV6b",_("user id not set")) 
    332          
     332 
    333333        for contribution in self._contributions: 
    334334            rm = contribution.getReviewManager() 
     
    341341                raise ServiceError("ERR-REV9a",_("This contribution has no Referee yet")) 
    342342        return True 
    343          
     343 
    344344class ConferenceReviewingRemoveEditor(ConferenceReviewingAssignStaffBasePRMReferee): 
    345345    """ Removes the editor from a list of contributions 
     
    359359        if not self._targetUser: 
    360360            raise ServiceError("ERR-REV6c",_("user id not set")) 
    361          
     361 
    362362        for contribution in self._contributions: 
    363363            rm = contribution.getReviewManager() 
    364364            if rm.hasReferee(): 
    365                 if not rm.isReviewer(self._targetUser):  
     365                if not rm.isReviewer(self._targetUser): 
    366366                    rm.addReviewer(self._targetUser) 
    367367            else: 
     
    371371class ConferenceReviewingRemoveReviewer(ConferenceReviewingAssignStaffBasePRMReferee): 
    372372    """ Removes a given reviewer from a list of contributions 
    373     """   
     373    """ 
    374374    def _getAnswer(self): 
    375375        if not self._targetUser: 
    376376            raise ServiceError("ERR-REV6d",_("user id not set")) 
    377          
    378         for contribution in self._contributions: 
    379             rm = contribution.getReviewManager()  
     377 
     378        for contribution in self._contributions: 
     379            rm = contribution.getReviewManager() 
    380380            rm.removeReviewer(self._targetUser) 
    381381        return True 
     
    384384class ConferenceReviewingRemoveAllReviewers(ConferenceReviewingAssignStaffBasePRMReferee): 
    385385    """ Removes all the reviewers from a list of contributions 
    386     """   
     386    """ 
    387387    def _getAnswer(self): 
    388388        for contribution in self._contributions: 
     
    396396##################################### 
    397397class ContributionReviewingBase(ProtectedModificationService, ContributionBase): 
    398      
     398 
    399399    def _checkParams(self): 
    400400        ContributionBase._checkParams(self) 
    401401        self._current = self._params.get("current", None) 
    402      
     402 
    403403    def _checkProtection(self): 
    404404        if self._target.getConference().hasEnabledSection("paperReviewing"): 
     
    410410            elif self._current == 'reviewerJudgement': 
    411411                hasRights = RCContributionReviewer.hasRights(self) 
    412              
     412 
    413413            if not hasRights and not RCPaperReviewManager.hasRights(self): 
    414                 ProtectedModificationService._checkProtection(self)    
     414                ProtectedModificationService._checkProtection(self) 
    415415        else: 
    416416            raise ServiceError("ERR-REV1b",_("Paper Reviewing is not active for this conference")) 
    417            
    418              
     417 
     418 
    419419    def getJudgementObject(self): 
    420         lastReview = self._target.getReviewManager().getLastReview()  
     420        lastReview = self._target.getReviewManager().getLastReview() 
    421421        if self._current == 'refereeJudgement': 
    422422            return lastReview.getRefereeJudgement() 
     
    442442 
    443443class ContributionReviewingDueDateModification(ContributionReviewingDateTimeModificationBase): 
    444      
     444 
    445445    def _checkParams(self): 
    446446        ContributionReviewingDateTimeModificationBase._checkParams(self) 
    447447        self._dueDateToChange = self._params.get("dueDateToChange") 
    448          
    449          
     448 
     449 
    450450    def _setParam(self): 
    451451        lastReview = self._target.getReviewManager().getLastReview() 
     
    458458        else: 
    459459            raise ServiceError("ERR-REV3c",_("Kind of due date to change not set")) 
    460          
     460 
    461461    def _handleGet(self): 
    462462        lastReview = self._target.getReviewManager().getLastReview() 
     
    469469        else: 
    470470            raise ServiceError("ERR-REV3d",_("Kind of due date to change not set")) 
    471          
     471 
    472472        return datetime.datetime.strftime(date,'%d/%m/%Y %H:%M') 
    473473 
    474474class ContributionReviewingJudgementModification(ContributionReviewingTextModificationBase): 
    475      
     475 
    476476    def _handleSet(self): 
    477477        if self.getJudgementObject().isSubmitted(): 
    478478            raise ServiceError("ERR-REV8a",_("You cannot modify a judgement marked as submitted")) 
    479479        self.getJudgementObject().setJudgement(self._value) 
    480          
     480 
    481481    def _handleGet(self): 
    482482        judgement = self.getJudgementObject().getJudgement() 
     
    487487 
    488488class ContributionReviewingCommentsModification(ContributionReviewingHTMLModificationBase): 
    489      
     489 
    490490    def _handleSet(self): 
    491491        if self.getJudgementObject().isSubmitted(): 
    492492            raise ServiceError("ERR-REV8b",_("You cannot modify a judgement marked as submitted")) 
    493493        self.getJudgementObject().setComments(self._value) 
    494          
    495     def _handleGet(self):    
     494 
     495    def _handleGet(self): 
    496496        return self.getJudgementObject().getComments() 
    497      
     497 
    498498class ContributionReviewingCriteriaModification(ContributionReviewingTextModificationBase): 
    499      
     499 
    500500    def _checkParams(self): 
    501501        ContributionReviewingTextModificationBase._checkParams(self) 
    502502        self._criterion = self._params.get("criterion") 
    503      
     503 
    504504    def _handleSet(self): 
    505505        if self.getJudgementObject().isSubmitted(): 
    506506            raise ServiceError("ERR-REV8c",_("You cannot modify a judgement marked as submitted")) 
    507507        self.getJudgementObject().setAnswer(self._criterion, int(self._value)) 
    508          
     508 
    509509    def _handleGet(self): 
    510510        return self.getJudgementObject().getAnswer(self._criterion) 
    511              
    512      
     511 
     512 
    513513class ContributionReviewingSetSubmitted(ContributionReviewingBase): 
    514          
     514 
    515515    def _getAnswer( self ): 
    516          
     516 
    517517        if self._params.has_key('value'): 
    518518            judgementObject = self.getJudgementObject() 
     
    521521            except MaKaCError, e: 
    522522                raise ServiceError("ERR-REV9", e.getMsg()) 
    523                  
     523 
    524524            judgementObject.setAuthor(self._getUser()) 
    525525            judgementObject.sendNotificationEmail(widthdrawn = not self.getJudgementObject().isSubmitted()) 
     
    527527 
    528528class ContributionReviewingCriteriaDisplay(ContributionReviewingBase): 
    529          
     529 
    530530    def _getAnswer( self ): 
    531531        return [str(q) + " : " + ConferenceReview.reviewingQuestionsAnswers[int(a)] 
    532532                for q,a in self.getJudgementObject().getAnswers()] 
    533          
     533 
    534534 
    535535 
     
    544544    "conference.changeReviewableMaterials" : ConferenceReviewingReviewableMaterialsModification, 
    545545    "conference.userCompetencesList": ConferenceReviewingUserCompetenceList, 
    546      
     546 
    547547    "conference.assignReferee" : ConferenceReviewingAssignReferee, 
    548548    "conference.removeReferee" : ConferenceReviewingRemoveReferee, 
     
    552552    "conference.removeReviewer" : ConferenceReviewingRemoveReviewer, 
    553553    "conference.removeAllReviewers" : ConferenceReviewingRemoveAllReviewers, 
    554      
     554 
    555555    "contribution.changeDueDate": ContributionReviewingDueDateModification, 
    556556    "contribution.changeComments": ContributionReviewingCommentsModification, 
  • indico/MaKaC/webinterface/pages/conferences.py

    r9a76d0 reefc00  
    159159        self._cfaViewSubmissionsOpt = self._sectionMenu.getLinkByName("ViewAbstracts") 
    160160        self._abstractsBookOpt = self._sectionMenu.getLinkByName("abstractsBook") 
    161         self._cfaOpt.setVisible(self._conf.getAbstractMgr().isActive()) 
    162         if not self._conf.hasEnabledSection("cfa"): 
     161        if not self._conf.getAbstractMgr().isActive() or not self._conf.hasEnabledSection("cfa"): 
    163162            self._cfaOpt.setVisible(False) 
    164163            self._abstractsBookOpt.setVisible(False) 
    165164        else: 
     165            self._cfaOpt.setVisible(True) 
    166166            self._abstractsBookOpt.setVisible(True) 
    167167        self._trackMgtOpt = self._sectionMenu.getLinkByName("manageTrack") 
     
    171171        self._viewRegFormOpt = self._sectionMenu.getLinkByName("ViewMyRegistration") 
    172172        self._newRegFormOpt = self._sectionMenu.getLinkByName("NewRegistration") 
    173         self._regFormOpt.setVisible(self._conf.getRegistrationForm().isActivated()) 
    174173        if awUser != None: 
    175174            self._viewRegFormOpt.setVisible(awUser.isRegisteredInConf(self._conf)) 
     
    179178            self._newRegFormOpt.setVisible(True) 
    180179        self._registrantsListOpt = self._sectionMenu.getLinkByName("registrants") 
    181         if not self._conf.hasEnabledSection("regForm"): 
     180        if not self._conf.getRegistrationForm().isActivated() or not self._conf.hasEnabledSection("regForm"): 
    182181            self._regFormOpt.setVisible(False) 
    183182            self._registrantsListOpt.setVisible(False) 
    184183        else: 
     184            self._regFormOpt.setVisible(True) 
    185185            self._registrantsListOpt.setVisible(True) 
    186186 
     
    222222            self._myTracksOpt.setCaption( _("My track")) 
    223223            self._myTracksOpt.setURL(urlHandlers.UHTrackModifAbstracts.getURL(lt[0])) 
    224         if not self._conf.hasEnabledSection("cfa"): 
     224        if not self._conf.getAbstractMgr().isActive() or not self._conf.hasEnabledSection("cfa"): 
    225225            self._myTracksOpt.setVisible(False) 
    226226        self._myContribsOpt=self._sectionMenu.getLinkByName("mycontribs") 
     
    237237            self._trackMgtOpt.setURL(str(url)) 
    238238            self._trackMgtOpt.setVisible(True) 
    239             if not self._conf.hasEnabledSection("cfa"): 
     239            if not self._conf.getAbstractMgr().isActive() or not self._conf.hasEnabledSection("cfa"): 
    240240                self._trackMgtOpt.setVisible(False) 
    241241 
     
    10621062        vars["bulletURL"] = Config.getInstance().getSystemIconURL( "track_bullet" ) 
    10631063        mgtIconHTML = "" 
    1064         if self._track.getConference().hasEnabledSection("cfa") and self._track.canCoordinate( self._aw ): 
     1064        if self._track.getConference().getAbstractMgr().isActive() and self._track.getConference().hasEnabledSection("cfa") and self._track.canCoordinate( self._aw ): 
    10651065            url = urlHandlers.UHTrackModifAbstracts.getURL( self._track ) 
    10661066            if self._track.getConference().canModify( self._aw ): 
     
    21692169            self._regFormMenuItem.setVisible(False) 
    21702170 
    2171         if not (self._conf.getType() == "conference" and self._conf.hasEnabledSection('paperReviewing') and (canModify or isReviewingStaff)): 
    2172             self._reviewingMenuItem.setVisible(False) 
    2173         else: #reviewing tab is enabled 
    2174             if isReviewingStaff and not canModify: 
    2175                 self._reviewingMenuItem.setVisible(True) 
     2171#        if not (self._conf.getType() == "conference" and self._conf.hasEnabledSection('paperReviewing') and (canModify or isReviewingStaff)): 
     2172#            self._reviewingMenuItem.setVisible(False) 
     2173#        else: #reviewing tab is enabled 
     2174#            if isReviewingStaff and not canModify: 
     2175#                self._reviewingMenuItem.setVisible(True) 
     2176        # For now we don't want the paper reviewing to be displayed 
     2177        self._reviewingMenuItem.setVisible(False) 
     2178 
    21762179 
    21772180        if not (canModify or 
     
    27652768                type.getDescription())) 
    27662769        vars["typeList"] = "".join(typeList) 
    2767         #if not self._conf.isClosed(): 
    2768         #    vars["status"] = "close" 
    2769         #    vars["statusURL"] = urlHandlers.UHConferenceClose.getURL(self._conf) 
    2770         #else: 
    2771         #    vars["status"] = "open" 
    2772         #    vars["statusURL"] = urlHandlers.UHConferenceOpen.getURL(self._conf) 
    2773         #-----Setting of the sections of the conference-------- 
    2774         vars["enablePic"]=Config.getInstance().getSystemIconURL( "enabledSection" ) 
    2775         vars["disablePic"]=Config.getInstance().getSystemIconURL( "disabledSection" ) 
    2776         enabledText = _("Click to disable") 
    2777         disabledText = _("Click to enable") 
    2778         lsect=[] 
    2779         for sect in conference.ConfSectionsMgr().getSectionKeys(): 
    2780  
    2781             # Videoconference section should not appear in conferences 
    2782             if sect in ['collaboration', 'paperReviewing','videoconference']: 
    2783                 continue 
    2784  
    2785             url=urlHandlers.UHConfSectionsSettings.getURL(self._conf) 
    2786             url.addParam("sectionId", sect) 
    2787             url=quoteattr("%s#sections"%str(url)) 
    2788             if self._conf.hasEnabledSection(sect): 
    2789                 icon=vars["enablePic"] 
    2790                 textIcon=enabledText 
    2791             else: 
    2792                 icon=vars["disablePic"] 
    2793                 textIcon=disabledText 
    2794             lsect.append(""" 
    2795                             <tr> 
    2796                                 <td> 
    2797                                     <a href=%s><img src=%s alt="%s" class="imglink"></a>&nbsp;<a href=%s>%s</a> 
    2798                                 </td> 
    2799                             </tr> 
    2800                             """%(url, \ 
    2801                                 icon, \ 
    2802                                 textIcon, \ 
    2803                                 url, \ 
    2804                                 conference.ConfSectionsMgr().getSection(sect))) 
    2805         vars["sections"]="".join(lsect) 
    28062770        #------------------------------------------------------ 
    28072771        vars["reportNumbersTable"]=wcomponents.WReportNumbersTable(self._conf).getHTML() 
     
    77837747    def _getAdditionalFieldsHTML(self): 
    77847748        html="" 
    7785         if self.__owner.getConference().hasEnabledSection("cfa") and self.__owner.getConference().getAbstractMgr().hasAnyEnabledAbstractField(): 
     7749        if self.__owner.getConference().getAbstractMgr().isActive() and self.__owner.getConference().hasEnabledSection("cfa") and self.__owner.getConference().getAbstractMgr().hasAnyEnabledAbstractField(): 
    77867750            for f in self.__owner.getConference().getAbstractMgr().getAbstractFieldsMgr().getFields(): 
    77877751                if f.isActive(): 
     
    78677831    def _getAdditionalFieldsHTML(self): 
    78687832        html="" 
    7869         if self._conf.hasEnabledSection("cfa") and \ 
     7833        if self._conf.getAbstractMgr().isActive() and \ 
     7834                self._conf.hasEnabledSection("cfa") and \ 
    78707835                self._conf.getType() == "conference" and \ 
    78717836                self._conf.getAbstractMgr().hasAnyEnabledAbstractField(): 
     
    93589323 
    93599324    def _getTracksHTML(self): 
    9360         if self._aw.getUser() is None or not self._conf.hasEnabledSection("cfa"): 
     9325        if self._aw.getUser() is None or not self._conf.getAbstractMgr().isActive() or not self._conf.hasEnabledSection("cfa"): 
    93619326            return "" 
    93629327        lt=self._conf.getCoordinatedTracks(self._aw.getUser()) 
  • indico/MaKaC/webinterface/pages/contributions.py

    r8989f6 reefc00  
    551551 
    552552    def _getAbstractHTML( self ): 
    553         if not self._contrib.getConference().hasEnabledSection("cfa"): 
     553        if not self._contrib.getConference().getAbstractMgr().isActive() or not self._contrib.getConference().hasEnabledSection("cfa"): 
    554554            return "" 
    555555        abs = self._contrib.getAbstract() 
     
    663663    def _getAdditionalFieldsHTML(self): 
    664664        html="" 
    665         if self._contrib.getConference().hasEnabledSection("cfa") and self._contrib.getConference().getAbstractMgr().hasAnyEnabledAbstractField(): 
     665        if self._contrib.getConference().getAbstractMgr().isActive() and self._contrib.getConference().hasEnabledSection("cfa") and self._contrib.getConference().getAbstractMgr().hasAnyEnabledAbstractField(): 
    666666            for f in self._contrib.getConference().getAbstractMgr().getAbstractFieldsMgr().getFields(): 
    667667                if f.isActive(): 
     
    12301230    def _getAdditionalFieldsHTML(self): 
    12311231        html="" 
    1232         if self._contrib.getConference().hasEnabledSection("cfa") and \ 
     1232        if self._contrib.getConference().getAbstractMgr().isActive() and \ 
     1233                self._contrib.getConference().hasEnabledSection("cfa") and \ 
    12331234                self._contrib.getConference().getType() == "conference" and \ 
    12341235                self._contrib.getConference().getAbstractMgr().hasAnyEnabledAbstractField(): 
  • indico/MaKaC/webinterface/pages/registrants.py

    rd9fa47 reefc00  
    177177        if display == []: 
    178178            display=["Email", "Institution","Phone","City","Country"] 
    179             if self._conf.hasEnabledSection("epay"): 
     179            if self._conf.getModPay().isActivated(): 
    180180                display.extend(["isPayed","idpayment","amountToPay"]) 
    181181        return display 
     
    10311031        elif self._registrant.doPay(): 
    10321032            urlEpayment="" 
    1033             if self._registrant.getConference().hasEnabledSection("epay") and self._registrant.getConference().getModPay().isActivated() and self._registrant.doPay(): 
     1033            if self._registrant.getConference().getModPay().isActivated() and self._registrant.doPay(): 
    10341034                urlEpayment = """<br/><br/><i>Direct access link for epayment:</i><br/><small>%s</small>"""%escape(str(urlHandlers.UHConfRegistrationFormCreationDone.getURL(self._registrant))) 
    10351035            return _(""" <form action=%s method="POST"> 
  • indico/MaKaC/webinterface/pages/registrationForm.py

    rd9fa47 reefc00  
    5959            self._tabEPay.disable() 
    6060            self._tabRegistrationPreview.disable() 
    61         if not self._conf.hasEnabledSection("epay"): 
    62             self._tabEPay.disable() 
    6361 
    6462    def _getPageContent(self, params): 
     
    22552253        modPay=self._conf.getModPay() 
    22562254        html=[] 
    2257         if self._conf.hasEnabledSection("epay") and modPay.isActivated() and self._registrant.doPay(): 
     2255        if modPay.isActivated() and self._registrant.doPay(): 
    22582256            total={} 
    22592257            total["value"]=0 
     
    23792377        vars["paymentInfo"]  = self._getPaymentInfo() 
    23802378        vars["epaymentAnnounce"] = "" 
    2381         if self._conf.hasEnabledSection("epay") and self._conf.getModPay().isActivated() and self._registrant.doPay(): 
     2379        if self._conf.getModPay().isActivated() and self._registrant.doPay(): 
    23822380            vars["epaymentAnnounce"] = """<br><font color="black">Please proceed to the <b>payment of your order</b> (by using the "Next" button down this page). You will then receive the payment details.</font>""" 
    23832381        return vars 
  • indico/MaKaC/webinterface/pages/tracks.py

    rbdd862 reefc00  
    9393        self._tabAbstracts = self._tabCtrl.newTab( "abstracts", _("Abstracts"), \ 
    9494                urlHandlers.UHTrackModifAbstracts.getURL( self._track ) ) 
    95         if self._conf.hasEnabledSection("cfa"): 
     95        if  self._conf.getAbstractMgr().isActive() and self._conf.hasEnabledSection("cfa"): 
    9696            self._tabAbstracts.enable() 
    9797            self._tabCoordination.enable() 
  • indico/MaKaC/webinterface/rh/CFADisplay.py

    rdd1ff0 reefc00  
    541541    def _checkProtection( self ): 
    542542        RHConferenceBaseDisplay._checkProtection(self) 
    543         if not self._conf.hasEnabledSection("cfa"): 
     543        if not self._conf.getAbstractMgr().isActive() or not self._conf.hasEnabledSection("cfa"): 
    544544            raise MaKaCError( _("The Call For Abstracts was disabled by the conference managers")) 
    545545 
     
    562562    def _checkProtection( self ): 
    563563        RHConferenceBaseDisplay._checkProtection(self) 
    564         if not self._conf.hasEnabledSection("cfa"): 
     564        if not self._conf.getAbstractMgr().isActive() or not self._conf.hasEnabledSection("cfa"): 
    565565            raise MaKaCError( _("The Call For Abstracts was disabled by the conference managers")) 
    566566 
  • indico/MaKaC/webinterface/rh/categoryDisplay.py

    r48a9df reefc00  
    247247            else : 
    248248                c.disableSessionSlots() 
     249 
    249250        return c 
    250251 
  • indico/MaKaC/webinterface/rh/conferenceDisplay.py

    re309f6 reefc00  
    933933    def _checkProtection( self ): 
    934934        RHConferenceBaseDisplay._checkProtection(self) 
    935         if not self._conf.hasEnabledSection("cfa"): 
     935        if not self._conf.getAbstractMgr().isActive() or not self._conf.hasEnabledSection("cfa"): 
    936936            raise MaKaCError( _("The Call For Abstracts was disabled by the conference managers")) 
    937937 
  • indico/MaKaC/webinterface/rh/ePaymentModif.py

    rc6b710 reefc00  
    2929from MaKaC.common import HelperMaKaCInfo 
    3030from MaKaC.i18n import _ 
     31from MaKaC.webinterface.pages import registrationForm 
    3132 
    3233class RHEPaymentModifBase( conferenceModif.RHConferenceModifBase ): 
     
    3435    def _checkProtection( self ): 
    3536        conferenceModif.RHConferenceModifBase._checkProtection(self) 
    36         if not self._conf.hasEnabledSection("epay"): 
    37             raise MaKaCError( _("The registration form was disabled by the conference managers")) 
    3837 
    3938class RHEPaymentModif( RHEPaymentModifBase ): 
  • indico/MaKaC/webinterface/rh/evaluationModif.py

    rbdd862 reefc00  
    3434class RHEvaluationBase(conferenceModif.RHConferenceModifBase): 
    3535    """Basis of an Evaluation""" 
    36      
     36 
    3737    def _checkProtection(self): 
    3838        conferenceModif.RHConferenceModifBase._checkProtection(self) 
     
    4242class RHEvaluationSetup(RHEvaluationBase): 
    4343    """Modification of an Evaluation.""" 
    44      
     44 
    4545    def _process(self): 
    4646        return evaluations.WPConfModifEvaluationSetup(self, self._conf).display() 
     
    4848class RHEvaluationSetupChangeStatus( RHEvaluationBase ): 
    4949    """changes status of an Evaluation.""" 
    50      
     50 
    5151    def _checkParams( self, params ): 
    5252        RHEvaluationBase._checkParams( self, params ) 
    5353        self._newStatus = params.get("changeTo", False) 
    54          
     54 
    5555    def _process( self ): 
    5656        evaluation = self._conf.getEvaluation() 
     
    6363class RHEvaluationSetupSpecialAction( RHEvaluationBase ): 
    6464    """processes a special action.""" 
    65          
     65 
    6666    def _process( self ): 
    6767        params = self.getRequestParams() 
     
    8484            evaluation.reinit() 
    8585        self._redirect(urlHandlers.UHConfModifEvaluationSetup.getURL(self._conf)) 
    86          
     86 
    8787    def _exportXml(self, evaluation, params): 
    8888        """exportation of an evaluation.""" 
     
    9797        self._req.headers_out["Content-Disposition"] = 'inline; filename="%s"'%Evaluation._XML_FILENAME 
    9898        return xmlFile 
    99          
     99 
    100100    def _importedXml(self, evaluation, params): 
    101101        """ Importation of an evaluation. 
     
    181181                                    isSelected = self._getValue(choiceItemNode,"isSelected") 
    182182                                    question.insertChoiceItem(itemText, isSelected) 
    183          
     183 
    184184    def _getElement(self, container, tagname): 
    185185        """ Find the first element with given tagname contained in given container element. 
    186186            If not found, return an empty Element tagged "_empty" (in order to avoid crashes). 
    187              
     187 
    188188            Params: 
    189189                container -- an Element containing the wanted element 
     
    198198        else : 
    199199            return Element("_empty") 
    200          
     200 
    201201    def _getValue(self, container, tagname): 
    202202        """ finds the first leaf element with given tagname contained in given element, 
    203203            and returns its value. 
    204              
     204 
    205205            Params: 
    206206                container -- a non leaf Element containing the wanted leaf element 
     
    212212        #given a leaf node, returns its value. 
    213213        return utils.nodeValue(leafNode) 
    214              
     214 
    215215class RHEvaluationSetupDataModif( RHEvaluationBase ): 
    216216    """called when you want to change general parameters of your evaluation.""" 
    217      
     217 
    218218    def _process( self ): 
    219219        return evaluations.WPConfModifEvaluationSetupDataModif( self, self._conf ).display() 
    220              
     220 
    221221class RHEvaluationSetupPerformDataModif( RHEvaluationBase ): 
    222222    """performs changes to general parameters of the evaluation.""" 
     
    283283                newSubmissionNotification.setCCList(newSubmissionNotifyCc) 
    284284                evaluation.setNotification(Evaluation._NEW_SUBMISSION, newSubmissionNotification) 
    285          
     285 
    286286        #redirecting... 
    287287        self._redirect(urlHandlers.UHConfModifEvaluationSetup.getURL(self._conf)) 
     
    290290class RHEvaluationEdit(RHEvaluationBase): 
    291291    """Edition of questions of an Evaluation.""" 
    292      
     292 
    293293    def _process(self): 
    294294        return evaluations.WPConfModifEvaluationEdit(self, self._conf).display() 
    295              
     295 
    296296class RHEvaluationEditPerformChanges( RHEvaluationBase ): 
    297297    """performs changes for Evaluation questions.""" 
     
    308308        questionValue = params.get("questionValue","").strip() 
    309309        keyword = params.get("keyword","").strip() 
    310          
     310 
    311311        ################### 
    312312        #check consistency# 
     
    322322                if choiceItem_1==choiceItem_2: 
    323323                    raise FormValuesError("Please enter different values for Choice Items.", "Evaluation") 
    324          
     324 
    325325        ########## 
    326326        #Add mode# 
     
    338338            #set params for question 
    339339            self._setQuestionParams(question, params) 
    340              
     340 
    341341        ########### 
    342342        #Edit mode# 
     
    359359                    if posChange>0: 
    360360                        self._evaluation.getQuestionAt(i).setPosition(posChange) 
    361              
     361 
    362362        ############# 
    363363        #Delete mode# 
     
    366366            #DON'T USE params:newPos BUT params:questionPos which is edited question position!!! 
    367367            self._evaluation.removeQuestion(int(params.get("questionPos",-1))) 
    368              
     368 
    369369        #redirecting... 
    370370        self._redirect(urlHandlers.UHConfModifEvaluationEdit.getURL(self._conf)) 
    371          
     371 
    372372    def _setQuestionParams(self, question, params): 
    373373        """ set the parameters for the given question with the dictionary (params). 
     
    412412                    question.insertChoiceItem(itemText, isSelected) 
    413413                currentItemId += 1 
    414      
     414 
    415415 
    416416class RHEvaluationPreview(RHEvaluationBase): 
    417417    """Preview of an Evaluation.""" 
    418      
     418 
    419419    def _process(self): 
    420420        params = self.getRequestParams() 
     
    427427class RHEvaluationResults(RHEvaluationBase): 
    428428    """Results of an Evaluation.""" 
    429      
     429 
    430430    def _process(self): 
    431431        return evaluations.WPConfModifEvaluationResults(self, self._conf).display() 
     
    434434class RHEvaluationResultsOptions(RHEvaluationBase): 
    435435    """Do asked actions for the results.""" 
    436      
     436 
    437437    def _process(self): 
    438438        #################### 
     
    490490            self._req.headers_out["Content-Disposition"] = 'inline; filename="%s"'%Evaluation._CSV_FILENAME 
    491491            return excelFile 
    492          
     492 
    493493        ######## 
    494494        #remove# 
     
    505505        #redirecting... 
    506506        self._redirect(urlHandlers.UHConfModifEvaluationResults.getURL(self._conf)) 
    507          
     507 
    508508class RHEvaluationResultsSubmittersActions(RHEvaluationBase): 
    509509    """Do asked actions for the submitters.""" 
    510      
     510 
    511511    def _process(self): 
    512512        #################### 
     
    518518        select = params.has_key(Evaluation._SELECT_SUBMITTERS) 
    519519        sessionVarName = "selectedSubmissions_%s_%s"%(self._conf.getId(), evaluation.getId()) 
    520          
     520 
    521521        ######## 
    522522        #remove# 
     
    533533                for submission in removedSubmissions: 
    534534                    evaluation.removeSubmission(submission) 
    535          
     535 
    536536        ########## 
    537537        #selected# 
  • indico/MaKaC/webinterface/rh/registrantsDisplay.py

    rbdd862 reefc00  
    2727 
    2828class RHRegistrantsDisplayBase( conferenceDisplay.RHConferenceBaseDisplay): 
    29      
     29 
    3030    def _checkProtection( self ): 
    3131        conferenceDisplay.RHConferenceBaseDisplay._checkProtection(self) 
    32         if not self._conf.hasEnabledSection("regForm") or not displayMgr.ConfDisplayMgrRegistery().getDisplayMgr(self._conf).getMenu().getLinkByName("registrants").isEnabled(): 
     32        if not self._conf.getEvaluation().isVisible() or not self._conf.hasEnabledSection("regForm") or not displayMgr.ConfDisplayMgrRegistery().getDisplayMgr(self._conf).getMenu().getLinkByName("registrants").isEnabled(): 
    3333            raise NoReportError("The registrants list page was disabled by the conference managers") 
    3434 
     
    4444        else: 
    4545            self._sessionFilterName="session" 
    46          
    47         filterUsed=params.has_key("OK")  
     46 
     47        filterUsed=params.has_key("OK") 
    4848        filter = {} 
    49          
     49 
    5050        sessform =regForm.getSessionsForm() 
    5151        sesstypes = sessform.getSessionList() 
     
    6161            sessionShowNoValue =  params.has_key("sessionShowNoValue") 
    6262        self._filterCrit.getField(self._sessionFilterName).setShowNoValue( sessionShowNoValue ) 
    63          
     63 
    6464        # ---- SORTING ---- 
    6565        self._sortingCrit = regFilters.SortingCriteria( [params.get( "sortBy", "Name" ).strip()] ) 
    6666        self._order = params.get("order","down") 
    67      
     67 
    6868    def _process( self ): 
    6969        p = registrants.WPConfRegistrantsList( self, self._conf ) 
  • indico/MaKaC/webinterface/tpls/ConfModifMainData.tpl

    r9033fd reefc00  
    3838        <td colspan="3" class="horizontalLine">&nbsp;</td> 
    3939    </tr> 
    40     <tr> 
    41         <td class="dataCaptionTD"> 
    42           <a name="sections"></a> 
    43           <span class="dataCaptionFormat"> <%= _("Management features")%></span> 
    44           <br> 
    45           <br> 
    46           <img src="<%=enablePic%>" alt="<%= _("Click to disable")%>"> <small> <%= _("Enabled feature")%></small> 
    47           <br> 
    48           <img src="<%=disablePic%>" alt="<%= _("Click to enable")%>"> <small> <%= _("Disabled feature")%></small> 
    49         </td> 
    50         <td bgcolor="white" width="100%%" class="blacktext" style="padding-left:20px"> 
    51             <table align="left"> 
    52             <%=sections%> 
    53             </table> 
    54         </td> 
    55     </tr> 
    56         <tr> 
    57         <td colspan="3" class="horizontalLine">&nbsp;</td> 
    58     </tr> 
    5940</table> 
    6041 
Note: See TracChangeset for help on using the changeset viewer.