Without this, when CCX runs 0003 it'll invoke course_overviews while
loading a course, but that table has a model change, and the migration
has not run yet. This ensures the course_overviews migration happens
first.
This abstract class contains most of the fields (aside from the id and
foreign key to StudentModule that the subclasses need to manage). It
also provides a get_history method that abstracts searching across
multiple backends.
Move router code to openedx/core
We need to use it from cms and lms.
Ensure aws_migrate can be used for migrating both the lms and cms.
Handle queries directed to student_module_history vs default and the
extra queries generated by Django 1.8 (SAVEPOINTS, etc).
Additionally, flag testing classes as multi_db so that Django will
flush the non-default database between unit tests.
Further decouple the foreignkey relation between csm and csmhe
When calling StudentModule().delete() Django will try to delete CSMHE
objects, but naively does so in the database, not by consulting the
database router.
Instead, we disable django cascading deletes and listen for post_delete
signals and clean up CSMHE by hand.
Add feature flags for CSMHE
One to turn it on/off so we can control the deploy.
The other will control whether or not we read from two database tables
or one when searching.
Update tests to explicitly use this get_history method rather than
looking directly into StudentModuleHistory or
StudentModuleHistoryExtended.
Inform lettuce to avoid the coursewarehistoryextended app
Otherwise it fails when it can't find features/ in that app.
Add Pg support, this is not tested automatically.
This is a clone (copy) of CSMH's declaration and methods with an added
id of UnsignedBigInAutoField
We should be able to delete the save_history code, but needs testing.
Add error logging when capa failures happen
Put StudentModuleHistory into its own database
Bump out the primary key on CSMHE
This gives us a gap to backfill as needed.
Since the new table's pk is an unsigned bigint, even for people who don't
consolidate CSMH into CSMHE, the lost rows are unlikely to matter.
Remove StudentModuleHistory cleaner
Before it was depending on the order of results, which is not very consistent. Now we use known identifiers to delve through data before making our assertions.
We added the ability here to check if a role has a user in with the ability to refresh the role cache before checking. Since some tests will make inline requests, which in turn put a user into a new role, we have to refresh afterwards otherwise we won't see that new role in place. Since we don't want to automatically refresh ever, we just added a way to request it, since we know in this test that we're doing something, effectively, out-of-band, which necessitates it.
Make the course URL pattern more generic.
Comment newly added functionality.
Fix quality issues.
Address two lint errors, with regex and variable naming.
Changed how we access course_key and course_id.
Replace another instance of self.course.id.to_deprecated_string()
Remove unused import, add missing one.
Improve how the ccx key is extracted from the URL
Use resolve() instead of os.path to get the course_id.
Remove the granting of staff access to coaches.
In the CCX dashboard, the Student Admin tab has a `Download student
grades` action. This action should download a CSV file containing
grades, but currently displays the CSV content in the browser instead.
This fix sets the `content-type` and `content-disposition` so that
a CSV file download occurs.
- fixes#93