From 0d69da54ca99d5a5a5e81e79765940acf35077b5 Mon Sep 17 00:00:00 2001 From: Pawel Solyga Date: Mon, 6 Apr 2009 11:04:57 +0000 Subject: [PATCH] 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 | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/soc/views/models/student_proposal.py b/app/soc/views/models/student_proposal.py index 0b579136..c6750489 100644 --- a/app/soc/views/models/student_proposal.py +++ b/app/soc/views/models/student_proposal.py @@ -507,7 +507,8 @@ class View(base.View): 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 @@ class View(base.View): # 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, -- 2.11.4.GIT