Fixed course freezing and other course-ending bugs

This commit is contained in:
CoudronJerome
2023-05-08 20:57:09 +02:00
parent c3ebf48cdc
commit ae29ef9835
8 changed files with 22 additions and 50 deletions

View File

@@ -196,6 +196,7 @@ public class CoursesController : AbstractFeedback
/// </summary>
public void StartCourseController()
{
// Setting up course
course = courselist.courses[courselist.currentCourseIndex];
maxWords = course.theme.learnables.Count;
@@ -271,8 +272,8 @@ public class CoursesController : AbstractFeedback
{
// This function is also called (async) when pressing the 'Gebaar overslaan' button,
// so check for condition so we don't skip multiple signs
if (isNextSignInTransit || maxWords <= progress.completedLearnables)
return;
//if (isNextSignInTransit || maxWords < progress.completedLearnables)
if (isNextSignInTransit) return;
progress.progress = (float)progress.completedLearnables / (float)maxWords;
progressBar.fillAmount = progress.progress;
@@ -284,7 +285,7 @@ public class CoursesController : AbstractFeedback
StartCoroutine(CRNextSign());
}
// Finish course and record progress
if (progress.completedLearnables == maxWords)
else
{
FinishCourse();
}