blob: 7888e58fb12fcecd9891f8fc22f38f817b5362ab [file] [log] [blame]
#summary Review entity model
#labels Phase-Design,Contents-Skeleton,Design-Model
_*Eventually, this topic should be populated by the output of*_ `pydoc`.
{{{
class Review(db.Model):
"""Model of a review of a Proposal or a Task.
A Review entity is a specific instance of a completed Survey, collecting
the Answers to the Questions that are found in that Survey.
Reviews are also used to implement comments and scoring annotations to
Proposals and Tasks. For example, a commment attached to a Proposal is
a Review with the Answer to a single "question" (with that answer being
the comment itself). A scoring evaluation might be made up of
Answers to two "questions", one containg the comment the other
containing the score.
A Review entity participates in a number of relationships:
survey) a required many:1 relationship with a Survey which acts as a
"template" for the Review, containing the Questions that are anwered
by the Answers associated with the Review. The back-reference in
the Survey model is a Query named 'reviews' which represents all of
the Reviews that contains Answers to the Questions in that particular
Survey.
answers) a 1:many relationship (but not required, since initially none
of the Questions to be answered by a Review will have Answers) that
relates the specific answers to the Survey questions for a specfic
Review instance. This relation is implemented as a back-reference
Query of the Answer model 'review' reference.
Some (zero or more) of the Questions answered by a Review may define an
'approval_style' string and one or more 'approval_answers'. See
the Question and Answer models for details. All Questions answered
in the Review that provide non-empty 'approval_style' and
'approval_answers' must meet the described approval conditions for
the Review to represent "approval" (or a "positive outcome" or
a "passing grade", so to speak). Most Reviews answer Questions in
a Survey that contains only a single "approval" question (if they
contain one at all).
reviewed) a required many:1 relationship with a Work, where the
Review answers are attached to the Work as a comment, evaluation,
review, report, acceptance, etc. Reviews are the mechanism by
which non-authors of the Work make annotations to it. The
back-reference in the Work model is a Query named 'reviews'
which represents all of the annotations attached to that particular
work.
reviewer) a required many:1 relationship with a Reviewer entity indicating
the "author" of the actual answers for a specific Review instance. The
back-reference in the Reviewer model is a Query named 'reviews' which
represents all of the Reviews by that particular Reviewer.
start: db.DateTimeProperty that indicates the beginning of the time period
in which this Review can be "answered" (e.g. survey start date)
end: db.DateTimeProperty that indicates the end of the time period
in which this Review can be "answered" (e.g. survey end date)
"""
survey = db.ReferenceProperty(reference_class=Survey, required=True,
collection_name="reviews")
reviewed = db.ReferenceProperty(reference_class=Work, required=True,
collection_name="reviews")
reviewer = db.ReferenceProperty(reference_class=Reviewer, required=True,
collection_name="reviews")
start = db.DateTimeProperty()
end = db.DateTimeProperty()
}}}
----
_Copyright 2008 Google Inc._
_This work is licensed under a_
[http://soc.googlecode.com/svn/wiki/html/licenses/cc-by-attribution-2_5.html Creative Commons Attribution 2.5 License].
[http://creativecommons.org/licenses/by/2.5/ http://soc.googlecode.com/svn/wiki/html/licenses/cc-by-2_5-88x31.png]