diff options
Diffstat (limited to 'monkey/test.py')
-rwxr-xr-x | monkey/test.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/monkey/test.py b/monkey/test.py index 6549c1b..bb28e9b 100755 --- a/monkey/test.py +++ b/monkey/test.py @@ -36,6 +36,7 @@ attempts = Attempt.objects.filter(problem=problem) \ edits = tutor_apps.get_app_config('tutor').edits[problem.pk] submissions = tutor_apps.get_app_config('tutor').submissions[problem.pk] queries = tutor_apps.get_app_config('tutor').queries[problem.pk] +names = tutor_apps.get_app_config('tutor').names[problem.pk] # Find incorrect submissions. incorrect_all = [] @@ -135,6 +136,11 @@ elif sys.argv[2] == 'info': for (before, after), cost in sorted(changes.items(), key=lambda x: x[1]): print(' {:.4f}\t{} → {}'.format(cost, stringify(before) if before else 'ε', stringify(after) if after else 'ε')) + # Print all observed edits and their costs. + elif sys.argv[3] == 'names': + for name, count in sorted(names.items(), key=lambda x: x[1]): + print(' {:.4f}\t{}'.format(count, name)) + # Print all student submissions not (yet) corrected. elif sys.argv[3] == 'unsolved': for p in sorted(incorrect): |