[SE-4473] Implement progress bar - #431
Conversation
gabor-boros
left a comment
There was a problem hiding this comment.
@pkulkark I tested the changes in Firefox, Safari, and Brave (which is Chromium-based) as well. It seems that X-Frame-Options tricked us. The option is set to DENY, I guess in the aggregator, which means we cannot load those iFrames for every browser. The issue could be mitigated by playing around with CSP and/or X-Frame-Options. Please see the results below.
Firefox 93.0
Screen.Recording.2021-10-22.at.18.21.45.mov
Brave: 1.31.87, Chromium: 95.0.4638.54
Safari 15.0
| params = self._get_render_metadata(context, display_items, prereq_met, prereq_meta_info, banner_text, view, fragment) | ||
| if settings.FEATURES.get('SHOW_PROGRESS_BAR', False): | ||
| parent_block_id = self.get_parent().scope_ids.usage_id.block_id | ||
| params['chapter_completion_aggregator_url'] = '/'.join([settings.COMPLETION_AGGREGATOR_URL, str(self.course_id), parent_block_id]) + '/' |
There was a problem hiding this comment.
@pkulkark this will raise an attribute error if COMPLETION_AGGREGATOR_URL is not set. Also, the setting has no default value and not documented.
There was a problem hiding this comment.
Ah yes! Good catch. Fixed it. Also added it in the testing instructions.
a6f4252 to
41ce972
Compare
* feat: Implement couse progress bar (cherry picked from commit 6af2de1) Signed-off-by: Gabor Boros <gabor.brs@gmail.com>



Description:
This PR implements the changes needed to show course progress bar on the courseware page. There are two progress bars that will be displayed: One at the course level and the other one at section/chapter level.
JIRA: SE-4473
Testing instructions:
SHOW_PROGRESS_BARto true underFEATURESin lms.yml and studio.yml.COMPLETION_AGGREGATOR_URLsetting in lms.yml as shown below:Reviewers: