Skip to content
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

Merged
merged 2 commits into from
Sep 18, 2024

Conversation

shafqat-muneer
Copy link

LEARNER-10217: Respect student_view_multi_device key for HTML xBlocks in the Block API

For HTML xBlocks, if the student_view_multi_device key is set to false, the HTML xBlock will not be displayed. Instead, a message will appear stating, "This interactive component isn't available on mobile."

Previous After Fix
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

@@ -245,7 +245,15 @@ public class CourseRepository: CourseRepositoryProtocol {
.replacingOccurrences(of: "?lang=\($0.key)", with: "")
return SubtitleUrl(language: $0.key, url: url)
}


let type: BlockType = {
Copy link
Collaborator

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:
Screenshot 2024-09-16 at 15 25 09
WDYT?
Thank you

Copy link
Author

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!

@rnr
Copy link
Collaborator

rnr commented Sep 17, 2024

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

@miankhalid
Copy link
Member

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!

Copy link

@saeedbashir saeedbashir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@shafqat-muneer shafqat-muneer merged commit 64120fb into 2U/develop Sep 18, 2024
3 checks passed
@shafqat-muneer shafqat-muneer deleted the Shafqat/LEARNER-10217 branch September 18, 2024 11:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants