Mark HTML or video block as excluded from completion?

Hi all,

Hoping someone can assist with an issue we’ve been having with our instance of edX.

A number of our courses contain images in HTML blocks, which ends up counting towards the achievable points in a course.

Not all users are viewing all images for 5 seconds, which then causes the course to show as incomplete in the completion aggregator plugin (which we use to generate reports).

Reading through this page has lead me to find that XBlock’s have a completion_mode attribute that can be either completable, aggregator or excluded.

Is it possible to mark an instance of an XBlock as excluded? Ideally, we would be able to mark all images as not included (unless it is part of the course learning content).

Hi @0xliam , good question!

You can configure that 5 second delay to a shorter amount of time using settings.COMPLETION_BY_VIEWING_DELAY_MS. The setting is in milliseconds, so if you set it to 1, then completion will be set almost immediately for all HTML blocks.

Similarly, you can set the “watched % of a video” before completion gets stored using settings.COMPLETION_VIDEO_COMPLETE_PERCENTAGE. It’s set to 95% by default, but you could make it shorter, e.g. 0.01, though note – people still have to push “Play” on the video in order for completion to be marked.


Thanks for the reply :slight_smile: - I will look at adjusting those settings.

From your reply, am I right assume the answer to my second question is that it isn’t possible to exclude a specific block in a unit from completion?

Ideally, we would go through and mark all of those images as not completable (they are just banner images that the course writers wanted to add) - if the answer is no, I will likely suggest we remove all them.

Videos aren’t too much of a problem, as it’s a fair request to ask our users to view 95% of videos, but making them hover on every single image is proving to be problematic.

Correct – the completion settings are for all blocks.

The only way I can think of to make those specific blocks non-completable would be to create and install a new XBlock that acts just like an HtmlBlock, but is marked as excluded, and use that XBlock to store your images. E.g

class HtmlBlockNoCompletion(HtmlBlock):
    HtmlBlock that is excluded from completion.
    completion_mode = 'excluded'

Here’s a Tutorial on how to create XBlocks.


Thanks very much for your speedy replies - much appreciated.

I am still very new to edX - I inherited this platform from colleagues so I am discovering new things every day, XBlocks included!

1 Like

No worries @0xliam , thank you for asking questions here!
There’s several companies that provide Open edX platform customization, if you need any help with the dev or hosting.

1 Like