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

Fix creation of missing submissions #1584

Merged
merged 3 commits into from
Sep 11, 2022

Conversation

damianhxy
Copy link
Member

Description

  • Only run autocomplete code on create submissions page when CUD is nil.

Motivation and Context

As reported in INC1029200, an internal server error occurs when one attempts to fill in blank submissions for missing submissions.

This is because the autocomplete js code attempts to run even when CUD is set (so there's no need to autocomplete anything). However, the required data is not initialized in such a case, so we attempt to iterate over nil.

Fill in Empty Submissions feature
Screen Shot 2022-09-10 at 20 10 02

Server only initializes autocomplete data when CUD is not nil
Screen Shot 2022-09-10 at 20 08 08

To remedy this, don't run autocomplete js code unless there is a need to.

How Has This Been Tested?

  • On an assessment with missing submissions, attempt to fill in empty submissions

Before changes
Screen Shot 2022-09-10 at 20 12 49

After changes
Screen Shot 2022-09-10 at 20 12 39

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have run rubocop for style check. If you haven't, run overcommit --install && overcommit --sign to use pre-commit hook for linting
  • My change requires a change to the documentation, which is located at Autolab Docs
  • I have updated the documentation accordingly, included in this PR

Copy link
Contributor

@michellexliu michellexliu left a comment

Choose a reason for hiding this comment

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

lgtm!

@damianhxy damianhxy merged commit 7080f1c into master Sep 11, 2022
@damianhxy damianhxy deleted the fix-autocomplete-missing-submissions branch September 11, 2022 03:28
cg2v pushed a commit to cg2v/Autolab that referenced this pull request Oct 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants