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

fix bug in signal marking notpassing whitelisted certs #983

Merged
merged 1 commit into from
Aug 18, 2021

Conversation

melvinsoft
Copy link

Fix RED-2361

Problem description: Certificates have a Django signal, when a certificate object is created and has a passing status (downloadable or generating) but the course or the grading change, and it ends up in a non passing grade for the learner, the certificate change automatically to notpassing.
That's fine except when there is an Exception certificate created from the instructor dashboard, then it should never change to notpassing.

Copy link

@OmarIthawi OmarIthawi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @melvinsoft. Please fix the flaky upstream test:

_ RecalculateSubsectionGradeTest.test_persistent_grades_enabled_on_course_2___split___3__38_ _

self = <lms.djangoapps.grades.tests.test_tasks.RecalculateSubsectionGradeTest testMethod=test_persistent_grades_enabled_on_course_2___split___3__38_>
default_store = 'split', num_mongo_queries = 3, num_sql_queries = 38

    @ddt.data(
        (ModuleStoreEnum.Type.mongo, 1, 38),
        (ModuleStoreEnum.Type.split, 3, 38),
    )
    @ddt.unpack
    def test_persistent_grades_enabled_on_course(self, default_store, num_mongo_queries, num_sql_queries):
        with self.store.default_store(default_store):
            self.set_up_course(enable_persistent_grades=True)
            with check_mongo_calls(num_mongo_queries):
                with self.assertNumQueries(num_sql_queries):
>                   self._apply_recalculate_subsection_grade()

The code looks great.

lms/djangoapps/certificates/signals.py Show resolved Hide resolved
@coveralls
Copy link

coveralls commented Aug 17, 2021

Coverage Status

Coverage increased (+0.004%) to 42.042% when pulling 83a99a8 on maxi/fix-RED-2361 into 5dfb8b4 on main.

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 this pull request may close these issues.

4 participants