An `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.
Ineligible certificates are hidden by using the
`eligible_certificates` manager on GeneratedCertificate. Some places
in the coe (largely reporting, analytics, and management commands) use
the default `objects` manager, since they need access to all
certificates.
This commit also updates the DB cache for acceptance tests.
* Add new role for support staff.
* Move dashboard/support functionality into a new Django app called "support".
* Add support view for searching and regenerating certificates.
* Refactor certificates views into separate files.
some optimisations
refactored code and added created event
added test to make sure generate event is emitted
changes based on feedback on 6/11
added certificate web page and tests
fixed quality violations
If certificates cannot be added to the queue,
mark the certificate status as 'error' so that
it can be re-run by management commands.
Clean up logging and return values.
Add the ability to generate "example" certificates to
test that certificate generation is working correctly for a course.
Add the ability to enable/disable self-generated certificates
on a per-course basis.
This commit adds the non-courseware lms/djangoapps and lms/lib.
These keys are now objects with a limited interface, and the particular
internal representation is managed by the data storage layer (the
modulestore).
For the LMS, there should be no outward-facing changes to the system.
The keys are, for now, a change to internal representation only. For
Studio, the new serialized form of the keys is used in urls, to allow
for further migration in the future.
Co-Author: Andy Armstrong <andya@edx.org>
Co-Author: Christina Roberts <christina@edx.org>
Co-Author: David Baumgold <db@edx.org>
Co-Author: Diana Huang <dkh@edx.org>
Co-Author: Don Mitchell <dmitchell@edx.org>
Co-Author: Julia Hansbrough <julia@edx.org>
Co-Author: Nimisha Asthagiri <nasthagiri@edx.org>
Co-Author: Sarina Canelake <sarina@edx.org>
[LMS-2370]
* API endpoint for certificate generation, an authenticated post with course
id requests that grading be carried out and a cert generated for
request.user in that course, using the usual grading and certificate
machinery (ie, it does not imply whitelisting, though whitelists and
blacklists will be respected)
- Logs each request as it comes in
- Calls xq.add_cert() and consequently, does grading synchronously on
this app host and then queues request for certificate agent.
- example usage:
```
curl --data "student_id=9999&course_id=Stanford/2013/Some_Class" http://127.0.0.1:8000/request_certificate
```
* Studio advanced setting added, "certificates_show_before_end", which
determines whether a course should permit certificates to be downloadable
by students before the coures's end date has passed.
- Modifications to dashboard view and templates to allow display of
certificate download links before course has ended.
(XXX: may declare failing students as failing before the course has ended.)
- To test, turn the setting on in a course which hasn't ended yet, and
force certificate generation for a student, then check their
dashboard.
Stanford had a problem a few times that certificate requests had
different values for the course display name and the course name printed
on the certificate and verification pages because of human error. This
passes the course display name on the queue to the certificate requests,
so that at least one place where the course name is reproduced (the
certificate agent's settings.py) can be eliminated.
* -G allows explicit setting of grade condition (e.g., a string such as
'Distinction', 'Pass', 'F', 'B') for the certificate, regardless of
grader output for the user.
* -T allows explicit request of a particular certificate template to be
applied to a given user's certificate regeneration, i.e.:
-T doctor_distinction.pdf
to generate a certificate of distinction for doctors.
Quick-and-dirty end-to-end flow, functional for at least the case of one course in need of re-verification.
Ready for design to start taking a look; still needs tests and code cleanup
* Adds regenerate_user command, which lets you run certificates for one
particular user in one particular class, regardless of whether they
have a pre-existing certificate.
There was a potential though unlikely race condition because the .save()
was after the certificate request was put on the queue.
Now calling .save() immediately after we update the
cert.
Without this, problems fail to load because they can't find how to
render themselves, and the certificate generation grading run will
get an inaccurately low count of the possible points a user could
get (anything they didn't see will be omitted), inflating their
grade during certificate calculation and making it inconsistent
with their Progress page.