Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
833aa01b
Commit
833aa01b
authored
Feb 13, 2013
by
Vik Paruchuri
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add in documentation on tuple matching
parent
382d4d70
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
common/lib/xmodule/xmodule/combined_open_ended_rubric.py
+15
-0
No files found.
common/lib/xmodule/xmodule/combined_open_ended_rubric.py
View file @
833aa01b
...
@@ -231,6 +231,14 @@ class CombinedOpenEndedRubric(object):
...
@@ -231,6 +231,14 @@ class CombinedOpenEndedRubric(object):
@staticmethod
@staticmethod
def
reformat_scores_for_rendering
(
scores
,
score_types
,
feedback_types
):
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
success
=
False
if
len
(
scores
)
==
0
:
if
len
(
scores
)
==
0
:
log
.
error
(
"Score length is 0."
)
log
.
error
(
"Score length is 0."
)
...
@@ -271,6 +279,13 @@ class CombinedOpenEndedRubric(object):
...
@@ -271,6 +279,13 @@ class CombinedOpenEndedRubric(object):
@staticmethod
@staticmethod
def
check_for_tuple_matches
(
tuples
,
tuple
):
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
]
category
=
tuple
[
1
]
score
=
tuple
[
2
]
score
=
tuple
[
2
]
tup_ind
=
-
1
tup_ind
=
-
1
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment