1. 04 Dec, 2015 4 commits
  2. 03 Dec, 2015 2 commits
  3. 02 Dec, 2015 2 commits
    • CohortMembership Test Fixes · 88a38965
      There are 3 main changes in this commit:
      * CohortFactory now sets up memberships properly, so consuming tests do not
      need to explicitly touch CourseUserGroup.users to add() users.
      * test_get_cohort_sql_queries has been updated to 3 and 9 queries when using
      and not using the cache, respectively. This is needed due to each operation
      needing an extra queery to get the CourseUserGroup from the CohortMembership.
      * Adding remove_user_from_cohort(), the counterpart to add_user_to_cohort().
      This is also to keep tests from touching the users field directly, and keep
      CohortMembership data in sync.
      Eric Fischer committed
    • CohortMembership Transaction Fixes · 731d85f7
      An issue arose recently due to ATOMIC_REQUESTS being turned on by default. It
      turns out that CohortMemberships had been somewhat relying on the old default
      transaction handling in order to keep CohortMemberships and the underlying
      CourseUserGroup.users values in-sync.
      
      To fix this, I've made all updates to Cohortmemberships go through an
      outer_atomic(read_committed=True) block. This, is conjunction with the already
      present select_for_update(), will no longer allow 2 simultaneous requests to
      modify objects in memory without sharing them. Only one process will be
      touching a given CohortMembership at any given time, and all changes will be
      immediately comitted to the database, where the other process will see them.
      
      I've also included some changes to get_cohort(), add_user_to_cohort(), and
      remove_user_from_cohort() in order to properly make use of the new
      CohortMembership system.
      Eric Fischer committed
  4. 01 Dec, 2015 2 commits
  5. 30 Nov, 2015 3 commits
  6. 25 Nov, 2015 5 commits
  7. 23 Nov, 2015 1 commit
  8. 22 Nov, 2015 1 commit
  9. 18 Nov, 2015 1 commit
  10. 17 Nov, 2015 1 commit
  11. 16 Nov, 2015 1 commit
  12. 10 Nov, 2015 1 commit
  13. 07 Nov, 2015 1 commit
  14. 06 Nov, 2015 1 commit
  15. 05 Nov, 2015 2 commits
  16. 04 Nov, 2015 2 commits
  17. 03 Nov, 2015 2 commits
  18. 02 Nov, 2015 2 commits
  19. 30 Oct, 2015 6 commits