Skip to content

Commit

Permalink
Remove unused views
Browse files Browse the repository at this point in the history
  • Loading branch information
jorg-vr committed Jun 20, 2022
1 parent 9a6f3b3 commit dde7f20
Show file tree
Hide file tree
Showing 7 changed files with 1 addition and 47 deletions.
5 changes: 1 addition & 4 deletions app/controllers/saved_annotations_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ def index
def show; end

def create
Rails.logger.info params
annotation = Annotation.find(params[:from])
authorize annotation, :show?
@saved_annotation = SavedAnnotation.new(permitted_attributes(SavedAnnotation).merge({ user: current_user, course: annotation.course, exercise: annotation.submission.exercise }))
Expand All @@ -23,10 +22,8 @@ def create
if @saved_annotation.save
annotation.update(saved_annotation: @saved_annotation)
format.json { render :show, status: :created, location: @saved_annotation }
format.js { render :show, status: :created }
else
format.json { render json: @saved_annotation.errors.full_messages, status: :unprocessable_entity }
format.js { render :new, status: :unprocessable_entity }
end
end
end
Expand All @@ -36,7 +33,7 @@ def update
if @saved_annotation.update(permitted_attributes(SavedAnnotation))
format.json { render :show, status: :ok, location: @saved_annotation }
else
format.json { render json: @saved_annotation.errors, status: :unprocessable_entity }
format.json { render json: @saved_annotation.errors.full_messages, status: :unprocessable_entity }
end
end
end
Expand Down
1 change: 0 additions & 1 deletion app/views/feedbacks/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@
</div>
</div>
<% if @feedback.submission.present? %>
<%= render 'saved_annotations/modal' %>
<div class="code-table" data-submission-id="<%= @feedback.submission.id %>">
<%= @feedback.submission.judge.renderer.new(@feedback.submission, current_user).parse %>
</div>
Expand Down
8 changes: 0 additions & 8 deletions app/views/saved_annotations/_errors.html.erb

This file was deleted.

12 changes: 0 additions & 12 deletions app/views/saved_annotations/_form.html.erb

This file was deleted.

17 changes: 0 additions & 17 deletions app/views/saved_annotations/_modal.html.erb

This file was deleted.

1 change: 0 additions & 1 deletion app/views/saved_annotations/new.js.erb

This file was deleted.

4 changes: 0 additions & 4 deletions app/views/saved_annotations/show.js.erb

This file was deleted.

0 comments on commit dde7f20

Please sign in to comment.