Exemple #1
0
    def __init__( self, conference):
        """ Constructor.
            conference must be a Conference object (not an id).
        """

        self._conference = conference

        #lists of users with reviewing roles
        self._reviewersList = []
        self._editorsList = []
        self._refereesList = []
        self._paperReviewManagersList = []

        self._refereeContribution = {} #key: user, value: list of contributions where user is referee
        self._editorContribution = {} #key: user, value: list of contributions where user is editor
        self._reviewerContribution = {} #key: user, value: list of contributions where user is reviewer

        self.setChoice(self.NO_REVIEWING) #initial reviewing mode: no reviewing

        #default dates
        self._startSubmissionDate = None
        self._endSubmissionDate = None
        self._defaultRefereeDueDate = None
        self._defaultEditorDueDate = None
        self._defaultReviwerDueDate = None

        #auto e-mails
        self._enablePRMEmailNotif = True
        self._enableRefereeEmailNotif = False
        self._enableEditorEmailNotif = False
        self._enableReviewerEmailNotif = False
        self._enableRefereeEmailNotifForContribution = False
        self._enableEditorEmailNotifForContribution = False
        self._enableReviewerEmailNotifForContribution = False
        self._enableRefereeJudgementEmailNotif = False
        self._enableEditorJudgementEmailNotif = False
        self._enableReviewerJudgementEmailNotif = False
        self._enableAuthorSubmittedMatRefereeEmailNotif = False
        self._enableAuthorSubmittedMatEditorEmailNotif = False
        self._enableAuthorSubmittedMatReviewerEmailNotif = False
        self._enableEditorSubmittedRefereeEmailNotif = False
        self._enableReviewerSubmittedRefereeEmailNotif = False

        self._statuses = [] # list of content reviewing and final judgement
        self._reviewingQuestions = [] #list of content reviewing and final judgement questions
        self._layoutQuestions = [] #list of layout editing criteria
        self._templates = {} #dictionary with layout templates. key: id, value: Template object
        self._templateCounter = Counter(1) #counter to make new id's for the templates
        self._userCompetences = {} #dictionary with the competences of each user. key: user, value: list of competences
        self._userCompetencesByTag = {} #dictionary with the users for each competence. key: competence, value: list of users
        self._reviewingMaterials = {}
        self.notifyModification()

        # id generators
        self._statusCounter = Counter(1)
        self._questionCounter = Counter(1)
        self._answerCounter = Counter(1)
        self.addStatus("Accept", False)
        self.addStatus("To be corrected", False)
        self.addStatus("Reject", False)
Exemple #2
0
    def __init__(self, conference):
        """
        conference must be a Conference object (not an id).
        """
        self._conference = conference
        self._reviewingQuestions = []

        # by default
        self._numberOfAnswers = 7
        self._scaleLower = 0
        self._scaleHigher = 10
        self._rbLabels = ["0", "", "", "5", "", "", "10"]
        self._rbTitles = ["0", "1.7", "3.3", "5", "6.7", "8.3", "10"]
        self._questionCounter = Counter(1)
        self._answerCounter = Counter(1)
        self.notifyModification()
Exemple #3
0
    def __init__(self, id, templateData):
        """ Class Constructor
            templateData is the templateData string used in the method storeTemplate() of the class
            BadgeTemplateManager, transformed to a Python object with the function loads().
            IMPORTANT NOTE: loads() builds an objet with unicode objects inside.
                            if these objects are then concatenated to str objects (for example in an Indico HTML template),
                            this can give problems. In those cases transform the unicode object to str with .encode('utf-8').
            Thus, its structure is a list composed of:
                -The name of the template
                -A dictionary with 2 keys: width and height of the template, in pixels.
                -A number which is the number of pixels per cm. It is defined in ConfModifBadgeDesign.tpl. Right now its value is 50.
                -The index of the background used in the template, among the several backgrounds of the template. -1 if none
                -A list of dictionaries. Each dictionary has the attributes of one of the items of the template.

        """
        self.__id = id
        self.__templateData = templateData
        self.__cleanData()
        self.__backgroundCounter = Counter(
        )  #for the backgrounds (in the future there may be more than 1 background stored per template)
        self.__backgrounds = {
        }  #dictionary with the archived backgrounds(key: id, value: LocalFile object)
        self.__tempBackgroundsFilePaths = {
        }  #dictionary with the temporary, not archived yet backgrounds (key: id, value: filepath string)
        self.notifyModification()
Exemple #4
0
 def _getNewEntryId(self):
     try:
         if self._entryGen:
             pass
     except AttributeError:
         self._entryGen = Counter()
     return str(self._entryGen.newCount())
Exemple #5
0
 def _getAnswerCounter(self):
     try:
         if self._answerCounter:
             pass
     except AttributeError:
         self._answerCounter = Counter(1)
     return self._answerCounter
Exemple #6
0
 def clearPluginInfo(self):
     """ Removes all the plugin information from the DB
     """
     for item in self.getValuesToList():
         if item.getId() != "globalPluginOptions":
             self.remove(item)
     self._getTree("counters")[PluginsHolder.counterName] = Counter()
Exemple #7
0
    def __init__(self, conference):
        """
        conference must be a Conference object (not an id).
        """
        self._conference = conference
        self._reviewingQuestions = []

        # by default
        self._numberOfAnswers = 7
        self._scaleLower = 0
        self._scaleHigher = 10
        self._rbLabels = ["0", "", "", "5", "", "", "10"]
        self._rbTitles = ["0", "1.7", "3.3", "5", "6.7", "8.3", "10"]
        self._questionCounter = Counter(1)
        self._answerCounter = Counter(1)
        self._canReviewerAccept = False  # shows if the reviewers have rights to accept/reject abstracts
        self.notifyModification()
Exemple #8
0
    def __init__(self):
        self._cssTpls = {"template0.css": CSSItem("template0.css"), \
                         "right_menu.css": CSSItem("right_menu.css"),
                         "orange.css": CSSItem("orange.css"),
                         "brown.css": CSSItem("brown.css"),

                         "template_indico.css": CSSItem("template_indico.css")}
        self._p_changed = 1
        self._cssCounter = Counter()
Exemple #9
0
 def __init__(self, conf):
     """ Class constructor
         conf: the conference who owns this manager
     """
     self.__conf = conf
     self.__templates = {}
     self.__counter = Counter(1)
     self.__tempBackgrounds = {}
     self.__tempBackgroundCounters = {}
Exemple #10
0
 def __init__(self, review, author = None, judgement = None, comments = "", submitted = False, submissionDate = None):
     self._review = review #the parent Review object for this Judgement
     self._author = author #the user (Referee, Editor or Reviewer) author of the judgement
     self._judgement = judgement #the judgement is a status object, 1:Accept, 2:To be Corrected, 3:Reject, ...others
     self._comments = comments #the comments, a string
     #a list with the Answers objects
     self._answers = []
     self._submitted = submitted #boolean that indicates if the judgement has been submitted or not
     self._submissionDate = submissionDate #the date where the judgement was passed
     self._answerCounter = Counter(1)
Exemple #11
0
 def __init__(self):
     self._newsItems = []
     self._p_changed = 1
     self._newsCounter = Counter()
     self._recentDays = 14  #days to keep a 'New' tag on recent news items
     # fetch all news from the previous location.
     self.addNewsItem(
         NewsItem(_("Previous news"),
                  HelperMaKaCInfo.getMaKaCInfoInstance().getNews(),
                  "general"))
Exemple #12
0
    def __init__(self, conference):
        """ Constructor.
            conference must be a Conference object (not an id).
        """

        self._conference = conference

        #lists of users with reviewing roles
        self._reviewersList = []
        self._editorsList = []
        self._refereesList = []
        self._paperReviewManagersList = []

        self._abstractManagerList = []
        self._abstractReviewersList = []

        self._refereeContribution = {
        }  #key: user, value: list of contributions where user is referee
        self._editorContribution = {
        }  #key: user, value: list of contributions where user is editor
        self._reviewerContribution = {
        }  #key: user, value: list of contributions where user is reviewer
        self._reviewerAsbtract = {
        }  #key: user, value: list of abstracts where user is abstract reviewer

        self.setChoice(1)  #initial reviewing mode: no reviewing

        #default dates
        self._startSubmissionDate = None
        self._endSubmissionDate = None
        self._defaultRefereeDueDate = None
        self._defaultEditorDueDate = None
        self._defaultReviwerDueDate = None
        self._defaultAbstractReviwerDueDate = None

        self._reviewableMaterials = ["paper"]
        from MaKaC.webinterface.rh.conferenceBase import RHSubmitMaterialBase
        self._nonReviewableMaterials = RHSubmitMaterialBase._allowedMatsConference + RHSubmitMaterialBase._allowedMatsForMeetings
        self._nonReviewableMaterials.remove("paper")

        self._states = [
        ]  # list of content reviewing and final judgement non-default states
        self._reviewingQuestions = [
        ]  #list of content reviewing and final judgement questions
        self._formCriteriaList = []  #list of layout editing criteria
        self._templates = {
        }  #dictionary with layout templates. key: id, value: Template object
        self._templateCounter = Counter(
            1)  #counter to make new id's for the templates
        self._userCompetences = {
        }  #dictionary with the competences of each user. key: user, value: list of competences
        self._userCompetencesByTag = {
        }  #dictionary with the users for each competence. key: competence, value: list of users

        self.notifyModification()
Exemple #13
0
    def __init__(self, type, conf):
        CSBookingBase.__init__(self, type, conf)
        self._participants = {}
        self._participantIdCounter = Counter(1)
        self._accessPassword = None
        self._url = None  # The URL to join the meeting
        self._startURL = None  #The URL the admin can visit to start the meeting and be automatically logged in
        self._webExKey = None
        self._phoneNum = None
        self._phoneNumToll = None
        self._duration = None
        self._permissionToStart = True

        self._created = False
        self._error = False
        self._errorMessage = None
        self._errorDetails = None

        self._lastCheck = nowutc()
        self._checksDone = []
        self._bookingChangesHistory = []
        self._latestChanges = []
        self._webExPass = ""
Exemple #14
0
def conferenceMigration(dbi, withRBDB, prevVersion):
    """
    Adding missing attributes to conference objects and children
    """

    cdmr = displayMgr.ConfDisplayMgrRegistery()
    ch = ConferenceHolder()
    i = 0

    from97 = prevVersion < parse_version("0.98b1")

    # migrating from <=0.97.1 requires smaller granularity
    for (level, obj) in console.conferenceHolderIterator(ch, deepness='subcontrib' if from97 else 'event'):
        # only for conferences
        if level == 'event':

            if from97:
                # handle sessions, that our iterator ignores
                for session in obj.getSessionList():
                    _fixAccessController(session)

                if hasattr(obj, '_Conference__alarmCounter'):
                    raise Exception("Conference Object %s (%s) seems to have been "
                                    "already converted" % (obj, obj.id))

                existingKeys = obj.alarmList.keys()
                existingKeys.sort()
                nstart = int(existingKeys[-1]) + 1 if existingKeys else 0
                obj._Conference__alarmCounter = Counter(nstart)

                # For each conference, take the existing tasks and
                # convert them to the new object classes.
                _convertAlarms(obj)

            # convert registration form's "Personal Data" section to new format
            obj.getRegistrationForm()._convertPersonalData()

            # For each conference, fix the default style
            _fixDefaultStyle(obj, cdmr)

        if from97:
            _fixAccessController(obj,
                                 fixSelf=(level != 'subcontrib'))

            # Convert RegistrationSessions to RegistrantSessions
            if isinstance(obj, Conference):
                for reg in obj.getRegistrants().itervalues():
                    if reg._sessions and \
                           isinstance(reg._sessions[0], RegistrationSession):
                        reg._sessions = [RegistrantSession(ses, reg) \
                                         for ses in reg._sessions]

        if i % 1000 == 999:
            dbi.commit()
            if withRBDB and from97:
                DALManager.commit()

        i += 1

    dbi.commit()
    if withRBDB and from97:
        DALManager.commit()
Exemple #15
0
 def __init__(self):
     self.__files = OOBTree.OOBTree()
     self.__idGen = Counter()
Exemple #16
0
 def __init__(self, owner):
     self._entries = []
     self._owner = owner
     self._entryGen = Counter()
     self._v_allowReSchedule = True
     self._allowParallel = True
Exemple #17
0
 def __init__(self, conf):
     self._conf=conf
     self._pages={}
     self._pagesGenerator=Counter()
 def __init__(self):
     self._idxConf = OOBTree()
     self._offlineEventCounter = Counter()
Exemple #19
0
 def __init__( self, aw ):
     self._aw = aw
     self._number = Counter()