Apply manual rubocop fixes

This commit is contained in:
Sebastian Serth
2021-05-14 11:07:11 +02:00
parent 6cbecb5b39
commit da0a682ffb
109 changed files with 431 additions and 416 deletions

View File

@@ -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