debug: lms moving to next lesson
This commit is contained in:
@@ -104,6 +104,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function findFirstIncompleteLesson() {
|
function findFirstIncompleteLesson() {
|
||||||
|
console.log({ lessons: $lessons });
|
||||||
return $lessons.find(
|
return $lessons.find(
|
||||||
(lesson) =>
|
(lesson) =>
|
||||||
lesson.lesson_completion &&
|
lesson.lesson_completion &&
|
||||||
@@ -115,6 +116,7 @@
|
|||||||
function onNextQuery(lessons) {
|
function onNextQuery(lessons) {
|
||||||
if (!isFetching && lessons.length > 0) {
|
if (!isFetching && lessons.length > 0) {
|
||||||
const incompleteLesson = findFirstIncompleteLesson();
|
const incompleteLesson = findFirstIncompleteLesson();
|
||||||
|
console.log({ incompleteLesson });
|
||||||
|
|
||||||
if (incompleteLesson) {
|
if (incompleteLesson) {
|
||||||
goto(`/courses/${data.courseId}/lessons/${incompleteLesson.id}`);
|
goto(`/courses/${data.courseId}/lessons/${incompleteLesson.id}`);
|
||||||
|
|||||||
Reference in New Issue
Block a user