No LaTeX/markdown anywhere students read (seed, import, DB migration 0021, tutor history, frontend guard); quiz of an island is fixed per user again
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -233,8 +233,8 @@ class NodeQuizCompleteTests(TestCase):
|
||||
self.assertTrue(UserLessonCompletion.objects.filter(user_id=self.user.id).exists())
|
||||
|
||||
|
||||
class NodeQuizRotationTests(TestCase):
|
||||
"""دوبارهبازیِ یک جزیره آزمونِ تازه میدهد؛ رفرش تا پایانِ آزمون همان را میدهد."""
|
||||
class NodeQuizStabilityTests(TestCase):
|
||||
"""آزمونِ یک جزیره برای یک کاربر ثابت میماند، حتی بعد از تمامکردنِ آزمون و حتی با استخرِ بزرگ."""
|
||||
|
||||
def setUp(self):
|
||||
cache.clear()
|
||||
@@ -255,13 +255,8 @@ class NodeQuizRotationTests(TestCase):
|
||||
body = self.client.get(f'/api/nodes/{self.node.pk}/quiz', **self.auth).json()
|
||||
return [q['id'] for q in body['questions']]
|
||||
|
||||
def test_refresh_keeps_the_quiz_until_it_is_completed(self):
|
||||
self.assertEqual(self._ids(), self._ids())
|
||||
|
||||
def test_each_completed_round_draws_a_fresh_quiz(self):
|
||||
def test_quiz_is_the_same_after_completing_it(self):
|
||||
first = self._ids()
|
||||
UserNodeCompletion.objects.create(
|
||||
user_id=self.user.id, node=self.node, correct_count=4, total_questions=4, stars=3)
|
||||
second = self._ids()
|
||||
self.assertNotEqual(first, second)
|
||||
self.assertEqual(second, self._ids())
|
||||
self.assertEqual(first, self._ids())
|
||||
|
||||
Reference in New Issue
Block a user