Add support for running CodeOcean under a subpath
* Also refactor (JavaScript) routes
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
var CodeOceanEditor = {
|
||||
//ACE-Editor-Path
|
||||
// ruby part adds the relative_url_root, if it is set.
|
||||
ACE_FILES_PATH: '<%= (defined? Rails.application.config.relative_url_root) && Rails.application.config.relative_url_root != nil && Rails.application.config.relative_url_root != "" ? Rails.application.config.relative_url_root : "" %>' + '/assets/ace/',
|
||||
ACE_FILES_PATH: '<%= "#{Rails.application.config.relative_url_root.chomp('/')}/assets/ace/" %>',
|
||||
THEME: 'ace/theme/textmate',
|
||||
|
||||
//Color-Encoding for Percentages in Progress Bars (For submissions)
|
||||
|
@ -142,7 +142,7 @@ CodeOceanEditorRequestForComments = {
|
||||
var createRequestForComments = function (submission) {
|
||||
$.ajax({
|
||||
method: 'POST',
|
||||
url: '/request_for_comments',
|
||||
url: Routes.request_for_comments_path(),
|
||||
data: {
|
||||
request_for_comment: {
|
||||
exercise_id: exercise_id,
|
||||
|
Reference in New Issue
Block a user