Repository: learningequality/kolibri

Issue:
Simplify coach indicator icon for leaf ContentNodes
### Observed behavior

coach text and icon very large

![image](https://user-images.githubusercontent.com/2367265/39608321-8581bb0a-4ef5-11e8-8e43-8d5bf9dced66.png)

### Expected behavior

recommend:

* make the icon 16x16 or 12x12
* remove the 'Coach' text
* add a 'Coach' tooltip, similar to the content type icon

### User-facing consequences

cards look a little janky


### Context

k 0.10.0

-----

cc @khangmach @jonboiser @christianmemije 


Discussion:
![image](https://user-images.githubusercontent.com/2367265/39608493-b1d8a99c-4ef6-11e8-987e-52aded9515b8.png)

In this case, let's decrease the font size of the number to 11px, in addition to reducing the size of the icon

the suggestions look great. The coach icon also looks good at 16x16. @jonboiser one of the changes Devon and I talked about last week was the removal of the "Coach" label that is next to the coach content icon and instead adding a tooltip when hovering over the icon. I don' think the text is too important to have, especially with the tooltip potentially involved.
@khangmach Would simplifying `<Icon> Coach` to `<Icon>` apply everywhere? Or in select UIs?
the elimination of the accompanying word "Coach" && the addition of tooltip "Coach content" will happen everywhere.

So also in:
Learn search results
Learn content cards throughout
Exercise pages
Coach recent/channels tab/learners tab
Cards in the lesson creation tool
Lists in the exam creation tool

Resolving patch:
diff --git a/kolibri/content/api.py b/kolibri/content/api.py
--- a/kolibri/content/api.py
+++ b/kolibri/content/api.py
@@ -98,7 +98,7 @@ class ContentNodeFilter(IdFilter):
     class Meta:
         model = models.ContentNode
         fields = ['parent', 'search', 'prerequisite_for', 'has_prerequisite', 'related',
-                  'recommendations_for', 'next_steps', 'popular', 'resume', 'ids', 'content_id', 'channel_id', 'kind']
+                  'recommendations_for', 'next_steps', 'popular', 'resume', 'ids', 'content_id', 'channel_id', 'kind', 'by_role']
 
     def title_description_filter(self, queryset, name, value):
         """
diff --git a/kolibri/content/serializers.py b/kolibri/content/serializers.py
--- a/kolibri/content/serializers.py
+++ b/kolibri/content/serializers.py
@@ -222,11 +222,10 @@ def to_representation(self, data):
         # ensure that we are filtering by the parent only
         # this allows us to only cache results on the learn page
         from .api import ContentNodeFilter
-        pure_parent_query = "parent" in self.context['request'].GET and \
-            not any(field in self.context['request'].GET for field in ContentNodeFilter.Meta.fields if field != "parent")
+        parent_filter_only = set(self.context['request'].GET.keys()).intersection(ContentNodeFilter.Meta.fields) == set(['parent'])
 
         # Cache parent look ups only
-        if pure_parent_query:
+        if parent_filter_only:
             cache_key = 'contentnode_list_{parent}'.format(
                 parent=self.context['request'].GET.get('parent'))
 
@@ -263,7 +262,7 @@ def to_representation(self, data):
         # This has the happy side effect of not caching our dynamically calculated
         # recommendation queries, which might change for the same user over time
         # because they do not return topics
-        if topic_only and pure_parent_query:
+        if topic_only and parent_filter_only:
             cache.set(cache_key, result, 60 * 10)
 
         return result


Test patch: