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( |