-
Notifications
You must be signed in to change notification settings - Fork 3
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
feat: add list attempt api #129
Conversation
re_path(fr'exam/provider_settings/course_id/{COURSE_ID_PATTERN}/exam_id/{EXAM_ID_PATTERN}', | ||
CourseProviderSettingsView.as_view(), | ||
name='exam-provider-settings'), | ||
re_path( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
refactored this so the indentation would be consistent
@@ -15,16 +20,74 @@ class UserFactory(DjangoModelFactory): | |||
class Meta: | |||
model = get_user_model() | |||
django_get_or_create = ( | |||
"email", | |||
"username", | |||
'email', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pylint started yelling at me about inconsistent quotes so I made everything single quote
is_superuser = False | ||
is_staff = False | ||
|
||
|
||
class ProctoringProviderFactory(DjangoModelFactory): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't take on any refactoring with this PR but there's an opportunity to clean up a bunch of repetitive test setup using these factory classes.
Endpoint for listing exam attempts. Used to provide data for the instructor | ||
facing exam dashboard. | ||
|
||
/instructor_view/attempts?exam_id=<exam_id> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I used a unique path for this compared to exam/attempts
because the data returned is different from the other attempt endpoints.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
JIRA: MST-1891
Description: Adds a new endpoint to list attempts filtered by an exam id. This will drive the new 'instructor dashboard' component for exam. I expect this endpoint will include additional filter params beyond just exam_id once we add the search feature.
Using limit offset pagination allows the UI to decide it's own page size by setting the limit parameter.
Example
/instructor_view/attempts?exam_id=28&limit=20