-
Notifications
You must be signed in to change notification settings - Fork 45
Feat: Home tab[0092] #462
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
Merged
volodymyr-chekyrta
merged 17 commits into
openedx:develop
from
raccoongang:feat/home_tab
Oct 7, 2025
Merged
Feat: Home tab[0092] #462
Changes from 13 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
f7cfb43
feat: course home pager and pager indicator with navigation
PavloNetrebchuk 5ac6548
feat: course completion pager tab
PavloNetrebchuk 7d6610f
feat: move HomeNavigationRow to bottom bar
PavloNetrebchuk 8625632
feat: course home pages videos card
PavloNetrebchuk d1ed4bf
feat: course home pages assignment card
PavloNetrebchuk 87da809
feat: course home pages grades card
PavloNetrebchuk 2ce9ceb
feat: added empty states
PavloNetrebchuk 11657ff
feat: CaughtUpMessage
PavloNetrebchuk c9f3cbe
feat: A11y
PavloNetrebchuk 36e49ac
feat: detekt fixes
PavloNetrebchuk 05fc280
feat: changes according demo feedback
PavloNetrebchuk 42eda19
feat: course home analytic
PavloNetrebchuk a408106
feat: CourseHomeViewModelTest
PavloNetrebchuk 14b9923
fix: detekt fix and changes according PR review
PavloNetrebchuk 5e1b11f
feat: performance improvements
PavloNetrebchuk 71cc7de
feat: changes according PR feedback
PavloNetrebchuk 762ffe2
feat: changes according PR feedback
PavloNetrebchuk File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,263 @@ | ||
| package org.openedx.core | ||
|
|
||
| import org.openedx.core.data.model.room.VideoProgressEntity | ||
| import org.openedx.core.domain.model.AssignmentProgress | ||
| import org.openedx.core.domain.model.Block | ||
| import org.openedx.core.domain.model.BlockCounts | ||
| import org.openedx.core.domain.model.CourseComponentStatus | ||
| import org.openedx.core.domain.model.CourseDatesBannerInfo | ||
| import org.openedx.core.domain.model.CourseDatesResult | ||
| import org.openedx.core.domain.model.CourseProgress | ||
| import org.openedx.core.domain.model.CourseStructure | ||
| import org.openedx.core.domain.model.CoursewareAccess | ||
| import org.openedx.core.domain.model.EncodedVideos | ||
| import org.openedx.core.domain.model.OfflineDownload | ||
| import org.openedx.core.domain.model.Progress | ||
| import org.openedx.core.domain.model.ResetCourseDates | ||
| import org.openedx.core.domain.model.StudentViewData | ||
| import org.openedx.core.domain.model.VideoInfo | ||
| import org.openedx.core.module.db.DownloadModel | ||
| import org.openedx.core.module.db.DownloadedState | ||
| import org.openedx.core.module.db.FileType | ||
| import java.util.Date | ||
|
|
||
| object Mock { | ||
| private val mockAssignmentProgress = AssignmentProgress( | ||
| assignmentType = "Home", | ||
| numPointsEarned = 1f, | ||
| numPointsPossible = 3f, | ||
| shortLabel = "HM1" | ||
| ) | ||
| val mockChapterBlock = Block( | ||
| id = "id", | ||
| blockId = "blockId", | ||
| lmsWebUrl = "lmsWebUrl", | ||
| legacyWebUrl = "legacyWebUrl", | ||
| studentViewUrl = "studentViewUrl", | ||
| type = BlockType.CHAPTER, | ||
| displayName = "Chapter", | ||
| graded = false, | ||
| studentViewData = null, | ||
| studentViewMultiDevice = false, | ||
| blockCounts = BlockCounts(1), | ||
| descendants = emptyList(), | ||
| descendantsType = BlockType.CHAPTER, | ||
| completion = 0.0, | ||
| containsGatedContent = false, | ||
| assignmentProgress = mockAssignmentProgress, | ||
| due = Date(), | ||
| offlineDownload = null | ||
| ) | ||
| private val mockSequentialBlock = Block( | ||
| id = "id", | ||
| blockId = "blockId", | ||
| lmsWebUrl = "lmsWebUrl", | ||
| legacyWebUrl = "legacyWebUrl", | ||
| studentViewUrl = "studentViewUrl", | ||
| type = BlockType.SEQUENTIAL, | ||
| displayName = "Sequential", | ||
| graded = false, | ||
| studentViewData = null, | ||
| studentViewMultiDevice = false, | ||
| blockCounts = BlockCounts(1), | ||
| descendants = emptyList(), | ||
| descendantsType = BlockType.CHAPTER, | ||
| completion = 0.0, | ||
| containsGatedContent = false, | ||
| assignmentProgress = mockAssignmentProgress, | ||
| due = Date(), | ||
| offlineDownload = OfflineDownload("fileUrl", "", 1), | ||
| ) | ||
|
|
||
| val mockCourseStructure = CourseStructure( | ||
| root = "", | ||
| blockData = listOf(mockSequentialBlock, mockSequentialBlock), | ||
| id = "id", | ||
| name = "Course name", | ||
| number = "", | ||
| org = "Org", | ||
| start = Date(), | ||
| startDisplay = "", | ||
| startType = "", | ||
| end = Date(), | ||
| coursewareAccess = CoursewareAccess( | ||
| true, | ||
| "", | ||
| "", | ||
| "", | ||
| "", | ||
| "" | ||
| ), | ||
| media = null, | ||
| certificate = null, | ||
| isSelfPaced = false, | ||
| progress = Progress(1, 3), | ||
| ) | ||
|
|
||
| val mockCourseComponentStatus = CourseComponentStatus( | ||
| lastVisitedBlockId = "video1" | ||
| ) | ||
|
|
||
| val mockCourseDatesBannerInfo = CourseDatesBannerInfo( | ||
| missedDeadlines = false, | ||
| missedGatedContent = false, | ||
| contentTypeGatingEnabled = false, | ||
| verifiedUpgradeLink = "", | ||
| hasEnded = false | ||
| ) | ||
|
|
||
| val mockCourseDatesResult = CourseDatesResult( | ||
| datesSection = linkedMapOf(), | ||
| courseBanner = mockCourseDatesBannerInfo | ||
| ) | ||
|
|
||
| val mockCourseProgress = CourseProgress( | ||
| verifiedMode = "audit", | ||
| accessExpiration = "", | ||
| certificateData = null, | ||
| completionSummary = null, | ||
| courseGrade = null, | ||
| creditCourseRequirements = "", | ||
| end = "", | ||
| enrollmentMode = "audit", | ||
| gradingPolicy = null, | ||
| hasScheduledContent = false, | ||
| sectionScores = emptyList(), | ||
| studioUrl = "", | ||
| username = "testuser", | ||
| userHasPassingGrade = false, | ||
| verificationData = null, | ||
| disableProgressGraph = false | ||
| ) | ||
|
|
||
| val mockVideoProgress = VideoProgressEntity( | ||
| blockId = "video1", | ||
| videoUrl = "test-video-url", | ||
| videoTime = 1000L, | ||
| duration = 5000L | ||
| ) | ||
|
|
||
| val mockResetCourseDates = ResetCourseDates( | ||
| message = "Dates reset successfully", | ||
| body = "Your course dates have been reset", | ||
| header = "Success", | ||
| link = "", | ||
| linkText = "" | ||
| ) | ||
|
|
||
| val mockDownloadModel = DownloadModel( | ||
| id = "video1", | ||
| title = "Video 1", | ||
| courseId = "test-course-id", | ||
| size = 1000L, | ||
| path = "/test/path/video1", | ||
| url = "test-url", | ||
| type = FileType.VIDEO, | ||
| downloadedState = DownloadedState.NOT_DOWNLOADED, | ||
| lastModified = null | ||
| ) | ||
|
|
||
| val mockVideoBlock = Block( | ||
| id = "video1", | ||
| blockId = "video1", | ||
| lmsWebUrl = "lmsWebUrl", | ||
| legacyWebUrl = "legacyWebUrl", | ||
| studentViewUrl = "studentViewUrl", | ||
| type = BlockType.VIDEO, | ||
| displayName = "Video 1", | ||
| graded = false, | ||
| studentViewData = StudentViewData( | ||
| onlyOnWeb = false, | ||
| duration = "", | ||
| transcripts = null, | ||
| encodedVideos = EncodedVideos( | ||
| youtube = null, | ||
| hls = null, | ||
| fallback = null, | ||
| desktopMp4 = null, | ||
| mobileHigh = null, | ||
| mobileLow = VideoInfo( | ||
| url = "test-url", | ||
| fileSize = 1000L | ||
| ) | ||
| ), | ||
| topicId = "" | ||
| ), | ||
| studentViewMultiDevice = false, | ||
| blockCounts = BlockCounts(0), | ||
| descendants = emptyList(), | ||
| descendantsType = BlockType.VIDEO, | ||
| completion = 0.0, | ||
| containsGatedContent = false, | ||
| assignmentProgress = null, | ||
| due = null, | ||
| offlineDownload = null, | ||
| ) | ||
|
|
||
| val mockSequentialBlockForDownload = Block( | ||
| id = "sequential1", | ||
| blockId = "sequential1", | ||
| lmsWebUrl = "lmsWebUrl", | ||
| legacyWebUrl = "legacyWebUrl", | ||
| studentViewUrl = "studentViewUrl", | ||
| type = BlockType.SEQUENTIAL, | ||
| displayName = "Sequential 1", | ||
| graded = false, | ||
| studentViewData = null, | ||
| studentViewMultiDevice = false, | ||
| blockCounts = BlockCounts(0), | ||
| descendants = listOf("vertical1"), | ||
| descendantsType = BlockType.VERTICAL, | ||
| completion = 0.0, | ||
| containsGatedContent = false, | ||
| assignmentProgress = null, | ||
| due = null, | ||
| offlineDownload = null, | ||
| ) | ||
|
|
||
| val mockVerticalBlock = Block( | ||
| id = "vertical1", | ||
| blockId = "vertical1", | ||
| lmsWebUrl = "lmsWebUrl", | ||
| legacyWebUrl = "legacyWebUrl", | ||
| studentViewUrl = "studentViewUrl", | ||
| type = BlockType.VERTICAL, | ||
| displayName = "Vertical 1", | ||
| graded = false, | ||
| studentViewData = null, | ||
| studentViewMultiDevice = false, | ||
| blockCounts = BlockCounts(0), | ||
| descendants = listOf("video1"), | ||
| descendantsType = BlockType.VIDEO, | ||
| completion = 0.0, | ||
| containsGatedContent = false, | ||
| assignmentProgress = null, | ||
| due = null, | ||
| offlineDownload = null, | ||
| ) | ||
|
|
||
| val mockCourseStructureForDownload = CourseStructure( | ||
| root = "sequential1", | ||
| blockData = listOf(mockSequentialBlockForDownload, mockVerticalBlock, mockVideoBlock), | ||
| id = "test-course-id", | ||
| name = "Test Course", | ||
| number = "CS101", | ||
| org = "TestOrg", | ||
| start = Date(), | ||
| startDisplay = "2024-01-01", | ||
| startType = "timestamped", | ||
| end = Date(), | ||
| coursewareAccess = CoursewareAccess( | ||
| true, | ||
| "", | ||
| "", | ||
| "", | ||
| "", | ||
| "" | ||
| ), | ||
| media = null, | ||
| certificate = null, | ||
| isSelfPaced = false, | ||
| progress = null | ||
| ) | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
core/src/main/java/org/openedx/core/system/notifier/CourseProgressLoaded.kt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| package org.openedx.core.system.notifier | ||
|
|
||
| object CourseProgressLoaded : CourseEvent |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
In case we will use this file for tests only, probably we can move it to core/src/test or to debug/testFixtures?
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.
Not only tests. Also preview functions