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

Instructor Assessment Access Overrides #9103

Open
wants to merge 170 commits into
base: master
Choose a base branch
from

Conversation

elisacarrillo
Copy link

Modifications from #7992
and fixed the tracking issues from #9050

Copy link
Contributor

github-actions bot commented Dec 22, 2023

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

@elisacarrillo
Copy link
Author

I have reviewed and hereby sign the CLA

@elisacarrillo
Copy link
Author

recheck

Copy link
Contributor

@nwalters512 nwalters512 left a comment

Choose a reason for hiding this comment

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

Here's another pass. A lot of these comments were originally left on #7992 but were never addressed.

@elisacarrillo
Copy link
Author

@elisacarrillo CI is failing again. Given the delay between you pushing and me approving CI runs, I'd strongly recommend running some basic CI checks locally to tighten up your feedback loop:

make lint-js
make build

Im having some issues with merge conflicts regarding selectAuthzAssessment. Will continue working on this today just wanted to give a heads up

@nwalters512
Copy link
Contributor

@elisacarrillo sounds good, let me know if you need help getting the conflicts resolved!

@elisacarrillo
Copy link
Author

elisacarrillo commented May 24, 2024

@elisacarrillo sounds good, let me know if you need help getting the conflicts resolved!

Hi, Thank you so much I am having issues with the selectAuthzAssessment feature code added in 0b3ca7a. Specifically import { features } from '../lib/features';
I am getting the error

error TS2834: Relative import paths need explicit file extensions in ECMAScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path.
@prairielearn/prairielearn:build:
@prairielearn/prairielearn:build: 8 import { features } from '../lib/features';

I was able to fix the merge issue but am unsure how to fix this linting issue. I have tried to add the /index.ts extension but it creates other issues when running. Would appreciate any advice! The most recent code is pushed. Thanks in advance!

@nwalters512
Copy link
Contributor

Try pattern matching against other code in this PR. For instance, take a look at the relative imports in apps/prairielearn/src/pages/instructorAssessmentAccessOverrides/instructorAssessmentAccessOverrides.js. Do they have extensions, and if so, what extensions do they use?

apps/prairielearn/src/lib/features/index.ts Outdated Show resolved Hide resolved
database/tables/saml_providers.pg Outdated Show resolved Hide resolved
database/tables/users.pg Outdated Show resolved Hide resolved
apps/prairielearn/src/sprocs/check_assessment_access.sql Outdated Show resolved Hide resolved
apps/prairielearn/src/sprocs/check_assessment_access.sql Outdated Show resolved Hide resolved
apps/prairielearn/src/sprocs/check_assessment_access.sql Outdated Show resolved Hide resolved
Copy link
Contributor

Choose a reason for hiding this comment

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

@mwest1066 I'm wondering if we should special-case authz_mode == 'Exam' here so that instructors can't shoot themselves in the foot when using PrairieTest? Specifically, I'm thinking that perhaps we should ignore anything in assessment_access_policies when authz_mode === 'Exam'.

Even then, I guess one could still shoot oneself in the foot with access overrides: if a student has a PT reservation, the current implementation short-circuits and doesn't do the usual "block in public mode with active PT reservation" stuff. This would be a horribly contrived situation, and in this situation the student could already access things from outside a CBTF if such an override were in place...

I'm not sure what the right thing to do here is, but we should have a think about how access overrides interact with PT and exam mode.

Copy link
Member

Choose a reason for hiding this comment

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

I agree that we don't want access overrides to be used for providing access to PT-controlled exams (of course PT already has overrides for that) and we want to help people avoid footguns here. Let's add this to our list of planning topics as a near-term item to think about more carefully?

Copy link
Member

Choose a reason for hiding this comment

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

Added a note in the planning issue.

Copy link

codecov bot commented May 28, 2024

Codecov Report

Attention: Patch coverage is 15.73604% with 498 lines in your changes are missing coverage. Please review.

Project coverage is 66.59%. Comparing base (bb6b032) to head (ee2d44c).
Report is 2 commits behind head on master.

Files Patch % Lines
...rrides/instructorAssessmentAccessOverrides.html.ts 8.80% 290 Missing ⚠️
...ssOverrides/instructorAssessmentAccessOverrides.ts 14.81% 207 Missing ⚠️
apps/prairielearn/src/server.js 88.88% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #9103      +/-   ##
==========================================
- Coverage   67.01%   66.59%   -0.43%     
==========================================
  Files         458      460       +2     
  Lines       71353    71944     +591     
  Branches     5719     5719              
==========================================
+ Hits        47820    47913      +93     
- Misses      23104    23601     +497     
- Partials      429      430       +1     

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

@nwalters512 nwalters512 self-assigned this May 31, 2024
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.

None yet

4 participants