From 268074a13fae75fe61b7ddcbaeabc1d32961f879 Mon Sep 17 00:00:00 2001 From: Hamza Israr <71447999+HamzaIsrar12@users.noreply.github.com> Date: Wed, 15 Nov 2023 14:38:40 +0500 Subject: [PATCH] feat: Update Logic for Entering Course Content Based on Course Outline (#1840) - Incomplete Components in Subsection: Open the first incomplete component in the subsection. - All Components Are Complete in Subsection: Open the first sequential component in the subsection. Fixes: LEARNER-9694 --- .../java/org/edx/mobile/model/course/CourseComponent.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OpenEdXMobile/src/main/java/org/edx/mobile/model/course/CourseComponent.java b/OpenEdXMobile/src/main/java/org/edx/mobile/model/course/CourseComponent.java index fb356c7ab3..d4fd70412b 100644 --- a/OpenEdXMobile/src/main/java/org/edx/mobile/model/course/CourseComponent.java +++ b/OpenEdXMobile/src/main/java/org/edx/mobile/model/course/CourseComponent.java @@ -607,7 +607,7 @@ public CourseComponent getFirstIncompleteComponent() { } } if (children.size() > 0) { - return children.get(children.size() - 1); + return children.get(0); } else { return null; } @@ -622,7 +622,7 @@ public CourseComponent getFirstIncompleteVideoComponent() { } } if (videos.size() > 0) { - return videos.get(videos.size() - 1); + return videos.get(0); } else { return null; }