diff --git a/app/controllers/request_for_comments_controller.rb b/app/controllers/request_for_comments_controller.rb index 58dee88e..face8e2e 100644 --- a/app/controllers/request_for_comments_controller.rb +++ b/app/controllers/request_for_comments_controller.rb @@ -18,7 +18,6 @@ class RequestForCommentsController < ApplicationController .with_last_activity .ransack(params[:q]) @request_for_comments = @search.result - .where("question NOT LIKE '%#loesung%'") .joins(:exercise) .where(exercises: {unpublished: false}) .includes(submission: [:study_group]) @@ -99,8 +98,6 @@ class RequestForCommentsController < ApplicationController @request_for_comment = RequestForComment.new(request_for_comment_params) - @request_for_comment.solved = true if @request_for_comment.question.include?('#loesung') - respond_to do |format| if @request_for_comment.save # create thread here and execute tests. A run is triggered from the frontend and does not need to be handled here. diff --git a/app/policies/request_for_comment_policy.rb b/app/policies/request_for_comment_policy.rb index 43d2e8de..a381ad91 100644 --- a/app/policies/request_for_comment_policy.rb +++ b/app/policies/request_for_comment_policy.rb @@ -8,7 +8,7 @@ class RequestForCommentPolicy < ApplicationPolicy end def show? - admin? || teacher_in_study_group? || author? || everyone && @record.question&.exclude?('#loesung') + everyone end def destroy?