Skip to content
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

Certifications: Completion not working #6016

Open
paulbert opened this issue Mar 24, 2020 · 4 comments · May be fixed by #6980
Open

Certifications: Completion not working #6016

paulbert opened this issue Mar 24, 2020 · 4 comments · May be fixed by #6980
Assignees

Comments

@paulbert
Copy link
Member

See the two below images. (1) is the four courses required for this certification and (2) is the Course view showing a member has completed all four courses. No members are shown as having completed the certification, however.

(1)
image

(2)
image

@paulbert
Copy link
Member Author

Clarification: The Certified Members list is working most of the time. In this case the course Paul's RasPi Mar 9 2020 is causing the issue.

@paulbert
Copy link
Member Author

paulbert commented Jul 7, 2020

Noticed a new one. I think if any of the submissions for a test in the course have an incorrect answer, that course is not counted as complete even if there are other submissions with all correct answers.

This should not be the case. If there is one passing submission (all correct), then the course should be counted as complete.

@paulbert
Copy link
Member Author

paulbert commented Jul 7, 2020

Went back and graded all submissions for Paul's RasPi Mar 9 2020, but it is still causing members to be not listed in the completion list.

@paulbert
Copy link
Member Author

paulbert commented Jul 9, 2020

I think today I found the issue. There is an entry in the courses_progress database for a stepNum 0 as well as 1, 2, 3, 4. Since Paul's RasPi Mar 9 2020 has 4 steps, this makes the "number of steps completed" greater than the number of steps and returns false in CertificationsService.isCourseCompleted.

To fix I think we should refactor that function to be more precise. Here's the steps the function could take.

  1. Create an array variable with a unique list of the stepNum values in the progress array for that user. This is the right side of the condition without the .length returned in the function as it is.
  2. Return using course.doc.steps.every if the index + 1 equals a stepNum from the array created in step 1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants