Add in documentation on tuple matching

This commit is contained in:
Vik Paruchuri
2013-02-13 11:38:43 -05:00
parent 382d4d70ea
commit 833aa01bd4

View File

@@ -231,6 +231,14 @@ class CombinedOpenEndedRubric(object):
@staticmethod
def reformat_scores_for_rendering(scores, score_types, feedback_types):
"""
Takes in a list of rubric scores, the types of those scores, and feedback associated with them
Outputs a reformatted list of score tuples (count, rubric category, rubric score, [graders that gave this score], [feedback types])
@param scores:
@param score_types:
@param feedback_types:
@return:
"""
success = False
if len(scores)==0:
log.error("Score length is 0.")
@@ -271,6 +279,13 @@ class CombinedOpenEndedRubric(object):
@staticmethod
def check_for_tuple_matches(tuples, tuple):
"""
Checks to see if a tuple in a list of tuples is a match for tuple.
If not match, creates a new tuple matching tuple.
@param tuples: list of tuples
@param tuple: tuples to match
@return: a new list of tuples, and the index of the tuple that matches tuple
"""
category = tuple[1]
score = tuple[2]
tup_ind = -1