/// <summary> /// This method calls PUT /api/progress on the server, which will automatically mark parent Levels and Courses complete as necessary /// </summary> /// <param name="onComplete"></param> public void CompleteLesson(Action <CourseProgress[], bool, bool> onComplete) { bool levelCompleted = false; bool courseCompleted = false; APIManager.CompleteLesson(InteractiveCourse.current, InteractiveLesson.current, true, (courseprogress) => { if (hasQuiz()) { onComplete?.Invoke(courseprogress, levelCompleted, courseCompleted); return; } APIManager.UpdateProgress(courseprogress, onComplete); }); }