43 |
43 |
44 work.reviews: even Questions can be "reviewed" (possibly commented |
44 work.reviews: even Questions can be "reviewed" (possibly commented |
45 on during creation or annotated once put into use). |
45 on during creation or annotated once put into use). |
46 |
46 |
47 work.partial_path: used to scope (and, when combined with |
47 work.partial_path: used to scope (and, when combined with |
48 work.link_name, uniquely identify) a Question in the same way the |
48 work.link_id, uniquely identify) a Question in the same way the |
49 property are used with Documents, etc. |
49 property are used with Documents, etc. |
50 |
50 |
51 work.link_name: used to identify (and, when combined with |
51 work.link_id: used to identify (and, when combined with |
52 work.partial_path, *uniquely* identify) a Question in the same way |
52 work.partial_path, *uniquely* identify) a Question in the same way |
53 these properties are used with Documents, etc. |
53 these properties are used with Documents, etc. |
54 |
54 |
55 work.content: the Question text, asked to the respondent |
55 work.content: the Question text, asked to the respondent |
56 |
56 |
85 # TODO(tlarsen): the following verbose comments can be removed later, |
85 # TODO(tlarsen): the following verbose comments can be removed later, |
86 when these ideas are implemented in the views and controllers; they |
86 when these ideas are implemented in the views and controllers; they |
87 are here now so that the concepts will not be lost before that time. |
87 are here now so that the concepts will not be lost before that time. |
88 |
88 |
89 The recommended use for the combination of work.partial_path and |
89 The recommended use for the combination of work.partial_path and |
90 work.link_name is to keep the *same* link_name when copying and |
90 work.link_id is to keep the *same* link_id when copying and |
91 modifying an existing Question for a new Program (or instance of a |
91 modifying an existing Question for a new Program (or instance of a |
92 Group that is per-Program), while changing the work.partial_path to |
92 Group that is per-Program), while changing the work.partial_path to |
93 represent the Program and Group "ownership" of the Question. For |
93 represent the Program and Group "ownership" of the Question. For |
94 example, if a Question asking about prior GSoC participation needed |
94 example, if a Question asking about prior GSoC participation needed |
95 to have an additional choice (see the choice_ids and choices properties |
95 to have an additional choice (see the choice_ids and choices properties |
96 below), it is desirable to keep the same work.link_name (and also |
96 below), it is desirable to keep the same work.link_id (and also |
97 simply append new choice_ids and choices to keep the old answer values |
97 simply append new choice_ids and choices to keep the old answer values |
98 compatible). An existing Question in the above example might be identified |
98 compatible). An existing Question in the above example might be identified |
99 as something like: |
99 as something like: |
100 Question:google/gsoc2009/gsoc_past_participation |
100 Question:google/gsoc2009/gsoc_past_participation |
101 <type>:<Sponsor>/<Program>/<link_name> |
101 <type>:<Sponsor>/<Program>/<link_id> |
102 To make it possible to query for gsoc_past_participation answers regardless |
102 To make it possible to query for gsoc_past_participation answers regardless |
103 of the Program, the next year, new values are added to choice_ids and |
103 of the Program, the next year, new values are added to choice_ids and |
104 choices in a new Question copied from the one above, which would then |
104 choices in a new Question copied from the one above, which would then |
105 be named something (still unique) like: |
105 be named something (still unique) like: |
106 Question:google/gsoc2010/gsoc_past_participation |
106 Question:google/gsoc2010/gsoc_past_participation |
112 have actually previously been GSoC mentors, for example). To produce |
112 have actually previously been GSoC mentors, for example). To produce |
113 unique statistics for GHOP that could also be aggregated overall in |
113 unique statistics for GHOP that could also be aggregated overall in |
114 combination with GSoC, the gsoc_past_participation Question would be |
114 combination with GSoC, the gsoc_past_participation Question would be |
115 duplicated (unaltered) to something like: |
115 duplicated (unaltered) to something like: |
116 Question:google/ghop2009/gsoc_past_participation |
116 Question:google/ghop2009/gsoc_past_participation |
117 To get the combined results, query on a link_name of |
117 To get the combined results, query on a link_id of |
118 gsoc_past_participation. For more targeted results, include the |
118 gsoc_past_participation. For more targeted results, include the |
119 partial_path to make the query more specific. |
119 partial_path to make the query more specific. |
120 |
120 |
121 Question creation to permit use cases like the one above is going to |
121 Question creation to permit use cases like the one above is going to |
122 be a bit of an "advanced" skill, possibly. "Doing it wrong" the first |
122 be a bit of an "advanced" skill, possibly. "Doing it wrong" the first |
124 like multiple-choice Questions that "grow" new choices year-over-year. |
124 like multiple-choice Questions that "grow" new choices year-over-year. |
125 |
125 |
126 A dynamic form is most definitely going to be needed to implement the |
126 A dynamic form is most definitely going to be needed to implement the |
127 Question creation and editing for multiple-choice questions. |
127 Question creation and editing for multiple-choice questions. |
128 """ |
128 """ |
129 #: db.ListProperty of short, plain-text, "link_name-like" strings |
129 #: db.ListProperty of short, plain-text, "link_id-like" strings |
130 #: representing the "encoded" answer choices (must be strings compatible |
130 #: representing the "encoded" answer choices (must be strings compatible |
131 #: with being query arguments and being used in HTML controls and POST |
131 #: with being query arguments and being used in HTML controls and POST |
132 #: responses). |
132 #: responses). |
133 #: |
133 #: |
134 #: If empty (None or an empty list), it is assumed that this Question |
134 #: If empty (None or an empty list), it is assumed that this Question |