Skip to content

Submission editing endpoints use submission key#85

Open
amohamed97 wants to merge 1 commit intostagingfrom
be-78-editing-submissions-with-key
Open

Submission editing endpoints use submission key#85
amohamed97 wants to merge 1 commit intostagingfrom
be-78-editing-submissions-with-key

Conversation

@amohamed97
Copy link
Copy Markdown
Contributor

@amohamed97 amohamed97 commented Oct 21, 2020

Closes #78

Comment thread graderx/graders/manager.py
def get_submission_files(course, lab, submission_id, submission_key):
lab_path = get_lab_path(course, lab)
return list(lab_path.glob(f"submissions/{submission_id}/*.c"))
return list(lab_path.glob(f"submissions/{submission_key}/{submission_id}/*.c"))
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

same note for manually joining paths. Maybe you'd like to have a PathManager to group all the joins in one place

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

What I understood with PathManager is a single module that has all the needed paths but with descriptive names, did I get it right?

Copy link
Copy Markdown
Collaborator

@shakram02 shakram02 Oct 31, 2020

Choose a reason for hiding this comment

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

yes, or composes the paths so it'll have something like def list_submission_files(submission_key, submission_id)

I mean, it doesn't need to have just constant fields

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.

Submissions editing endpoints should use the submission key

3 participants