merged qa into codeocean

This commit is contained in:
Nicholas Wittstruck
2015-03-27 21:27:40 +01:00
parent de154a6f66
commit bad98cca1d
5 changed files with 194 additions and 92 deletions

View File

@ -2,4 +2,17 @@ module ExerciseHelper
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]
end
end
end