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: show multiView enabled xBlocks on mobile only #158

Merged
merged 2 commits into from
Dec 12, 2023

Conversation

omerhabib26
Copy link
Contributor

@omerhabib26 omerhabib26 commented Dec 11, 2023

Description

  • Update conditions for components to show only enabled multiview xBlocks on mobile
  • Code Improvement: Added Null checks for studentViewData for Video and Discussions block

fix: #85 / LEARNER-9699

Copy link
Contributor

@HamzaIsrar12 HamzaIsrar12 left a comment

Choose a reason for hiding this comment

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

Minor nits only.

}

data class StudentViewData(
val onlyOnWeb: Boolean,
val duration: Any,
val transcripts: HashMap<String, String>?,
val encodedVideos: EncodedVideos?,
val topicId: String,
val topicId: String?,
Copy link
Contributor

Choose a reason for hiding this comment

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

Please revert this as we are already setting it to blank in the data layer.

val transcripts = block.studentViewData!!.transcripts
return when {
(block.isVideoBlock && block.studentViewData?.encodedVideos != null) -> {
val encodedVideos = block.studentViewData?.encodedVideos
Copy link
Contributor

Choose a reason for hiding this comment

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

Please also revert changes in this block.

- Update conditions for components to show only enabled multiview xBlocks on mobile

fix: LEARNER-9699
- Add checks to show appropriate view in case studentViewData is NullOrEmpty
@volodymyr-chekyrta volodymyr-chekyrta merged commit 7265f38 into openedx:develop Dec 12, 2023
3 checks passed
@omerhabib26 omerhabib26 deleted the omer/LEARNER-9699 branch December 12, 2023 12:00
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