internlm/SWE-Fixer-Train-110K huggingface dataset:
Repository: ddionrails/ddionrails

Issue:
Concepts should not be imported implicitly.
https://github.com/ddionrails/ddionrails/blob/68139838febdba24fdffaf4ef72e040801e94970/ddionrails/instruments/imports.py#L227-L232

---

###### This issue was generated by [todo](https://todo.jasonet.co) based on a `TODO` comment in 68139838febdba24fdffaf4ef72e040801e94970 when #1324 was merged. cc @ddionrails.


Discussion:
Issue-Label Bot is automatically applying the label `bug` to this issue, with a confidence of 0.70. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback! 

 Links: [app homepage](https://github.com/marketplace/issue-label-bot), [dashboard](https://mlbot.net/data/ddionrails/ddionrails) and [code](https://github.com/hamelsmu/MLapp) for this bot.

Resolving patch:
diff --git a/ddionrails/instruments/imports.py b/ddionrails/instruments/imports.py
--- a/ddionrails/instruments/imports.py
+++ b/ddionrails/instruments/imports.py
@@ -195,7 +195,9 @@ def execute_import(self):
     def _import_link(self, link):
         try:
             question = self._get_question(link)
-            concept = self._get_concept(link)
+            concept = Concept.objects.get(
+                name=link.get("concept", link.get("concept_name"))
+            )
         except BaseException as error:
             raise type(error)(f"Could not import ConceptQuestion: {link}")
         ConceptQuestion.objects.get_or_create(question=question, concept=concept)
@@ -210,12 +212,3 @@ def _get_question(element):
             instrument__study__name=study, instrument__name=instrument, name=question
         )
         return question
-
-    @staticmethod
-    def _get_concept(element):
-        # TODO: Concepts should not be imported implicitly.
-        concept = Concept.objects.get_or_create(
-            name=element.get("concept", element.get("concept_name"))
-        )[0]
-
-        return concept


Test patch:
Repository: learningequality/kolibri

Issue:
`django-mptt` dependency missing from Kolibri setup
## Issue

In the [setup instructions](https://github.com/learningequality/kolibri), `pip install -e .` is used to install Django and other dependencies. However running `kolibri manage runserver` on a fresh installations gives:

```
vagrant@kolibri ~> kolibri manage runserver
Unhandled exception in thread started by <function wrapper at 0x7fba4bb75938>
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/django/utils/autoreload.py", line 226, in wrapper
    fn(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/django/core/management/commands/runserver.py", line 109, in inner_run
    autoreload.raise_last_exception()
  File "/usr/local/lib/python2.7/dist-packages/django/utils/autoreload.py", line 249, in raise_last_exception
    six.reraise(*_exception)
  File "/usr/local/lib/python2.7/dist-packages/django/utils/autoreload.py", line 226, in wrapper
    fn(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/django/__init__.py", line 18, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/usr/local/lib/python2.7/dist-packages/django/apps/registry.py", line 108, in populate
    app_config.import_models(all_models)
  File "/usr/local/lib/python2.7/dist-packages/django/apps/config.py", line 202, in import_models
    self.models_module = import_module(models_module_name)
  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/kolibri/kolibri/auth/models.py", line 28, in <module>
    from mptt.models import MPTTModel, TreeForeignKey
ImportError: No module named mptt.models
^Cfish: Job 1, “kolibri manage runserver” terminated by signal SIGINT (Quit request from job control (^C))
```
## Work-around

The correct dependencies can be installed using

```
pip install -r requirements.txt
```
## Analysis

If we're using  `pip install -e .` as the canonical way to install Kolibri's dependencies, all required packages should be included in the `install_requires` field in `setup.py`.

We should clarify how these differ from the dependencies listed the various requirements files, and potentially clean these up if there is redundancy.



Discussion:
There's a PR to improve the `README`. https://github.com/learningequality/kolibri/pull/29/files.


Resolving patch:
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -29,9 +29,13 @@
     package_dir={'kolibri': 'kolibri'},
     include_package_data=True,
     install_requires=[
-        'django==1.9.1',
+        'django>=1.9,<1.10',
         'docopt',
         'colorlog',
+        'django-mptt==0.8.0',
+        'djangorestframework==3.3.3',
+        'drf-nested-routers',
+        'six',
     ],
     setup_requires=['pytest-runner'],
     tests_require=['pytest', 'tox', 'flake8'],


Test patch:
Repository: learningequality/kolibri

Issue:
AttributeError: `Notetype` object has no attribute `MethodFilter`
## Summary

I generated a `kolibri-static`via `python setup.py bdist_wheel --static` then install it on my `Windows 7 VM` using pip then run `kolibre manage runserver` 
I got an error see the screenshots below.
## Branch or installer
- Version: `master`
## Screenshots

![screen shot 2016-07-09 at 2 34 43 am](https://cloud.githubusercontent.com/assets/4099119/16698854/182d0d34-4583-11e6-9848-62ea7d2019a1.png)
## How to reproduce
1. cd ~/kolibri in your working machine
2. run command `python setup.py bdist_wheel --static`
3. install the kolibri-static in your Windows 7 virtualbox



Discussion:

Resolving patch:
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -56,6 +56,7 @@ def read_file(fname):
 install_requires = [
     'colorlog',
     'django>=1.9,<1.10',
+    'django-filter>=0.13.0',
     'django-mptt==0.8.4',
     'django-js-reverse==0.7.2',
     'djangorestframework==3.3.3',


Test patch:
Repository: learningequality/kolibri

Issue:
emphasize message when content renderer is not available

Current behavior is confusing because the error is styled the same as the description:

![image](https://cloud.githubusercontent.com/assets/2367265/23562570/d50525d4-fff7-11e6-8644-98c28b9a6c7d.png)


> Kolibri is unable to render this content

This string should be rendered as an error message so it doesn't look like part of the content description. Recommend that we use a [non-dismissible alert](https://josephuspaye.github.io/Keen-UI/#/ui-alert) error:

![image](https://cloud.githubusercontent.com/assets/2367265/23562703/6ddf6a26-fff8-11e6-9b4c-45d2f3d7bcec.png)





Discussion:
might also be helpful (at least in the console) to report what renderer it's looking for
Can put some `logging.debug` statements back in.

Resolving patch:
diff --git a/kolibri/plugins/audio_mp3_render/kolibri_plugin.py b/kolibri/plugins/audio_mp3_render/kolibri_plugin.py
--- a/kolibri/plugins/audio_mp3_render/kolibri_plugin.py
+++ b/kolibri/plugins/audio_mp3_render/kolibri_plugin.py
@@ -8,7 +8,7 @@ class AudioMP3RenderPlugin(KolibriPluginBase):
     pass
 
 
-class AudioMP3RenderAsset(content_hooks.WebpackBundleHook):
+class AudioMP3RenderAsset(content_hooks.ContentRendererHook):
     unique_slug = "audio_mp3_render_module"
     src_file = "assets/src/module.js"
     content_types_file = "assets/src/content_types.json"
diff --git a/kolibri/plugins/document_pdf_render/kolibri_plugin.py b/kolibri/plugins/document_pdf_render/kolibri_plugin.py
--- a/kolibri/plugins/document_pdf_render/kolibri_plugin.py
+++ b/kolibri/plugins/document_pdf_render/kolibri_plugin.py
@@ -8,7 +8,7 @@ class DocumentPDFRenderPlugin(KolibriPluginBase):
     pass
 
 
-class DocumentPDFRenderAsset(content_hooks.WebpackBundleHook):
+class DocumentPDFRenderAsset(content_hooks.ContentRendererHook):
     unique_slug = "document_pdf_render_module"
     src_file = "assets/src/module.js"
     content_types_file = "assets/src/content_types.json"
diff --git a/kolibri/plugins/html5_app_renderer/kolibri_plugin.py b/kolibri/plugins/html5_app_renderer/kolibri_plugin.py
--- a/kolibri/plugins/html5_app_renderer/kolibri_plugin.py
+++ b/kolibri/plugins/html5_app_renderer/kolibri_plugin.py
@@ -8,7 +8,7 @@ class HTML5AppPlugin(KolibriPluginBase):
     pass
 
 
-class HTML5AppAsset(content_hooks.WebpackBundleHook):
+class HTML5AppAsset(content_hooks.ContentRendererHook):
     unique_slug = "html5_app_renderer_module"
     src_file = "assets/src/module.js"
     content_types_file = "assets/src/content_types.json"


Test patch:
Repository: learningequality/kolibri

Issue:
`TypeError: this.items is null` on Windows
## Summary

Appears on all the non-PLIX and non-Flexbox exercises in CK-12 channel.
@rtibbles tried one approach in #1197, but the error is still there. 

## System information

 - Version: 0.3.1b2.dev4
 - Operating system: Windows 7
 - Browser: FF & Chrome

## Traceback or relevant snippet from server.log or browser console

```
TypeError: Cannot read property 'length' of undefined
    at qt.loadItemData (exercise_perseus_render_module-0.3.1beta1.dev2.js:42)
    at qt.n [as loadItemData] (default_frontend-0.3.1beta2.dev4.js:13)
    at qt.<anonymous> (exercise_perseus_render_module-0.3.1beta1.dev2.js:42)
    at nr.run (default_frontend-0.3.1beta2.dev4.js:14)
    at B (default_frontend-0.3.1beta2.dev4.js:13)
    at Array.<anonymous> (default_frontend-0.3.1beta2.dev4.js:14)
    at t (default_frontend-0.3.1beta2.dev4.js:14)
```

## How to reproduce

Try any non-PLIX and non-Flexbox exercise.

## Screenshots

### Firefox
![virtualbox_windows 7_07_04_2017_14_21_39](https://cloud.githubusercontent.com/assets/1457929/24800093/e2111a2c-1b9e-11e7-88c1-22f628ab743d.png)


### Chrome
![virtualbox_windows 7_07_04_2017_14_24_47](https://cloud.githubusercontent.com/assets/1457929/24800040/9dffe868-1b9e-11e7-9b33-e3c3597a224a.png)


Discussion:
Looks like the mime type is still octet stream, so I think our diagnosis of the issue is still valid, just our solution is not working. 
Maybe worth noting that this issue appeared right after the #1189 `zipcontent` issue was fixed, if it helps...
This issue can only appear with the zip content fix. I will need to debug on a Windows machine in order to see how to set the mimetype properly. 

Resolving patch:
diff --git a/kolibri/content/views.py b/kolibri/content/views.py
--- a/kolibri/content/views.py
+++ b/kolibri/content/views.py
@@ -11,7 +11,7 @@
 
 # Do this to prevent import of broken Windows filetype registry that makes guesstype not work.
 # https://www.thecodingforums.com/threads/mimetypes-guess_type-broken-in-windows-on-py2-7-and-python-3-x.952693/
-mimetypes.init([])
+mimetypes.init([os.path.join(os.path.dirname(__file__), 'constants', 'mime.types')])
 
 class ZipContentView(View):
 


Test patch:
Repository: learningequality/kolibri

Issue:
learner exam list page didn't refresh after submitting exam

the exam just-taken still said 'start'


Discussion:

Resolving patch:
diff --git a/kolibri/content/serializers.py b/kolibri/content/serializers.py
--- a/kolibri/content/serializers.py
+++ b/kolibri/content/serializers.py
@@ -202,9 +202,8 @@ def to_representation(self, obj):
         if isinstance(self.context['request'].user, FacilityUser):
             try:
                 # Try to add the score from the user's ExamLog attempts.
-                output['score'] = sum(
-                    obj.exam.examlogs.get(user=self.context['request'].user).attemptlogs.values_list(
-                        'correct', flat=True))
+                output['score'] = obj.exam.examlogs.get(user=self.context['request'].user).attemptlogs.aggregate(
+                    Sum('correct')).get('correct__sum')
                 output['answer_count'] = obj.exam.examlogs.get(user=self.context['request'].user).attemptlogs.count()
                 output['closed'] = obj.exam.examlogs.get(user=self.context['request'].user).closed
             except ExamLog.DoesNotExist:


Test patch:
diff --git a/kolibri/core/assets/test/api-resource.js b/kolibri/core/assets/test/api-resource.js
--- a/kolibri/core/assets/test/api-resource.js
+++ b/kolibri/core/assets/test/api-resource.js
@@ -173,9 +173,14 @@ describe('Resource', function () {
       this.resource.addModel(new Resources.Model(this.modelData, {}, this.resource));
       assert.ok(!spy.called);
     });
-    it('should not add a model to the cache if no id', function () {
+    it('should add a model to the cache if no id', function () {
       this.resource.addModel(new Resources.Model({ data: 'data' }, {}, this.resource));
-      assert.deepEqual({}, this.resource.models);
+      assert.equal(1, Object.keys(this.resource.models).length);
+    });
+    it('should not return the added model from the cache if no id', function () {
+      this.resource.addModel(new Resources.Model({ data: 'data' }, {}, this.resource));
+      const model = this.resource.getModel(undefined);
+      assert.ok(!model.attributes.data);
     });
     it('should add a model to the cache if it has an id', function () {
       const model = this.resource.addModel(new Resources.Model({ id: 'test' }, {}, this.resource));
Repository: learningequality/kolibri

Issue:
Cannot play MP3 files in Kolibri
## Summary

MP3 files are inside the `.kolibri\content\storage` folder and I can play them in the Windows Media Player, but do not load from Kolibri.

## System information

 - Version: KolibriSetup-0.2.0.dev3.exe
 - Operating system: Windows 8.1
 - Browser: Firefox

## Screenshots

![mp32](https://cloud.githubusercontent.com/assets/1457929/23808849/3645b420-0580-11e7-9628-e0e01cac6073.png)



Discussion:
I'm testing of the `release-v0.3.x` branch, where @rtibbles' #1064 has presumably been merged, and I still cannot play MP3 in Chrome on Linux... :disappointed: 

![nyman - a la folie - cut1 - khan academy testing - kolibri - google chrome_088](https://cloud.githubusercontent.com/assets/1457929/23885605/887833f4-0831-11e7-9800-4620cb04aef2.png)



Actually, Firefox reports the error differently, same as in the initial report on Windows:

![nyman - a la folie - cut1 - khan academy testing - kolibri - mozilla firefox_089](https://cloud.githubusercontent.com/assets/1457929/23885751/9c8d2db2-0832-11e7-8fa2-310019f824ed.png)


Resolving patch:
diff --git a/kolibri/logger/api.py b/kolibri/logger/api.py
--- a/kolibri/logger/api.py
+++ b/kolibri/logger/api.py
@@ -113,17 +113,13 @@ class MasteryLogViewSet(viewsets.ModelViewSet):
 
 class AttemptFilter(filters.FilterSet):
     content = filters.django_filters.MethodFilter()
-    user = filters.django_filters.MethodFilter()
 
     def filter_content(self, queryset, value):
         return queryset.filter(masterylog__summarylog__content_id=value)
 
-    def filter_user(self, queryset, value):
-        return queryset.filter(masterylog__summarylog__user_id=value)
-
     class Meta:
         model = AttemptLog
-        fields = ['masterylog', 'complete']
+        fields = ['masterylog', 'complete', 'user', 'content']
 
 class AttemptLogViewSet(viewsets.ModelViewSet):
     permission_classes = (KolibriAuthPermissions,)


Test patch:
Repository: learningequality/kolibri

Issue:
Timestamp in tablet and in laptop.
## Summary
When I logged in as a Coach user in laptop and in tablet with same user, it shows channel and Last active time in Recent tab. In tablet, Last time shows in only seconds and in laptop, it is in minutes and hours.

## System information

 - Version: Kolibri 0.4.0aplha5
 - Operating system: Ubuntu 14.04 LTS
 - Browser: Chrome browser and Firefox

## How to reproduce

1. Log in as learner.
2. Click on Coach and Select Recent tab.
3. You will see Channels name with Last active.

## Screenshots
Laptop screenshot:
![screen shot 2017-04-27 at 12 56 43 pm](https://cloud.githubusercontent.com/assets/12776071/25476346/88d8f092-2b57-11e7-92fc-e6e79d28a21d.png)

Tablet screenshot:
![screenshot_2010-01-18-02-39-40](https://cloud.githubusercontent.com/assets/12776071/25476388/ac5d2844-2b57-11e7-8019-aa5a02e36a55.png)



Discussion:
To confirm, the tablet is Android 4, in Chrome?
I was able to reproduce this on desktop mac by setting my computer time to the past, which also messes up a lot of other things on the computer! I guess the formatter needs to be able to handle negative values of 'last active'.
I think this is related to broader time issues in #1278 - where relative times could be problematic when comparing times set across different devices.

Resolving patch:
diff --git a/kolibri/core/templatetags/kolibri_tags.py b/kolibri/core/templatetags/kolibri_tags.py
--- a/kolibri/core/templatetags/kolibri_tags.py
+++ b/kolibri/core/templatetags/kolibri_tags.py
@@ -11,8 +11,10 @@
 
 from django import template
 from django.conf import settings
+from django.core.serializers.json import DjangoJSONEncoder
 from django.core.urlresolvers import reverse
 from django.utils.html import mark_safe
+from django.utils.timezone import now
 from kolibri.core.hooks import NavigationHook, UserNavigationHook
 from rest_framework.renderers import JSONRenderer
 from rest_framework.test import APIClient
@@ -48,6 +50,16 @@ def kolibri_main_navigation():
             "</script>".format(json.dumps(init_data)))
     return mark_safe(html)
 
+
+@register.simple_tag()
+def kolibri_set_server_time():
+    html = ("<script type='text/javascript'>"
+            "{0}.utils.serverClock.setServerTime({1});"
+            "</script>".format(settings.KOLIBRI_CORE_JS_NAME,
+                               json.dumps(now(), cls=DjangoJSONEncoder)))
+    return mark_safe(html)
+
+
 @register.simple_tag(takes_context=True)
 def kolibri_bootstrap_model(context, base_name, api_resource, **kwargs):
     # check necessary for when there is no initial content databases


Test patch:
Repository: learningequality/kolibri

Issue:
hide not-recent learners on 'coach - recent activity' tab
See similar issue for channels: https://github.com/learningequality/kolibri/pull/1406

Now we need to do the same thing for when you drill deeper and reach the learners list. For example here, we're showing all learners regardless of whether or not they've had recent activity:

![image](https://cloud.githubusercontent.com/assets/2367265/25878301/8d2f6c62-34de-11e7-96f7-836359e3bd28.png)







Discussion:

Resolving patch:
diff --git a/kolibri/plugins/coach/serializers.py b/kolibri/plugins/coach/serializers.py
--- a/kolibri/plugins/coach/serializers.py
+++ b/kolibri/plugins/coach/serializers.py
@@ -18,7 +18,7 @@ class UserReportSerializer(serializers.ModelSerializer):
     class Meta:
         model = FacilityUser
         fields = (
-            'pk', 'full_name', 'progress', 'last_active',
+            'pk', 'username', 'full_name', 'progress', 'last_active',
         )
 
     def get_progress(self, target_user):


Test patch:
diff --git a/kolibri/plugins/coach/assets/test/views/channel-list-page.spec.js b/kolibri/plugins/coach/assets/test/views/channel-list-page.spec.js
--- a/kolibri/plugins/coach/assets/test/views/channel-list-page.spec.js
+++ b/kolibri/plugins/coach/assets/test/views/channel-list-page.spec.js
@@ -50,6 +50,7 @@ function makeVm(options = {}, state) {
   });
   const components = {
     'name-cell': '<div></div>',
+    'report-subheading': '<div></div>',
   };
   const Ctor = Vue.extend(ChannelListPage);
   return new Ctor(Object.assign(options, { store, components })).$mount();
diff --git a/kolibri/plugins/coach/assets/test/views/exam-report-page.spec.js b/kolibri/plugins/coach/assets/test/views/exam-report-page.spec.js
--- a/kolibri/plugins/coach/assets/test/views/exam-report-page.spec.js
+++ b/kolibri/plugins/coach/assets/test/views/exam-report-page.spec.js
@@ -81,6 +81,6 @@ describe('exam report page', () => {
     // score isn't properly formatted
     assert.equal(getTextInScoreColumn(els.tableRows()[0]), '{num, number, percent} ');
     // emdash
-    assert.equal(getTextInScoreColumn(els.tableRows()[1]), '\u2014 ');
+    assert.equal(getTextInScoreColumn(els.tableRows()[1]), '– ');
   });
 });
Repository: learningequality/kolibri

Issue:
<Enhancement> A pop up on the screen when a learner masters an exercise would be great.
## Summary

<Enhancement> A pop up on the screen when a learner masters an exercise would be great.

Presently the learner is not aware if he/she has mastered the topic, since the point addition happens very subtly.
Hence a Pop up on screen that would read "You have Mastered the Exercise and earned 500 points, Keep Going"  would be great. Anything even shorter would be great. 

Its just an on screen pop up would be great.

## System information

 - Version: 0.4.0Beta1
 - Operating system: Linus LTS 14.04
 - Browser: Chrome

## How to reproduce

1. Master an exercise on a tablet.
2. You not know if you have mastered the topic clearly .

## Screenshots

![img-20170511-wa0002](https://cloud.githubusercontent.com/assets/13453618/25945726/a11480a4-3665-11e7-9621-52a26a8be9c2.jpg)

![img-20170511-wa0001](https://cloud.githubusercontent.com/assets/13453618/25945727/a2af45b6-3665-11e7-87db-d9d6003a41f0.jpg)



Discussion:
Would it help if the points pop up appeared regardless of where you are scrolled to on the screen? (the issue seems to be that on the tablet, the points pop up is 'under the fold' at the top part of the screen).
@rtibbles That should do the trick, just increase the fade time of the pop up by few more seconds, presently it fades off quickly.
@khangmach ^ note will increase the fade time to 10 seconds from 5.
https://cloud.githubusercontent.com/assets/25045166/25976223/62000868-3668-11e7-88ab-85ddfba9f9b6.png

thoughts on this popup?Perhaps it can fade in and out (~10s) upon completion. I could make an animation for this if it's of some interest. 

Note that it already does fade in and out!
This looks good! Thanks. In fact I would prefer the learner has to click on close to proceed further instead of fade out in 10s.

It kinda keeps the momentum and focus. 
The pop-up is re-addressed here:
https://cloud.githubusercontent.com/assets/25045166/26118317/4fdd576c-3a1e-11e7-9e5f-1d519045ea6e.png

already looked at by @christianmemije 

Resolving patch:
diff --git a/kolibri/content/api.py b/kolibri/content/api.py
--- a/kolibri/content/api.py
+++ b/kolibri/content/api.py
@@ -222,7 +222,7 @@ def next_content(self, request, **kwargs):
         next_item = models.ContentNode.objects.filter(tree_id=this_item.tree_id, lft__gt=this_item.rght).order_by("lft").first()
         if not next_item:
             next_item = this_item.get_root()
-        return Response({'kind': next_item.kind, 'id': next_item.id})
+        return Response({'kind': next_item.kind, 'id': next_item.id, 'title': next_item.title})
 
 
 class FileViewset(viewsets.ModelViewSet):


Test patch:
Repository: learningequality/kolibri

Issue:
Learn's Search is broken
## Summary

* Search within Learn is currently broken on Develop.
* See [triggerSearch()](https://github.com/learningequality/kolibri/blob/develop/kolibri/plugins/learn/assets/src/state/actions.js#L377)

## Exception

`Exception Value: 'list' object has no attribute 'values_list'`

## How to reproduce

1. Search for something within Learn

## Real-life consequences

:rage4: 


Discussion:
Also broken on release-v0.4.x

Resolving patch:
diff --git a/kolibri/content/serializers.py b/kolibri/content/serializers.py
--- a/kolibri/content/serializers.py
+++ b/kolibri/content/serializers.py
@@ -55,7 +55,7 @@ def get_progress_fraction(content_id, user):
 
 def get_progress_fractions(nodes, user):
     from kolibri.logger.models import ContentSummaryLog
-    if isinstance(nodes, RawQuerySet):
+    if isinstance(nodes, RawQuerySet) or isinstance(nodes, list):
         leaf_ids = [datum.content_id for datum in nodes]
     else:
         leaf_ids = nodes.values_list("content_id", flat=True)
@@ -76,6 +76,9 @@ class ContentNodeListSerializer(serializers.ListSerializer):
 
     def to_representation(self, data):
 
+        if not data:
+            return data
+
         if 'request' not in self.context or not self.context['request'].user.is_facility_user:
             progress_dict = {}
         else:


Test patch: