{"action":"created","issue":{"url":"https://api.github.com/repos/edx/edx-platform/issues/11151","labels_url":"https://api.github.com/repos/edx/edx-platform/issues/11151/labels{/name}","comments_url":"https://api.github.com/repos/edx/edx-platform/issues/11151/comments","events_url":"https://api.github.com/repos/edx/edx-platform/issues/11151/events","html_url":"https://github.com/edx/edx-platform/pull/11151","id":125226885,"number":11151,"title":"[wip] Mark GeneratedCertificate records for audit mode as not eligible for a certificate.","user":{"login":"peter-fogg","id":1819831,"avatar_url":"https://avatars.githubusercontent.com/u/1819831?v=3","gravatar_id":"","url":"https://api.github.com/users/peter-fogg","html_url":"https://github.com/peter-fogg","followers_url":"https://api.github.com/users/peter-fogg/followers","following_url":"https://api.github.com/users/peter-fogg/following{/other_user}","gists_url":"https://api.github.com/users/peter-fogg/gists{/gist_id}","starred_url":"https://api.github.com/users/peter-fogg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peter-fogg/subscriptions","organizations_url":"https://api.github.com/users/peter-fogg/orgs","repos_url":"https://api.github.com/users/peter-fogg/repos","events_url":"https://api.github.com/users/peter-fogg/events{/privacy}","received_events_url":"https://api.github.com/users/peter-fogg/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-01-06T17:48:01Z","updated_at":"2016-01-11T15:22:26Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/edx/edx-platform/pulls/11151","html_url":"https://github.com/edx/edx-platform/pull/11151","diff_url":"https://github.com/edx/edx-platform/pull/11151.diff","patch_url":"https://github.com/edx/edx-platform/pull/11151.patch"},"body":"# [ECOM-3040](https://openedx.atlassian.net/browse/ECOM-3040)\r\nAn `eligible_for_certificate` field is added to the `GeneratedCertificate` model. This way we can retain existing grading logic, as well as maintaining correctness in analytics and reporting.\r\n\r\nIneligible certs are hidden by default. This is done by customizing the manager that `GeneratedCertificate` uses to filter out ineligible certs by default. There are some places in the code (largely reporting, analytics, and management commands) that use the fallback option without filtering, `GeneratedCertificate.with_ineligible_certificates`.\r\n\r\nFor posterity, more context is available in the ticket, and [on the wiki](https://openedx.atlassian.net/wiki/display/ECOM/Grading+and+certificate+changes+to+support+honor+-%3E+audit+transition).\r\n\r\n@bderusha, could you do a first round of review?\r\n\r\n### DB caching\r\nI've been running into issues with the database cache for bok choy and a11y tests (`common/test/db_cache`). The `certificates_certificateinvalidation` table is for some reason not getting dropped before migrations run, which leads to the migration which introduces it (`0007` in the `certificates` app) throwing an error, preventing *my* migration from running, which causes errors in the test fixtures. The temporary fix is to update the DB cache to make sure the DB and migration history are in sync. I've updated the DB cache in a separate commit for now, since there may be some better way to fix that issue. FYI @ziafazal "},"comment":{"url":"https://api.github.com/repos/edx/edx-platform/issues/comments/170585654","html_url":"https://github.com/edx/edx-platform/pull/11151#issuecomment-170585654","issue_url":"https://api.github.com/repos/edx/edx-platform/issues/11151","id":170585654,"user":{"login":"peter-fogg","id":1819831,"avatar_url":"https://avatars.githubusercontent.com/u/1819831?v=3","gravatar_id":"","url":"https://api.github.com/users/peter-fogg","html_url":"https://github.com/peter-fogg","followers_url":"https://api.github.com/users/peter-fogg/followers","following_url":"https://api.github.com/users/peter-fogg/following{/other_user}","gists_url":"https://api.github.com/users/peter-fogg/gists{/gist_id}","starred_url":"https://api.github.com/users/peter-fogg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peter-fogg/subscriptions","organizations_url":"https://api.github.com/users/peter-fogg/orgs","repos_url":"https://api.github.com/users/peter-fogg/repos","events_url":"https://api.github.com/users/peter-fogg/events{/privacy}","received_events_url":"https://api.github.com/users/peter-fogg/received_events","type":"User","site_admin":false},"created_at":"2016-01-11T15:22:26Z","updated_at":"2016-01-11T15:22:26Z","body":"@bderusha I've made the change to not filter out ineligible certs by default."}}