After a discussion storing runner_ups as a ListProperty in which the order does not matter. Removed a question because it is answered, answered a question and added a question. git-svn-id: http://soc.googlecode.com/svn/wiki@3220 5fae56a1-394a-0410-ba46-5107137fd53f
diff --git a/GHOPImplementationDesign.wiki b/GHOPImplementationDesign.wiki index d6b638f..59b20dd 100644 --- a/GHOPImplementationDesign.wiki +++ b/GHOPImplementationDesign.wiki
@@ -216,6 +216,7 @@ * student_min_age - *DateTimeProperty* (We are storing the the latest birth date above which a student cannot participate. For example if the contest rule says, "must be 13 years or above on November 1, 2009". We store this is as November 1, 1996 in DateTimeProperty format) * number_of_simultaneous_tasks - *IntegerProperty* (Configurable in Program Configuration page by Program Admin. For GHOP it is 1, the number of tasks students can work on simultaneously) * number_of_prize_winners - *IntegerProperty* + * number_of_runner_ups - *IntegerProperty* * task_difficulties - *StringListProperty* * task_states - *StringListProperty* * task_types - *StringListProperty* (All the above properties are configurable in program configuration page) @@ -238,7 +239,8 @@ This model holds the students who have won the prizes for a particular program instance for each organization. * _program_ - *ReferenceProperty(Program)* * _organization_ - *ReferenceProperty(Organization)* - * prize_winners - *ListProperty(type=db.key, ...)* This holds keys for Student entities(More in the questions at the bottom of the page. The list needs to be ordered based on the prizes students win by the organization) + * prize_winners - *ListProperty(type=db.key, ...)* This holds *ordered* keys for Student entities as given by an Organization for winning prizes. + * runner_ups -ListProperty(type=db.key) This holds keys for Student entities that are considered runner_ups, a key *cannot* be found in both the prize_winners and runner_ups property. == WorkSubmission (To Be Decided) == * _task_ - *ReferenceProperty(Task)* @@ -325,6 +327,8 @@ <Pawel>Common url is fine with me the content of the page will change based on user Role so either way is fine.</Pawel> - * In PrizePerOrg model Lennie asked me to store the winner and runner-ups ordered. I have planned to store the winner and runner ups separately. Is it necessary that these need to be ordered still? If this kind of split between winner and runner ups is ok do we still need to order the runner ups in some order? + * If the above properties of winner and runner ups are acceptable, I planned to store the runner ups as a list of *ReferenceProperty* s to Student model, which conceptually boils down to a PrizePerOrg 1:N Student relation and following the rules of Database design this needs to be stored as a reference to PrizePerOrg Model in the Student model. And this kind of design just for being conceptually correct is not making sense to me. I am a bit confused as to what to do here. Can any one suggest me a way out here please? - * If the above properties of winner and runner ups are acceptable, I planned to store the runner ups as a list of *ReferenceProperty* s to Student model, which conceptually boils down to a PrizePerOrg 1:N Student relation and following the rules of Database design this needs to be stored as a reference to PrizePerOrg Model in the Student model. And this kind of design just for being conceptually correct is not making sense to me. I am a bit confused as to what to do here. Can any one suggest me a way out here please? \ No newline at end of file +<Lennard>The relation could be N:N if a Student is allowed to win multiple prizes. This seperation is also good for clarity since it is easier to see all winners for one program this way.</Lennard> + + * Is a Student allowed to win multiple prizes or be runner-ups for multiple Organizations? Do we want to have a program option checkbox which dissallows something like this, or perhaps two IntegerProperties so we can say "Max allowed prizes per Student" and "Max allowed runner-up prizes per Student"? \ No newline at end of file