This also has an initial use case for Personalized Learner Schedules
to add CTAs to capa and vertical blocks to allow users to shift their
course deadlines.
We noticed that since users can choose to reset their due dates,
they would have the ability to let due dates pass and then for any
assessment that allows viewing the answer after the due date would be
visible. The user could thus view all answers and then reset their
due dates to receive a perfect score.
This PR works to fix that issue by changing all show answer values
to not take into account being past the due date when inside a PLS
course.
When considering if an assignment is past due for the dates tab,
only look at the scored and graded units in the subsection (i.e.
ignore reading and video units).
This still leaves the "complete" field alone -- i.e. those
subsections will still be left incomplete generally. But for
assignment-focused tasks, they will instead be considered complete.
There were two get_transcript methods. The broken one that was being
used (VideoTranscriptsMixin.get_transcript) is stripped out here - it
has been superseded by transcripts_utils.get_transcript. The latter
includes support for blockstore and VAL, while the former did not.
This fixes the `AttributeError: 'LibraryLocatorV2' object has no
attribute 'make_asset_key'` error seen when attempting to load a
transcript from a video through the xblock api when the video had the
transcript stored in blockstore.
Note that if you were previously using video.get_transcript, you should
now use `transcripts_utils.get_transcript(video, ...)`, and note that
the returned 'filename' will be prefixed with the language code, as
other `get_transcript*` functions already do.
This change will prevent Library Content from being marked as
complete on view and the corresponding version bump to
edx-completion contains code that will start looking at the
children of the library content for completeness.
Due dates will only display for graded subsections.
If the assignment has already been completed, there will be a pill
to indicate that. If the assignment is past due, there will be a
pill. If it is upcoming, there are no pills
- yt_video_metadata returned a generic non-json-api-friendly 500 error
when called on a non-youtube video
- load_metadata_from_youtube was crashing when called from the xblock
yt_video_metadata endpoint. It passes a webob request, which has a
different api for retrieving the http referer.
The Randomized Content Block XBlock only randomizes the selection of
the children blocks and has unpredictable randomization of
the order of the selected child blocks due to the usage of sets, which
are unordered, for storing the selected blocks. This becomes apparent
when all the available child blocks in a library are chosen for a
Randomized Content Block, to randomize just the order of the child
blocks and not just the selection of the blocks. The order of the
selected blocks ends up being similar for multiple learners.
This change modifies the XBlock to store the selected child blocks in
a list, instead of a set, after randomly shuffling them.