Repository: learningequality/kolibri
Issue: Error when attempting to view Coach Exam Reports


### Observed behavior
On my instance, go to view exam report at

http://localhost:8000/coach/#/df6308209356328f726a09aa9bd323b7/5d132ba360b54b2ba9df169ffaa43ccb/exams/77d87e49c67c4ff9ac96bc543d836f4f

Get this TypeError (TypeError: filter_collection() takes exactly 3 arguments (4 given))
```
ERROR    Internal Server Error: /api/examlog/
Traceback (most recent call last):
  File "/Users/jon/.venvs/kolibri/lib/python2.7/site-packages/django/core/handlers/exception.py", line 41, in inner
    response = get_response(request)
  File "/Users/jon/.venvs/kolibri/lib/python2.7/site-packages/django/core/handlers/base.py", line 187, in _get_response
    response = self.process_exception_by_middleware(e, request)
  File "/Users/jon/.venvs/kolibri/lib/python2.7/site-packages/django/core/handlers/base.py", line 185, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/Users/jon/.venvs/kolibri/lib/python2.7/site-packages/django/views/decorators/csrf.py", line 58, in wrapped_view
    return view_func(*args, **kwargs)
  File "/Users/jon/.venvs/kolibri/lib/python2.7/site-packages/rest_framework/viewsets.py", line 90, in view
    return self.dispatch(request, *args, **kwargs)
  File "/Users/jon/.venvs/kolibri/lib/python2.7/site-packages/rest_framework/views.py", line 489, in dispatch
    response = self.handle_exception(exc)
  File "/Users/jon/.venvs/kolibri/lib/python2.7/site-packages/rest_framework/views.py", line 449, in handle_exception
    self.raise_uncaught_exception(exc)
  File "/Users/jon/.venvs/kolibri/lib/python2.7/site-packages/rest_framework/views.py", line 486, in dispatch
    response = handler(request, *args, **kwargs)
  File "/Users/jon/.venvs/kolibri/lib/python2.7/site-packages/rest_framework/mixins.py", line 40, in list
    queryset = self.filter_queryset(self.get_queryset())
  File "/Users/jon/.venvs/kolibri/lib/python2.7/site-packages/rest_framework/generics.py", line 152, in filter_queryset
    queryset = backend().filter_queryset(self.request, queryset, self)
  File "/Users/jon/.venvs/kolibri/lib/python2.7/site-packages/django_filters/rest_framework/backends.py", line 54, in filter_queryset
    return filter_class(request.query_params, queryset=queryset, request=request).qs
  File "/Users/jon/.venvs/kolibri/lib/python2.7/site-packages/django_filters/rest_framework/filterset.py", line 50, in qs
    return super(FilterSet, self).qs
  File "/Users/jon/.venvs/kolibri/lib/python2.7/site-packages/django_filters/filterset.py", line 220, in qs
    qs = filter_.filter(qs, value)
  File "/Users/jon/.venvs/kolibri/lib/python2.7/site-packages/django_filters/filters.py", line 713, in __call__
    return self.method(qs, self.f.field_name, value)
TypeError: filter_collection() takes exactly 3 arguments (4 given)
ERROR    "GET /api/examlog/?exam=77d87e49c67c4ff9ac96bc543d836f4f&collection=df6308209356328f726a09aa9bd323b7&1515535689923=1515535689923 HTTP/1.1" 500 30882
```
### Expected behavior

No Error. Exam report shows up.

### User-facing consequences

User not able to view Exam reports.

### Errors and logs

See description

### Steps to reproduce

1. Create and activate an Exam
1. Try to view report for the exam. (My classroom has 2 learners. One Learner submitted an attempt).
1. Get error

### Context
 * Kolibri version: develop
 * Operating system: mac
 * Browser: chrome


…



Changed files:
kolibri/logger/api.py

diff --git a/kolibri/logger/api.py b/kolibri/logger/api.py
index 5e899ab59a..7a55f403d5 100644
--- a/kolibri/logger/api.py
+++ b/kolibri/logger/api.py
@@ -154,7 +154,7 @@ class ExamLogFilter(BaseLogFilter):
 
     collection = ModelChoiceFilter(method="filter_collection", queryset=Collection.objects.all())
 
-    def filter_collection(self, queryset, collection):
+    def filter_collection(self, queryset, name, collection):
         return HierarchyRelationsFilter(queryset).filter_by_hierarchy(
             target_user=F('user'),
             ancestor_collection=collection,