app/soc/modules/ghop/models/work_submission.py
changeset 2791 c62f45595b8d
parent 2399 65a83ae32703
child 2821 21dd1ee785f5
equal deleted inserted replaced
2790:c63bd7fcd7a9 2791:c62f45595b8d
    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   scope_path will be set to the task key name under which this work was
       
    42   submitted.
    41   """
    43   """
    42 
       
    43   #: Task to which this work was submitted
       
    44   task = db.ReferenceProperty(reference_class=task_model.GHOPTask,
       
    45                               required=True,
       
    46                               collection_name='work_submissions')
       
    47 
    44 
    48   #: User who submitted this work
    45   #: User who submitted this work
    49   user = db.ReferenceProperty(reference_class=soc.models.user.User,
    46   user = db.ReferenceProperty(reference_class=soc.models.user.User,
    50                               required=True,
    47                               required=True,
    51                               collection_name='work_submissions')
    48                               collection_name='work_submissions')
    52 
    49 
    53   #: Program to which this work belongs to
       
    54   program = db.ReferenceProperty(
       
    55       reference_class=ghop_program_model.GHOPProgram,
       
    56       required=True, collection_name='work_submissions')
       
    57 
       
    58   #: Property allowing you to store information about your work
    50   #: Property allowing you to store information about your work
    59   information = db.TextProperty(
    51   information = db.TextProperty(
    60       required=True, verbose_name=ugettext('Info'))
    52       required=False, verbose_name=ugettext('Info'))
    61   information.help_text = ugettext(
    53   information.help_text = ugettext(
    62       'Information about the work you submit for this task')
    54       'Information about the work you submit for this task')
    63 
    55 
    64   #: Property containing an URL to this work or more information about it
    56   #: Property containing an URL to this work or more information about it
    65   url_to_work = db.LinkProperty(
    57   url_to_work = db.LinkProperty(