-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Respect student_view_multi_device
key for HTML xBlocks in the Block API
#79
Conversation
@@ -245,7 +245,15 @@ public class CourseRepository: CourseRepositoryProtocol { | |||
.replacingOccurrences(of: "?lang=\($0.key)", with: "") | |||
return SubtitleUrl(language: $0.key, url: url) | |||
} | |||
|
|||
|
|||
let type: BlockType = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@shafqat-muneer Do you think we need to override the block type? I can imagine a situation where we would need to know the original type (e.g. we want to have different icons for .html and .unknown types).
Perhaps we could add changes to LessonType like this:
WDYT?
Thank you
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rnr, after a bit of analysis, I agree that it's more appropriate to handle it here. Although we don't have such a case at the moment, there's a chance it could occur in the future.
I've made the update. Thanks for pointing it out!
Looks good to me! I know there is a discussion going on about what we should do here, and I will approve this PR once we get approval from Khanan. Thanks |
hi @rnr, @touchapp and I discussed this matter on Monday and agreed that this PR is good to go and should be reviewed and approved as necessary. About the issue with the flag being returned as false, our backend team will look into this issue asap and share their findings with the team very soon. thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
LEARNER-10217: Respect
student_view_multi_device
key for HTML xBlocks in the Block APIFor HTML xBlocks, if the
student_view_multi_device
key is set tofalse
, the HTML xBlock will not be displayed. Instead, a message will appear stating, "This interactive component isn't available on mobile."Simulator.Screen.Recording.-.iPhone.15.-.2024-09-16.at.14.11.23.mp4
Simulator.Screen.Recording.-.iPhone.15.-.2024-09-16.at.14.09.14.mp4