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

Remove retry button in LTI Proctorio exams #155

Merged
merged 2 commits into from
Oct 11, 2024

Conversation

rijuma
Copy link
Member

@rijuma rijuma commented Oct 9, 2024

Description

Ticket: COSMO-512 🔒

After submitting a Practice Proctoring exam there's a "Retry my exam" that if clicked throws an Axios 400 error:
Screenshot 2024-10-09 at 11 14 47

A Practice Proctoring exam that has an LTI provider cannot be retried. This update removes the button on such cases.

Comment on lines +513 to 514
use_legacy_attempt_api: true,
attempt_status: ExamStatus.SUBMITTED,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now if a Proctored exam with an LTI provider is submitted no longer shows the "Retry my exam" button. That's the reason for this update.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NIT: we should remove LTI from this since LTI implies the new (not legacy) exam system

Copy link

codecov bot commented Oct 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.29%. Comparing base (a75987f) to head (30c8120).
Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #155      +/-   ##
==========================================
+ Coverage   94.16%   94.29%   +0.12%     
==========================================
  Files          68       68              
  Lines        1079     1086       +7     
  Branches      295      300       +5     
==========================================
+ Hits         1016     1024       +8     
+ Misses         58       57       -1     
  Partials        5        5              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@rijuma rijuma marked this pull request as ready for review October 9, 2024 16:56
Copy link
Contributor

@schenedx schenedx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

// It does not show the reload button if the exam is submitted and not legacy
const showRetryButton = !(
exam.attempt?.attempt_status === ExamStatus.SUBMITTED
&& !exam.attempt?.use_legacy_attempt_api
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this boolean value come from backend API?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. It's using setExamState() which uses fetchExamAttemptsData() to call an API.

Comment on lines +513 to 514
use_legacy_attempt_api: true,
attempt_status: ExamStatus.SUBMITTED,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NIT: we should remove LTI from this since LTI implies the new (not legacy) exam system

@rijuma rijuma merged commit 0b764d2 into main Oct 11, 2024
9 checks passed
@rijuma rijuma deleted the rijuma-remove-retry-on-lti-proctorio-tests branch October 11, 2024 12:58
@rijuma rijuma mentioned this pull request Oct 17, 2024
Copy link

🎉 This PR is included in version 3.2.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants