From 1c7369e1ca3f9cc8db5bc4090bdb7ce15e473450 Mon Sep 17 00:00:00 2001 From: Timotej Lazar Date: Fri, 10 Apr 2015 13:25:23 +0200 Subject: Ignore attempts from all non-student users --- monkey/edits.py | 3 +-- monkey/test.py | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) (limited to 'monkey') diff --git a/monkey/edits.py b/monkey/edits.py index fc95e8b..42e339a 100644 --- a/monkey/edits.py +++ b/monkey/edits.py @@ -248,8 +248,7 @@ if __name__ == '__main__': print(problem.name) pid = problem.pk attempts = Attempt.objects.filter(problem=problem, done=True) \ - .exclude(user__username='admin') \ - .exclude(user__username='test') + .exclude(user__groups=None) traces = [a.trace for a in attempts] edits[pid], submissions[pid], queries[pid] = get_edits_from_traces(traces) diff --git a/monkey/test.py b/monkey/test.py index ce7df93..1909f8d 100755 --- a/monkey/test.py +++ b/monkey/test.py @@ -31,8 +31,7 @@ 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) \ - .exclude(user__username='admin') \ - .exclude(user__username='test') + .exclude(user__groups=None) # Load hint database stored in edits.pickle. edits = tutor_apps.get_app_config('tutor').edits[problem.pk] -- cgit v1.2.1