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

Fixed one time annotation Not Found error #7302

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
- Ensured submissions that have been released cannot be recollected from the repo browser (#7254)
- Fix bug where renaming a group to an existing group in a different assignment resulted in incorrect repository mapping (#7224)
- Disable editable fields in assignment criterion when criterion is released (#7264)
- Fixed Download One Time Annotation 'Not Found' error (#7302)

### 🔧 Internal changes

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
<div class='float-right'>
<%= link_to t('annotations.download_one_time_annotations'),
{action: 'uncategorized_annotations',
id: @assignment.id,
format: 'csv'},
class: 'button' %>
</div>
Expand Down
18 changes: 18 additions & 0 deletions spec/controllers/annotation_categories_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -624,6 +624,24 @@
expect(data.first['submission_id']).to eq(assignment.groupings.first.current_result.submission_id)
expect(data.first['id']).to eq(text2.id)
end

describe 'Download One Time Annotations' do
let(:course2) { create(:course) }
let(:assignment2) { create(:assignment, course: course2) }

it 'should respond with 200' do
get_as role, :uncategorized_annotations, params: { course_id: course.id, assignment_id: assignment.id },
format: 'csv'
expect(response).to have_http_status(:ok)
end

it 'should respond with 404' do
get_as role, :uncategorized_annotations,
params: { course_id: course2.id, assignment_id: assignment2.id, id: annotation_category.id },
format: 'csv'
expect(response).to have_http_status(:not_found)
end
end
end

describe '#destroy_annotation_text' do
Expand Down