app/soc/models/survey.py
changeset 2501 d612b48e6e12
parent 2493 0aabd2d76606
child 2525 7df431ddcfd3
equal deleted inserted replaced
2500:ecc16ffe174b 2501:d612b48e6e12
    30 from google.appengine.ext import db
    30 from google.appengine.ext import db
    31 
    31 
    32 from django.utils.translation import ugettext
    32 from django.utils.translation import ugettext
    33 
    33 
    34 import soc.models.work
    34 import soc.models.work
       
    35 
       
    36 
       
    37 COMMENT_PREFIX = 'comment_for_'
    35 
    38 
    36 
    39 
    37 class SurveyContent(db.Expando):
    40 class SurveyContent(db.Expando):
    38   """Fields (questions) and schema representation of a Survey.
    41   """Fields (questions) and schema representation of a Survey.
    39 
    42 
    91   URL_NAME = 'survey'
    94   URL_NAME = 'survey'
    92   # euphemisms like "student" and "mentor" should be used if possible
    95   # euphemisms like "student" and "mentor" should be used if possible
    93   SURVEY_ACCESS = ['admin', 'restricted', 'member', 'user']
    96   SURVEY_ACCESS = ['admin', 'restricted', 'member', 'user']
    94 
    97 
    95   # these are GSoC specific, so eventually we can subclass this
    98   # these are GSoC specific, so eventually we can subclass this
    96   SURVEY_TAKING_ACCESS = ['student', 
    99   SURVEY_TAKING_ACCESS = ['student',
    97                           'mentor',
   100                           'mentor',
    98                           'org_admin',
   101                           'org_admin',
    99                           'user',
   102                           'user',
   100                           'public']
   103                           'public']
   101   GRADE_OPTIONS = {'midterm':['mid_term_passed', 'mid_term_failed'],
   104   GRADE_OPTIONS = {'midterm':['mid_term_passed', 'mid_term_failed'],