-
Notifications
You must be signed in to change notification settings - Fork 86
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: allow timed exams for providers that are no longer valid #1237
Conversation
5325ae7
to
ba4bc5d
Compare
ba4bc5d
to
6151238
Compare
@@ -2943,7 +2943,7 @@ def get_student_view(user_id, course_id, content_id, | |||
is_proctored_exam = exam['is_proctored'] and not exam['is_practice_exam'] | |||
is_timed_exam = not exam['is_proctored'] and not exam['is_practice_exam'] | |||
|
|||
exam_backend = get_backend_provider(name=exam['backend']) | |||
exam_backend = get_backend_provider(exam=exam) |
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.
If an exam is passed in, as opposed to the provider name, a timed exam will always return "None".
if get_backend_provider(name=exam.backend).has_dashboard: | ||
return True | ||
try: | ||
if get_backend_provider(name=exam.backend).has_dashboard: |
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.
We don't want this case to throw an error because we still want the instructor dashboard to load for courses that still have software secure chosen.
backend = get_backend_provider(name=exam['backend']) | ||
backend.on_exam_saved(exam) | ||
try: | ||
backend = get_backend_provider(name=exam['backend']) |
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.
courses with software secure should be allowed to switch from a proctored to a timed exam. We don't want this code to throw an error in that case
instance.id, | ||
instance.proctored_exam.backend, | ||
) | ||
if instance.proctored_exam.is_proctored: |
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.
Only remove from the backend if it is a proctored exam, so this does fix a bug where instructors wouldn't be able to delete a timed exam.
[Question] For the case of PSI, do we care if removing attempts blows up?
2c5ae05
to
33df82a
Compare
33df82a
to
2c1033d
Compare
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.
👍
Description:
If a proctoring backend is removed, timed exams should render as expected. This PR also fixes a bug where the instructor dashboard was not available for courses that had a proctoring provider that was no longer valid.
JIRA:
COSMO-515
COSMO-513
Pre-Merge Checklist:
edx_proctoring/__init__.py
andpackage.json
if these changes are to be released.CHANGELOG.rst
Post-Merge: