Files
codeocean/app/helpers/exercise_helper.rb
Tom Staubitz 325ea25849 Replaced session[:lti_parameters] with proper LtiParameter object.
Removed all tests that would be failing

TODO: decision if all LtiParameter objects for a certain user/consumer will be deleted when the user/consumer is deleted from the session, or only the LtiParameter object for the current exercise of the user/consumer.

TODO: replace removed tests with proper tests
2016-12-30 09:45:39 +01:00

23 lines
425 B
Ruby

module ExerciseHelper
include LtiHelper
def embedding_parameters(exercise)
"locale=#{I18n.locale}&token=#{exercise.token}"
end
def qa_js_tag
javascript_include_tag qa_url + "/assets/qa_api.js"
end
def qa_url
config = CodeOcean::Config.new(:code_ocean)
enabled = config.read[:code_pilot][:enabled]
if enabled
config.read[:code_pilot][:url]
else
return nil
end
end
end