Apply manual rubocop fixes
This commit is contained in:
@@ -60,11 +60,9 @@ module Lti
|
||||
if provider.roles.present?
|
||||
provider.roles.each do |role|
|
||||
case role.downcase
|
||||
when 'administrator'
|
||||
when 'administrator', 'instructor'
|
||||
# We don't want anyone to get admin privileges through LTI
|
||||
result = 'teacher' if result == 'learner'
|
||||
when 'instructor'
|
||||
result = 'teacher' if result == 'learner'
|
||||
else # 'learner'
|
||||
next
|
||||
end
|
||||
@@ -172,8 +170,7 @@ module Lti
|
||||
normalized_lit_score *= 0.0
|
||||
end
|
||||
response = provider.post_replace_result!(normalized_lit_score)
|
||||
{code: response.response_code, message: response.post_response.body, status: response.code_major,
|
||||
score_sent: normalized_lit_score}
|
||||
{code: response.response_code, message: response.post_response.body, status: response.code_major, score_sent: normalized_lit_score}
|
||||
else
|
||||
{status: 'unsupported'}
|
||||
end
|
||||
|
@@ -5,8 +5,7 @@ module RemoteEvaluationParameters
|
||||
|
||||
def remote_evaluation_params
|
||||
if params[:remote_evaluation].present?
|
||||
remote_evaluation_params = params[:remote_evaluation].permit(:validation_token,
|
||||
files_attributes: file_attributes)
|
||||
params[:remote_evaluation].permit(:validation_token, files_attributes: file_attributes)
|
||||
end
|
||||
end
|
||||
private :remote_evaluation_params
|
||||
|
@@ -81,7 +81,7 @@ module SubmissionScoring
|
||||
end
|
||||
end
|
||||
submission.update(score: score)
|
||||
if submission.normalized_score == 1.0
|
||||
if submission.normalized_score.to_d == 1.0.to_d
|
||||
Thread.new do
|
||||
RequestForComment.where(exercise_id: submission.exercise_id, user_id: submission.user_id,
|
||||
user_type: submission.user_type).each do |rfc|
|
||||
|
Reference in New Issue
Block a user