File tree Expand file tree Collapse file tree 2 files changed +42
-0
lines changed
plugins/tutor-contrib-ltistore/tutor_ltistore/patches Expand file tree Collapse file tree 2 files changed +42
-0
lines changed Original file line number Diff line number Diff line change 1+
2+ # Add the lti store filter to the filter list, creating the configuration if it doesn't
3+ # exist but updating it if it does exist.
4+
5+ _filter_name = 'org.openedx.xblock.lti_consumer.configuration.listed.v1'
6+
7+ # Get or create the filter and pipeline list for the filter we care about
8+ _filter_to_update = OPEN_EDX_FILTERS_CONFIG.get(_filter_name, {})
9+ _pipeline_list = _filter_to_update.get('pipeline', [])
10+
11+ # Update the list to add our new filter.
12+ _pipeline_list.append('lti_store.pipelines.GetLtiConfigurations')
13+
14+ # Replace the existing setting with the updated version from the bottom up.
15+ # We do this because we might have created the object via the gets above. In
16+ # which case, the parent object would not have a reference to it.
17+ _filter_to_update['pipeline'] = _pipeline_list
18+ # Just override this, we don't care if it's there or not.
19+ _filter_to_update['fail_silently'] = False
20+ OPEN_EDX_FILTERS_CONFIG[_filter_name] = _filter_to_update
21+
Original file line number Diff line number Diff line change 1+
2+ # Add the lti store filter to the filter list, creating the configuration if it doesn't
3+ # exist but updating it if it does exist.
4+
5+ _filter_name = 'org.openedx.xblock.lti_consumer.configuration.listed.v1'
6+
7+ # Get or create the filter and pipeline list for the filter we care about
8+ _filter_to_update = OPEN_EDX_FILTERS_CONFIG.get(_filter_name, {})
9+ _pipeline_list = _filter_to_update.get('pipeline', [])
10+
11+ # Update the list to add our new filter.
12+ _pipeline_list.append('lti_store.pipelines.GetLtiConfigurations')
13+
14+ # Replace the existing setting with the updated version from the bottom up.
15+ # We do this because we might have created the object via the gets above. In
16+ # which case, the parent object would not have a reference to it.
17+ _filter_to_update['pipeline'] = _pipeline_list
18+ # Just override this, we don't care if it's there or not.
19+ _filter_to_update['fail_silently'] = False
20+ OPEN_EDX_FILTERS_CONFIG[_filter_name] = _filter_to_update
21+
You can’t perform that action at this time.
0 commit comments