fnp
/
edumed.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
010b648
)
thread-safe random
author
Jan Szejko
<janek37@gmail.com>
Thu, 26 Oct 2017 10:13:25 +0000
(12:13 +0200)
committer
Jan Szejko
<janek37@gmail.com>
Thu, 26 Oct 2017 10:13:25 +0000
(12:13 +0200)
wtem/models.py
patch
|
blob
|
history
diff --git
a/wtem/models.py
b/wtem/models.py
index
6440e70
..
fbf0928
100644
(file)
--- a/
wtem/models.py
+++ b/
wtem/models.py
@@
-96,8
+96,8
@@
class Submission(models.Model):
def shuffled_exercise_ids(self):
exercise_ids = [e['id'] for e in exercises]
-
random.seed
(self.random_seed)
- random.shuffle(exercise_ids)
+
seeded_random = random.Random
(self.random_seed)
+
seeded_
random.shuffle(exercise_ids)
return exercise_ids
def current_exercise(self):