app/soc/tasks/surveys.py
changeset 2601 1f575a1e82d5
parent 2595 4c00831ef55c
child 2614 dbc8a50dbce0
--- 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(),