app/soc/modules/ghop/models/work_submission.py
changeset 2399 65a83ae32703
parent 2397 d943fa182fae
child 2791 c62f45595b8d
equal deleted inserted replaced
2398:3ea483cf4d59 2399:65a83ae32703
    28 from django.utils.translation import ugettext
    28 from django.utils.translation import ugettext
    29 
    29 
    30 import soc.models.linkable
    30 import soc.models.linkable
    31 import soc.models.user
    31 import soc.models.user
    32 
    32 
    33 import ghop.models.program
    33 from soc.modules.ghop.models import program as ghop_program_model
    34 import ghop.models.task
    34 from soc.modules.ghop.models import task as task_model
    35 
    35 
    36 
    36 
    37 class GHOPWorkSubmission(soc.models.linkable.Linkable):
    37 class GHOPWorkSubmission(soc.models.linkable.Linkable):
    38   """Model for work submissions for a task by students.
    38   """Model for work submissions for a task by students.
    39 
    39 
    40   Scope will be set to the Organization to which this work has been submitted.
    40   Scope will be set to the Organization to which this work has been submitted.
    41   """
    41   """
    42 
    42 
    43   #: Task to which this work was submitted
    43   #: Task to which this work was submitted
    44   task = db.ReferenceProperty(reference_class=ghop.models.task.GHOPTask,
    44   task = db.ReferenceProperty(reference_class=task_model.GHOPTask,
    45                               required=True,
    45                               required=True,
    46                               collection_name='work_submissions')
    46                               collection_name='work_submissions')
    47 
    47 
    48   #: User who submitted this work
    48   #: User who submitted this work
    49   user = db.ReferenceProperty(reference_class=soc.models.user.User,
    49   user = db.ReferenceProperty(reference_class=soc.models.user.User,
    50                               required=True,
    50                               required=True,
    51                               collection_name='work_submissions')
    51                               collection_name='work_submissions')
    52 
    52 
    53   #: Program to which this work belongs to
    53   #: Program to which this work belongs to
    54   program = db.ReferenceProperty(reference_class=ghop.models.program.GHOPProgram,
    54   program = db.ReferenceProperty(
    55                                  required=True,
    55       reference_class=ghop_program_model.GHOPProgram,
    56                                  collection_name='work_submissions')
    56       required=True, collection_name='work_submissions')
    57 
    57 
    58   #: Property allowing you to store information about your work
    58   #: Property allowing you to store information about your work
    59   information = db.TextProperty(
    59   information = db.TextProperty(
    60       required=True, verbose_name=ugettext('Info'))
    60       required=True, verbose_name=ugettext('Info'))
    61   information.help_text = ugettext(
    61   information.help_text = ugettext(