本文整理汇总了Python中MaKaC.webinterface.rh.reviewingModif.RCPaperReviewManager类的典型用法代码示例。如果您正苦于以下问题:Python RCPaperReviewManager类的具体用法?Python RCPaperReviewManager怎么用?Python RCPaperReviewManager使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了RCPaperReviewManager类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: __init__
def __init__(self, rh, contribution, **kwargs):
WPConferenceModifBase.__init__(self, rh, contribution.event_new.as_legacy, **kwargs)
self._contrib = self._target = contribution
from MaKaC.webinterface.rh.reviewingModif import RCPaperReviewManager
self._isPRM = RCPaperReviewManager.hasRights(rh)
self._canModify = self._contrib.can_manage(session.user)
开发者ID:florv,项目名称:indico,代码行数:7,代码来源:contributionReviewing.py
示例2: _checkProtection
def _checkProtection(self):
if self._target.getConference().hasEnabledSection("paperReviewing"):
if self._target.getConference().getConfPaperReview().getChoice() == CPR.NO_REVIEWING:
raise MaKaCError(_("Type of reviewing has not been chosen yet"))
elif not (RCPaperReviewManager.hasRights(self) or RCContributionReferee.hasRights(self)):
RHContribModifBase._checkProtection(self);
else:
raise MaKaCError(_("Paper Reviewing is not active for this conference"))
开发者ID:VishrutMehta,项目名称:indico,代码行数:8,代码来源:contribReviewingModif.py
示例3: __init__
def __init__(self, rh, contribution):
WPConferenceModifBase.__init__(self, rh, contribution.getConference())
self._contrib = self._target = contribution
from MaKaC.webinterface.rh.reviewingModif import RCPaperReviewManager
self._isPRM = RCPaperReviewManager.hasRights(rh)
self._canModify = self._contrib.canModify(rh.getAW()) or (
self._contrib.getSession() and self._contrib.getSession().canCoordinate(rh.getAW(), "modifContribs")
)
开发者ID:bubbas,项目名称:indico,代码行数:9,代码来源:contributions.py
示例4: _handleGet
def _handleGet(self):
contributions = self._conf.getContributionList()
filter = {}
# filtering if the active user is a referee: he can only see his own contribs
isOnlyReferee = (
RCReferee.hasRights(self)
and not RCPaperReviewManager.hasRights(self)
and not self._conf.canModify(self.getAW())
)
if isOnlyReferee:
filter["referee"] = self._getUser()
elif self._showWithReferee:
filter["referee"] = "any"
else:
filter["referee"] = None
if self._showWithEditor:
filter["editor"] = "any"
else:
filter["editor"] = None
if self._showWithReviewer:
filter["reviewer"] = "any"
else:
filter["reviewer"] = None
# note by David: I added "if self._selTypes..." and the other ifs after this line,
# in order to make the recording request load contributions work
# but, it may break the paper reviewing module -> assign contributions filter
if self._selTypes:
filter["type"] = self._selTypes
if self._selTracks:
filter["track"] = self._selTracks
if self._selSessions:
filter["session"] = self._selSessions
if self._poster:
filter["poster"] = self._poster
filterCrit = ContributionsReviewingFilterCrit(self._conf, filter)
sortingCrit = contribFilters.SortingCriteria(["number"])
if self._selTypes:
filterCrit.getField("type").setShowNoValue(self._typeShowNoValue)
if self._selTracks:
filterCrit.getField("track").setShowNoValue(self._trackShowNoValue)
if self._selSessions:
filterCrit.getField("session").setShowNoValue(self._sessionShowNoValue)
if self._poster:
filterCrit.getField("poster").setShowNoValue(self._posterShowNoValue)
filterCrit.getField("referee").setShowNoValue(not isOnlyReferee)
f = filters.SimpleFilter(filterCrit, sortingCrit)
contributions = f.apply(contributions)
return DictPickler.pickle(contributions)
开发者ID:lukasnellen,项目名称:indico,代码行数:57,代码来源:conference.py
示例5: __init__
def __init__(self, rh, target):
WPConferenceModifBase.__init__(self, rh, target)
from MaKaC.webinterface.rh.reviewingModif import RCPaperReviewManager, RCAbstractManager
self._isPRM = RCPaperReviewManager.hasRights(rh)
self._isAM = RCAbstractManager.hasRights(rh)
self._canModify = self._conf.canModify(rh.getAW())
self._showListContribToJudge = self._conf.getConfReview().isReviewer(rh._getUser()) or \
self._conf.getConfReview().isEditor(rh._getUser()) or \
self._conf.getConfReview().isReferee(rh._getUser())
self._showAssignContributions = self._canModify or self._isPRM or self._conf.getConfReview().isReferee(rh._getUser())
开发者ID:lukasnellen,项目名称:indico,代码行数:13,代码来源:reviewing.py
示例6: _checkProtection
def _checkProtection(self):
if self._target.getConference().hasEnabledSection("paperReviewing"):
hasRights = False
if self._current == 'refereeJudgement':
hasRights = RCContributionReferee.hasRights(self)
elif self._current == 'editorJudgement':
hasRights = RCContributionEditor.hasRights(self)
elif self._current == 'reviewerJudgement':
hasRights = RCContributionReviewer.hasRights(self)
if not hasRights and not RCPaperReviewManager.hasRights(self):
ProtectedModificationService._checkProtection(self)
else:
raise ServiceError("ERR-REV1b",_("Paper Reviewing is not active for this conference"))
开发者ID:dbourillot,项目名称:indico,代码行数:14,代码来源:reviewing.py
示例7: _handleGet
def _handleGet(self):
contributions = Contribution.find(event_new=self._conf.as_event, is_deleted=False).options(
joinedload("timetable_entry"), joinedload("paper_reviewing_roles")
)
filter = {}
# filtering if the active user is a referee: he can only see his own contribs
isOnlyReferee = (
RCReferee.hasRights(self)
and not RCPaperReviewManager.hasRights(self)
and not self._conf.canModify(self.getAW())
)
# We want to make an 'or', not an 'and' of the reviewing assign status
filter["reviewing"] = {}
if isOnlyReferee:
filter["reviewing"]["referee"] = self._getUser()
elif self._showWithReferee:
filter["reviewing"]["referee"] = "any"
if self._showWithEditor:
filter["reviewing"]["editor"] = "any"
if self._showWithReviewer:
filter["reviewing"]["reviewer"] = "any"
filter["type"] = self._selTypes
filter["track"] = self._selTracks
filter["session"] = self._selSessions
filter["materialsubmitted"] = self._showWithMaterial
filterCrit = ContributionsReviewingFilterCrit(self._conf, filter)
sortingCrit = contribFilters.SortingCriteria(["number"])
filterCrit.getField("type").setShowNoValue(self._typeShowNoValue)
filterCrit.getField("track").setShowNoValue(self._trackShowNoValue)
filterCrit.getField("session").setShowNoValue(self._sessionShowNoValue)
filterCrit.getField("reviewing").setShowNoValue(self._showWithoutTeam)
filterCrit.getField("materialsubmitted").setShowNoValue(self._showWithoutMaterial)
f = filters.SimpleFilter(filterCrit, sortingCrit)
contributions = f.apply(contributions)
return [_serialize_contribution(contrib) for contrib in contributions]
开发者ID:OmeGak,项目名称:indico,代码行数:46,代码来源:conference.py
示例8: _handleGet
def _handleGet(self):
contributions = self._conf.getContributionList()
filter = {}
#filtering if the active user is a referee: he can only see his own contribs
isOnlyReferee = RCReferee.hasRights(self) \
and not RCPaperReviewManager.hasRights(self) \
and not self._conf.canModify(self.getAW())
# We want to make an 'or', not an 'and' of the reviewing assign status
filter["reviewing"] = {}
if isOnlyReferee:
filter["reviewing"]["referee"] = self._getUser()
elif self._showWithReferee:
filter["reviewing"]["referee"] = "any"
if self._showWithEditor:
filter["reviewing"]["editor"] = "any"
if self._showWithReviewer:
filter["reviewing"]["reviewer"] = "any"
filter["type"] = self._selTypes
filter["track"] = self._selTracks
filter["session"] = self._selSessions
filter["materialsubmitted"] = self._showWithMaterial
filterCrit = ContributionsReviewingFilterCrit(self._conf, filter)
sortingCrit = contribFilters.SortingCriteria(["number"])
filterCrit.getField("type").setShowNoValue(self._typeShowNoValue)
filterCrit.getField("track").setShowNoValue(self._trackShowNoValue)
filterCrit.getField("session").setShowNoValue(self._sessionShowNoValue)
filterCrit.getField("reviewing").setShowNoValue(self._showWithoutTeam)
filterCrit.getField("materialsubmitted").setShowNoValue(self._showWithoutMaterial)
f = filters.SimpleFilter(filterCrit, sortingCrit)
contributions = f.apply(contributions)
return fossilize(contributions, IContributionFossil)
开发者ID:hennogous,项目名称:indico,代码行数:42,代码来源:conference.py
示例9: _checkProtection
def _checkProtection(self):
if not RCPaperReviewManager.hasRights(self):
RHConferenceModifBase._checkProtection(self)
开发者ID:ferhatelmas,项目名称:indico,代码行数:3,代码来源:reviewingAssignContributions.py
示例10: _checkProtection
def _checkProtection(self):
if self._target.hasEnabledSection("paperReviewing"):
if not RCPaperReviewManager.hasRights(self) and not RCReferee.hasRights(self):
RHConferenceModifBase._checkProtection(self);
else:
raise MaKaCError(_("Paper Reviewing is not active for this conference"))
开发者ID:lukasnellen,项目名称:indico,代码行数:6,代码来源:reviewingAssignContributions.py
注:本文中的MaKaC.webinterface.rh.reviewingModif.RCPaperReviewManager类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论