Ignore:
Timestamp:
03/02/11 14:03:36 (2 years ago)
Author:
Jose Benito <jose.benito.gonzalez@…>
Branches:
master, burotel, hello-world-walkthrough, ipv6, v0.98-series, v0.98.2, v0.98.3, v0.98b1, v0.98b2, v0.99, 051b2622c51afb171a1dedb46a0df4fbb0cbd02e, d9941f8582b36b24821a11ea5ba16fda6a457fb1
Children:
ddf66a
Parents:
4bd61a
git-author:
Alexis Castilla Hernandez <alexis.castilla.hernandez@…> (01/24/11 17:43:15)
git-committer:
Jose Benito <jose.benito.gonzalez@…> (03/02/11 14:03:36)
Message:

[FTR] Remove question and keep the results

  • Implemented the functionality of removing questions choosing if you want to keep the judgements of the question which you are removing, or you want to remove every previous judgement of that question.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • indico/MaKaC/services/implementation/reviewing.py

    r4bd61a rac1aa3  
    947947        AbstractReviewingBase._checkParams(self) 
    948948        self._value = self._params.get("value") # value is the question id 
    949  
    950     def _getAnswer(self): 
    951         self._confAbstractReview.removeReviewingQuestion(self._value) 
     949        self._keepJud = self._params.get("keepJud") # keep the previous judgements of the question 
     950 
     951    def _getAnswer(self): 
     952        # remove the question 
     953        self._confAbstractReview.removeReviewingQuestion(self._value, self._keepJud) 
     954        if not self._keepJud: 
     955            # Purge all the judgements already exist with answers of this question 
     956            self._conf.getAbstractMgr().removeAnswersOfQuestion(self._value) 
     957            self._conf.getAbstractMgr().recalculateAbstractsRating(self._confAbstractReview.getScaleLower(), self._confAbstractReview.getScaleHigher()) 
    952958        reviewingQuestions = self._confAbstractReview.getReviewingQuestions() 
     959        # Build the answer 
    953960        fossils = [] 
    954961        for question in reviewingQuestions: 
Note: See TracChangeset for help on using the changeset viewer.