Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -828,7 +828,7 @@ def get_rubric(self, _data):

contexts = []
rubric_number = self.current_task_number
if self.ready_to_reset:
if self.ready_to_reset and len(self.task_states) > rubric_number + 1:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure about this logic. It reads if current_task is the only task look at it otherwise look at current_task+1. Why not look at the current_task always?

rubric_number+=1
response = self.get_last_response(rubric_number)
score_length = len(response['grader_types'])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -791,6 +791,14 @@ def test_state_single(self):
def test_state_pe_single(self):
self.ai_state_success(TEST_STATE_PE_SINGLE, iscore=0, tasks=[self.task_xml2])

def test_get_rubric(self):
self.combinedoe.ready_to_reset = True

response = self.combinedoe.get_rubric({})

# Should be succeeded.
self.assertEqual(response.get("success"), True)


class CombinedOpenEndedModuleConsistencyTest(unittest.TestCase):
"""
Expand Down