예제 #1
0
 def test_submit_nonexistent_modules(self):
     # confirm that a rescore of a non-existent module returns an exception
     problem_url = InstructorTaskModuleTestCase.problem_location("NonexistentProblem")
     request = None
     with self.assertRaises(ItemNotFoundError):
         submit_rescore_problem_for_student(request, problem_url, self.student)
     with self.assertRaises(ItemNotFoundError):
         submit_rescore_problem_for_all_students(request, problem_url)
     with self.assertRaises(ItemNotFoundError):
         submit_reset_problem_attempts_for_all_students(request, problem_url)
     with self.assertRaises(ItemNotFoundError):
         submit_delete_problem_state_for_all_students(request, problem_url)
 def test_submit_nonexistent_modules(self):
     # confirm that a rescore of a non-existent module returns an exception
     problem_url = InstructorTaskModuleTestCase.problem_location("NonexistentProblem")
     request = None
     with self.assertRaises(ItemNotFoundError):
         submit_rescore_problem_for_student(request, problem_url, self.student)
     with self.assertRaises(ItemNotFoundError):
         submit_rescore_problem_for_all_students(request, problem_url)
     with self.assertRaises(ItemNotFoundError):
         submit_reset_problem_attempts_for_all_students(request, problem_url)
     with self.assertRaises(ItemNotFoundError):
         submit_delete_problem_state_for_all_students(request, problem_url)
예제 #3
0
 def reset_problem_attempts(self, instructor, problem_url_name):
     """Submits the current problem for resetting"""
     return submit_reset_problem_attempts_for_all_students(
         self.create_task_request(instructor),
         self.course.id,
         InstructorTaskModuleTestCase.problem_location(problem_url_name),
     )
예제 #4
0
 def reset_problem_attempts(self, instructor, location):
     """Submits the current problem for resetting"""
     return submit_reset_problem_attempts_for_all_students(self.create_task_request(instructor), location)
예제 #5
0
 def reset_problem_attempts(self, instructor, location):
     """Submits the current problem for resetting"""
     return submit_reset_problem_attempts_for_all_students(
         self.create_task_request(instructor), location)
예제 #6
0
 def reset_problem_attempts(self, instructor, problem_url_name):
     """Submits the current problem for resetting"""
     return submit_reset_problem_attempts_for_all_students(
         self.create_task_request(instructor), self.course.id,
         InstructorTaskModuleTestCase.problem_location(problem_url_name))