--- a/app/soc/tasks/surveys.py Sat Jul 11 23:38:37 2009 +0200
+++ b/app/soc/tasks/surveys.py Sat Jul 11 23:53:30 2009 +0200
@@ -23,6 +23,7 @@
import logging
+import os
from google.appengine.api.labs import taskqueue
@@ -204,16 +205,21 @@
site_entity = site_logic.getSingleton()
if survey_type == 'project':
- survey_url = redirects.getTakeSurveyRedirect(
+ survey_redirect = redirects.getTakeSurveyRedirect(
survey,{'url_name': 'project_survey'})
to_role = student_entity
mail_template = 'soc/project_survey/mail/reminder_gsoc.html'
elif survey_type == 'grading':
- survey_url = redirects.getTakeSurveyRedirect(
+ survey_redirect = redirects.getTakeSurveyRedirect(
survey,{'url_name': 'grading_project_survey'})
to_role = student_project.mentor
mail_template = 'soc/grading_project_survey/mail/reminder_gsoc.html'
+ survey_url = "http://%(host)s%(redirect)s" % {
+ 'redirect': survey_redirect,
+ 'host': os.environ['HTTP_HOST'],
+ }
+
# set the context for the mail template
mail_context = {
'student_name': student_entity.name(),