diff options
-rw-r--r-- | monkey/edits.py | 5 | ||||
-rwxr-xr-x | monkey/test.py | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/monkey/edits.py b/monkey/edits.py index e522964..8b8c3c3 100644 --- a/monkey/edits.py +++ b/monkey/edits.py @@ -243,7 +243,10 @@ if __name__ == '__main__': for problem in Problem.objects.all(): print(problem.name) pid = problem.pk - traces = [a.trace for a in Attempt.objects.filter(problem=problem, done=True)] + attempts = Attempt.objects.filter(problem=problem, done=True) \ + .exclude(user__username='admin') \ + .exclude(user__username='test') + traces = [a.trace for a in attempts] edits[pid], submissions[pid], queries[pid] = get_edits_from_traces(traces) pickle.dump((edits, submissions, queries), open('edits.pickle', 'wb')) diff --git a/monkey/test.py b/monkey/test.py index abf9bec..83aa0c2 100755 --- a/monkey/test.py +++ b/monkey/test.py @@ -30,7 +30,9 @@ pid = int(sys.argv[1]) problem = Problem.objects.get(pk=pid) aux_code = get_aux_code(user=User.objects.get(pk=1), problem=problem) -attempts = Attempt.objects.filter(problem=problem) +attempts = Attempt.objects.filter(problem=problem) \ + .exclude(user__username='admin') \ + .exclude(user__username='test') # Load hint database stored in edits.pickle. edits = tutor_apps.get_app_config('tutor').edits[problem.pk] |