When Student withdrew a proposal a public comment "Student withdrew proposal." is posted.
authorPawel Solyga <Pawel.Solyga@gmail.com>
Mon, 06 Apr 2009 11:04:57 +0000
changeset 2092 6de3693ba9d4
parent 2091 dd3eb2770205
child 2093 987913140e31
When Student withdrew a proposal a public comment "Student withdrew proposal." is posted. Patch by: Pawel Solyga Reviewed by: to-be-reviewed
app/soc/views/models/student_proposal.py
--- a/app/soc/views/models/student_proposal.py	Mon Apr 06 10:11:44 2009 +0000
+++ b/app/soc/views/models/student_proposal.py	Mon Apr 06 11:04:57 2009 +0000
@@ -507,7 +507,8 @@
 
       proposal_logic = params['logic']
       student_proposal_entity = proposal_logic.getForFields(filter, unique=True)
-
+      reviewer = student_proposal_entity.scope
+      
       # update the entity mark it as invalid
       proposal_logic.updateEntityProperties(student_proposal_entity,
           {'status': 'invalid'})
@@ -515,7 +516,9 @@
       # redirect to the program's homepage
       redirect_url = redirects.getHomeRedirect(student_proposal_entity.program,
           {'url_name': 'program'})
-
+      
+      comment = "Student withdrew proposal."
+      self._createReviewFor(student_proposal_entity, reviewer, comment)
       return http.HttpResponseRedirect(redirect_url)
 
     return super(View, self).edit(request=request, access_type=access_type,