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: new approach to generate learner_state_count in admin assignments list API; add addtl ordering and filtering support #324

Merged
merged 9 commits into from
Nov 8, 2023

Conversation

adamstankiewicz
Copy link
Member

@adamstankiewicz adamstankiewicz commented Nov 8, 2023

  • Ensures content_quantity can be used with ?ordering.
  • Ensures learner_state ("Status" column) can be filtered by one or more values at a time (e.g., learner_state=waiting, learner_state=notifying,failed).
  • Refactors how learner_state_counts is generated to no longer rely on .values('learner_state').annotation(count=Count('uuid', distinct=True)), which seems to be causing the exception seen in the following screenshot locally (not in stage/prod, though?). API now relies on Counter to determine the counts of each learner_state. It also now ensures self.filter_queryset() is called before generating these counts.

image

@adamstankiewicz adamstankiewicz changed the title fix: rely on new approach to generate learner_state_counts; add addtl ordering and filtering support fix: new approach to generate learner_state_counts in admin assignments list API; add addtl ordering and filtering support Nov 8, 2023
@adamstankiewicz adamstankiewicz changed the title fix: new approach to generate learner_state_counts in admin assignments list API; add addtl ordering and filtering support fix: new approach to generate learner_state_count in admin assignments list API; add addtl ordering and filtering support Nov 8, 2023
@adamstankiewicz adamstankiewicz marked this pull request as ready for review November 8, 2023 13:14
@adamstankiewicz adamstankiewicz merged commit a064436 into main Nov 8, 2023
@adamstankiewicz adamstankiewicz deleted the ags/learner-state-counts-new-approach branch November 8, 2023 18:50
katrinan029 added a commit that referenced this pull request Nov 13, 2023
fix: refactored code based on reviewer feedback

fix: allow non-opaque-keys as content key for allocate requests

fix: data migration to delete Actions sans Assignments, and use on_delete=CASCADE (#314)

chore: allow optional logging of Django's SQL

fix: missing content titles on assignments

feat: Try to populate lms_user_id on assignments during creation

This is an attempt to cover the case where learners are already
logged in at the moment of assignment.  This case is a hole left by the
work in ENT-7875 which only set out to cover the case where a learner
was logged out at the moment of assignment.

ENT-7874

feat: Added assignments in credits_available endpoint

feat: allowing consumers of the learner content assignment api to filter by email and content title

fix: lint error

chore: refactored

fix: updated failing tests

feat: fetch enterprise catalog content metadata, serialize for credits_available assignments

ENT-7878

feat: add course_type field to assignment content metadata serializer

feat: return `learner_state_counts` as part of the admin assignments list API response (#322)

feat: validate requested allocation price

feat: link learners during assignment allocation

ENT-7778 | Call task to link learners to enterprise customer during allocation,
and have that ask add a successful linked action.

fix: new approach to generate `learner_state_count` in admin assignments list API; add addtl ordering and filtering support (#324)

chore: rebase

fix: lint error

chore: added test coverage
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.

2 participants