merge master
This commit is contained in:
@ -53,5 +53,8 @@ module CodeOcean
|
||||
# Initialize the runner environment
|
||||
Runner.strategy_class.initialize_environment
|
||||
end
|
||||
|
||||
# Allow tables in addition to existing default tags
|
||||
config.action_view.sanitized_allowed_tags = ActionView::Base.sanitized_allowed_tags + %w[table thead tbody tfoot td tr]
|
||||
end
|
||||
end
|
||||
|
@ -40,10 +40,10 @@ default: &default
|
||||
enabled: false
|
||||
# The strategy to use. Possible values are: poseidon, docker_container_pool
|
||||
strategy: poseidon
|
||||
# The root URL of the runner management to use
|
||||
# The root URL of the runner management to use (include any API prefix if required)
|
||||
# If a hostname is specified and the target host is reachable via IPv6, the WebSocket
|
||||
# connection might not use the IPv6-to-IPv4 fallback but rather fail unexpectedly.
|
||||
url: https://runners.example.org
|
||||
url: https://runners.example.org/api/v1
|
||||
# The root certificate authority to trust for TLS connections to the runner management (Poseidon only)
|
||||
ca_file: /example/certificates/ca.crt
|
||||
# The authorization token for connections to the runner management (Poseidon only)
|
||||
|
@ -1,16 +1,12 @@
|
||||
#Why erb?
|
||||
default: &default
|
||||
connection_timeout: 3
|
||||
pool:
|
||||
active: false
|
||||
ports: !ruby/range 4500..4600
|
||||
|
||||
development:
|
||||
<<: *default
|
||||
# Specify the Docker host below, once for container management and once for output streaming.
|
||||
# Always use the TCP socket (instead of a unix socket) and an IPv4 address for best compatibility.
|
||||
host: tcp://127.0.0.1:2376
|
||||
ws_host: ws://127.0.0.1:2376 #url to connect rails server to docker host
|
||||
# Be sure to change the default ACL when modifying the workspace_root: `setfacl -Rdm user:<username>:rwx <workspace_root>`
|
||||
workspace_root: <%= Rails.root.join('tmp', 'files', Rails.env) %>
|
||||
connection_timeout: 3
|
||||
pool:
|
||||
active: true
|
||||
refill:
|
||||
@ -18,37 +14,18 @@ development:
|
||||
batch_size: 8
|
||||
interval: 15
|
||||
timeout: 60
|
||||
ports: !ruby/range 4500..4600
|
||||
|
||||
development:
|
||||
<<: *default
|
||||
|
||||
production:
|
||||
<<: *default
|
||||
host: unix:///var/run/docker.sock
|
||||
pool:
|
||||
active: true
|
||||
refill:
|
||||
async: false
|
||||
batch_size: 8
|
||||
interval: 15
|
||||
timeout: 60
|
||||
# Be sure to change the default ACL when modifying the workspace_root: `setfacl -Rdm user:<username>:rwx <workspace_root>`
|
||||
workspace_root: <%= Rails.root.join('tmp', 'files', Rails.env) %>
|
||||
ws_host: ws://localhost:4243 #url to connect rails server to docker host
|
||||
|
||||
staging:
|
||||
<<: *default
|
||||
host: unix:///var/run/docker.sock
|
||||
pool:
|
||||
active: true
|
||||
refill:
|
||||
async: false
|
||||
batch_size: 8
|
||||
interval: 15
|
||||
timeout: 60
|
||||
# Be sure to change the default ACL when modifying the workspace_root: `setfacl -Rdm user:<username>:rwx <workspace_root>`
|
||||
workspace_root: <%= Rails.root.join('tmp', 'files', Rails.env) %>
|
||||
ws_host: ws://localhost:4243 #url to connect rails server to docker host
|
||||
|
||||
test:
|
||||
<<: *default
|
||||
host: tcp://127.0.0.1:2376
|
||||
# Be sure to change the default ACL when modifying the workspace_root: `setfacl -Rdm user:<username>:rwx <workspace_root>`
|
||||
workspace_root: <%= Rails.root.join('tmp', 'files', Rails.env) %>
|
||||
pool:
|
||||
active: false
|
||||
|
@ -38,6 +38,10 @@ Rails.application.configure do
|
||||
config.active_storage.service = :local
|
||||
|
||||
# Don't care if the mailer can't send.
|
||||
config.action_mailer.perform_deliveries = true
|
||||
|
||||
# Perform deliveries via letter opener
|
||||
config.action_mailer.delivery_method = :letter_opener
|
||||
config.action_mailer.raise_delivery_errors = false
|
||||
|
||||
config.action_mailer.perform_caching = false
|
||||
@ -76,7 +80,7 @@ Rails.application.configure do
|
||||
# Raises helpful error messages.
|
||||
config.assets.raise_runtime_errors = true
|
||||
|
||||
BetterErrors::Middleware.allow_ip! ENV['TRUSTED_IP'] if ENV['TRUSTED_IP']
|
||||
BetterErrors::Middleware.allow_ip! ENV.fetch('TRUSTED_IP', nil) if ENV['TRUSTED_IP']
|
||||
|
||||
# Use an evented file watcher to asynchronously detect changes in source code,
|
||||
# routes, locales, etc. This feature depends on the listen gem.
|
||||
|
@ -49,7 +49,7 @@ Rails.application.configure do
|
||||
# config.action_cable.allowed_request_origins = [ 'http://example.com', /http:\/\/example.*/ ]
|
||||
|
||||
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
|
||||
# config.force_ssl = true
|
||||
config.force_ssl = true
|
||||
|
||||
# Include generic and useful information about system operation, but avoid logging too much
|
||||
# information to avoid inadvertent exposure of personally identifiable information (PII).
|
||||
|
@ -60,7 +60,7 @@ Rails.application.configure do
|
||||
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
|
||||
|
||||
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
|
||||
# config.force_ssl = true
|
||||
config.force_ssl = true
|
||||
|
||||
# Set to :debug to see everything in the log.
|
||||
config.log_level = :info
|
||||
|
8
config/i18n.yml
Normal file
8
config/i18n.yml
Normal file
@ -0,0 +1,8 @@
|
||||
---
|
||||
translations:
|
||||
- file: tmp/locales.json
|
||||
patterns:
|
||||
- "*"
|
||||
- "!*.activerecord"
|
||||
- "!*.errors"
|
||||
- "!*.number.nth"
|
@ -20,3 +20,6 @@ Rails.application.config.assets.precompile += %w[markdown-buttons.png]
|
||||
Rails.application.config.assets.configure do |env|
|
||||
env.export_concurrent = false
|
||||
end
|
||||
|
||||
# Add node_modules folder to the asset load path.
|
||||
Rails.application.config.assets.paths << Rails.root.join('node_modules')
|
||||
|
@ -7,6 +7,9 @@
|
||||
# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy
|
||||
|
||||
# Rails.application.config.content_security_policy do |policy|
|
||||
# # If you are using webpack-dev-server then specify webpack-dev-server host
|
||||
# policy.connect_src :self, :https, "http://localhost:3035", "ws://localhost:3035" if Rails.env.development?
|
||||
|
||||
# policy.default_src :self, :https
|
||||
# policy.font_src :self, :https, :data
|
||||
# policy.img_src :self, :https, :data
|
||||
|
7
config/initializers/i18n.rb
Normal file
7
config/initializers/i18n.rb
Normal file
@ -0,0 +1,7 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
Rails.application.config.after_initialize do
|
||||
require 'i18n-js/listen'
|
||||
# This will only run in development.
|
||||
I18nJS.listen
|
||||
end
|
@ -1,5 +0,0 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require 'docker_container_mixin'
|
||||
|
||||
Docker::Container.include DockerContainerMixin
|
@ -30,7 +30,7 @@ Sentry.init do |config|
|
||||
when '/', '/ping'
|
||||
0.00 # ignore health check
|
||||
else
|
||||
0.05
|
||||
0.01
|
||||
end
|
||||
else
|
||||
0.0 # ignore all other transactions
|
||||
|
@ -6,7 +6,7 @@ class SentryJavascript
|
||||
end
|
||||
|
||||
def self.dsn
|
||||
ENV['SENTRY_JAVASCRIPT_DSN']
|
||||
ENV.fetch('SENTRY_JAVASCRIPT_DSN', nil)
|
||||
end
|
||||
|
||||
def self.release
|
||||
|
@ -5,4 +5,5 @@
|
||||
Rails.application.config.session_store :cookie_store,
|
||||
key: '_code_ocean_session',
|
||||
expire_after: 1.month,
|
||||
secure: Rails.env.production? || Rails.env.staging?,
|
||||
path: Rails.application.config.relative_url_root
|
||||
|
@ -328,8 +328,8 @@ de:
|
||||
editor:
|
||||
collapse_action_sidebar: Aktions-Leiste Einklappen
|
||||
collapse_output_sidebar: Ausgabe-Leiste Einklappen
|
||||
confirm_start_over: Wollen Sie wirklich von vorne anfangen? Ihr kompletter Fortschritt in dieser Aufgabe wird entfernt; andere Aufgaben bleiben unverändert. Diese Aktion kann nicht rückgängig gemacht werden.
|
||||
confirm_start_over_active_file: Wollen Sie wirklich den Inhalt der ausgewählten Datei '%{filename}' zurücksetzen? Diese Aktion kann nicht rückgängig gemacht werden.
|
||||
confirm_start_over: Wollen Sie in dieser Aufgabe wirklich von vorne anfangen? Ihre bisherigen Änderungen in dieser Aufgabe werden entfernt; andere Aufgaben bleiben unverändert. Diese Aktion kann nicht rückgängig gemacht werden.
|
||||
confirm_start_over_active_file: Wollen Sie wirklich Ihre Änderungen in der ausgewählten Datei '%{filename}' zurücksetzen? Diese Aktion kann nicht rückgängig gemacht werden.
|
||||
confirm_submit: Wollen Sie Ihren Code wirklich zur Bewertung abgeben?
|
||||
create_file: Neue Datei
|
||||
depleted: Alle Ausführungsumgebungen sind momentan in Benutzung. Probiere es später nochmal.
|
||||
@ -360,6 +360,7 @@ de:
|
||||
submit_after_late_deadline: Code verspätet zur Bewertung abgeben
|
||||
test: Testen
|
||||
timeout: 'Ausführung gestoppt. Ihr Code hat die erlaubte Ausführungszeit von %{permitted_execution_time} Sekunden überschritten.'
|
||||
out_of_memory: 'Ausführung gestoppt. Ihr Code hat den erlaubten Arbeitsspeicher von %{memory_limit} MB überschritten.'
|
||||
exercise_deadline_passed: 'Das Ergebnis kann nicht übertragen werden.'
|
||||
tooltips:
|
||||
save: Ihr Code wird automatisch gespeichert, wann immer Sie eine Datei herunterladen, ausführen oder testen. Explizites Speichern ist also selten notwendig.
|
||||
@ -450,14 +451,16 @@ de:
|
||||
removeAllOnLine: Meine Kommentare auf dieser Zeile löschen
|
||||
listing: Die neuesten Kommentaranfragen
|
||||
request: "Kommentaranfrage stellen"
|
||||
question: "Bitte beschreiben Sie kurz Ihre Probleme oder nennen Sie den Programmteil, zu dem Sie Feedback wünschen. </br> </br> Ihr Programmcode und eventuelle Fehlermeldungen werden automatisch zur Anfrage hinzugefügt."
|
||||
question: "Bitte beschreiben Sie kurz Ihre Probleme oder nennen Sie den Programmteil, zu dem Sie Feedback wünschen. Ihr Programmcode und eventuelle Fehlermeldungen werden automatisch zur Anfrage hinzugefügt."
|
||||
intervention:
|
||||
explanation: "Diese Meldung erscheint, weil Sie %{duration} Minuten an dieser Aufgabe gearbeitet haben. 25% Ihrer Mitlernenden arbeiten länger daran, insofern ist das kein Problem, aber dies hat sich als <a href='https://hpi.de/forschung/publikationen/dissertationen/dissertation-ralf-teusner.html' style='display: contents;'>effektiven Zeitpunkt für diese Meldung</a> erwiesen."
|
||||
rfc_intervention:
|
||||
text: "Es scheint so als würden Sie Probleme mit der Aufgabe haben. </br> Wenn Sie möchten, können wir Ihnen helfen! </br> </br>"
|
||||
text: "Falls Sie bei dieser Aufgabe nicht weiterkommen und nicht selbst weiter knobeln möchten, können Ihre Mitlernenden bestimmt helfen! </br> </br>"
|
||||
break_intervention:
|
||||
title: "Pause"
|
||||
text: "Uns ist aufgefallen, dass du schon lange an dieser Aufgabe arbeitest. Möchtest du vielleicht später weiter machen um erstmal auf neue Gedanken zu kommen?"
|
||||
text: "Falls Sie bei dieser Aufgabe momentan nicht weiterkommen, können Sie jederzeit eine Pause einlegen und später weiter knobeln. Ihr Fortschritt wird in CodeOcean automatisch gespeichert."
|
||||
tips_intervention:
|
||||
text: "Es scheint so als würden Sie Probleme mit der Aufgabe haben. </br> </br> Sind Ihnen die Tipps in der linken Seitenleiste aufgefallen? Sie könnten einige Ihrer Fragen beantworten und werden auch direkt hier angezeigt."
|
||||
text: "Falls Sie bei dieser Aufgabe momentan nicht weiterkommen, können Sie die verfügbaren Tipps vielleicht unterstützen. Diese finden Sie jederzeit in der linken Seitenleiste und werden auch direkt hier angezeigt."
|
||||
error_hints:
|
||||
heading: "Hinweise"
|
||||
tips:
|
||||
@ -474,6 +477,7 @@ de:
|
||||
feedback: Feedback
|
||||
requests_for_comments: Kommentaranfragen
|
||||
study_group_dashboard: Live Dashboard
|
||||
external_user_statistics: Statistik für externe Nutzer
|
||||
show:
|
||||
is_unpublished: Aufgabe ist deaktiviert
|
||||
statistics:
|
||||
@ -518,6 +522,10 @@ de:
|
||||
after_late_deadline: Verspätete Abgabe
|
||||
addendum: '* Differenzen von mehr als %{delta} Minuten werden ignoriert.'
|
||||
filter: "Hinweis: Nur die letzte Abgabe vor einer Abgabefrist ist sichtbar."
|
||||
toggle_autosave_on: Zwischenspeicherungen anzeigen
|
||||
toggle_autosave_off: Zwischenspeicherungen ausblenden
|
||||
toggle_status_on: Zwischenspeicherungen sind eingeblendet
|
||||
toggle_status_off: Zwischenspeicherungen sind ausgeblendet
|
||||
proxy_exercises:
|
||||
index:
|
||||
clone: Duplizieren
|
||||
@ -593,8 +601,6 @@ de:
|
||||
<br>
|
||||
Sie finden ihre Kommentaranfrage hier: %{link_to_comment} <br>
|
||||
<br>
|
||||
Falls Sie beim Klick auf diesen Link eine Fehlermeldung erhalten, dass Sie nicht berechtigt wären diese Aktion auszuführen, öffnen Sie bitte eine beliebige Programmieraufgabe aus einem Kurs heraus und klicken den Link danach noch einmal.<br>
|
||||
<br>
|
||||
Eine Übersicht Ihrer Kommentaranfragen gibt es hier: %{link_my_comments} <br>
|
||||
Alle Kommentaranfragen aller Benutzer finden Sie hier: %{link_all_comments} <br>
|
||||
<br>
|
||||
@ -610,8 +616,6 @@ de:
|
||||
<br>
|
||||
You can find your request for comments here: %{link_to_comment} <br>
|
||||
<br>
|
||||
If you receive an error that you are not authorized to perform this action when clicking the link, please log-in through any course exercise beforehand and click the link again. <br>
|
||||
<br>
|
||||
An overview of all your comments can be accessed here: %{link_my_comments} <br>
|
||||
All comments of all participants are available here: %{link_all_comments} <br>
|
||||
<br>
|
||||
@ -633,8 +637,6 @@ de:
|
||||
<br>
|
||||
Sie finden die Kommentaranfrage hier: %{link_to_comment} <br>
|
||||
<br>
|
||||
Falls Sie beim Klick auf diesen Link eine Fehlermeldung erhalten, dass Sie nicht berechtigt wären diese Aktion auszuführen, öffnen Sie bitte eine beliebige Programmieraufgabe aus einem Kurs heraus und klicken den Link danach noch einmal.<br>
|
||||
<br>
|
||||
Danke, dass Sie anderen Nutzern von CodeOcean helfen!
|
||||
<br>
|
||||
Diese Mail wurde automatisch von CodeOcean verschickt.<br>
|
||||
@ -649,8 +651,6 @@ de:
|
||||
<br>
|
||||
You can find the request for comments here: %{link_to_comment} <br>
|
||||
<br>
|
||||
If you receive an error that you are not authorized to perform this action when clicking the link, please log-in through any course exercise beforehand and click the link again. <br>
|
||||
<br>
|
||||
Thank you for helping other users on CodeOcean!
|
||||
<br>
|
||||
This mail was automatically sent by CodeOcean. <br>
|
||||
@ -668,8 +668,6 @@ de:
|
||||
<br>
|
||||
Sie finden die Kommentaranfrage hier: %{link_to_comment} <br>
|
||||
<br>
|
||||
Falls Sie beim Klick auf diesen Link eine Fehlermeldung erhalten, dass Sie nicht berechtigt wären diese Aktion auszuführen, öffnen Sie bitte eine beliebige Programmieraufgabe aus einem Kurs heraus und klicken den Link danach noch einmal.<br>
|
||||
<br>
|
||||
Wenn Sie keine weiteren Benachrichtigungen zu dieser Anfrage erhalten möchten, klicken Sie bitte hier: %{unsubscribe_link}
|
||||
<br>
|
||||
Diese Mail wurde automatisch von CodeOcean verschickt.<br>
|
||||
@ -684,8 +682,6 @@ de:
|
||||
<br>
|
||||
You can find the request for comments here: %{link_to_comment} <br>
|
||||
<br>
|
||||
If you receive an error that you are not authorized to perform this action when clicking the link, please log-in through any course exercise beforehand and click the link again. <br>
|
||||
<br>
|
||||
If you don't want to be notified about further comments, please click here: %{unsubscribe_link}
|
||||
<br>
|
||||
This mail was automatically sent by CodeOcean. <br>
|
||||
|
@ -328,8 +328,8 @@ en:
|
||||
editor:
|
||||
collapse_action_sidebar: Collapse Action Sidebar
|
||||
collapse_output_sidebar: Collapse Output Sidebar
|
||||
confirm_start_over: Do you really want to start over? Your complete progress in this exercise will be reset; other exercises remain untouched. You cannot undo this action.
|
||||
confirm_start_over_active_file: Do you really want to reset the active file '%{filename}'? You cannot undo this action.
|
||||
confirm_start_over: Do you really want to start over? Your previous changes in this exercise will be reset; other exercises remain untouched. You cannot undo this action.
|
||||
confirm_start_over_active_file: Do you really want to remove any changes in the active file '%{filename}'? You cannot undo this action.
|
||||
confirm_submit: Do you really want to submit your code for grading?
|
||||
create_file: New File
|
||||
depleted: All execution environments are busy. Please try again later.
|
||||
@ -360,6 +360,7 @@ en:
|
||||
submit_after_late_deadline: Submit Code for Assessment After Deadline Passed
|
||||
test: Test
|
||||
timeout: 'Execution stopped. Your code exceeded the permitted execution time of %{permitted_execution_time} seconds.'
|
||||
out_of_memory: 'Execution stopped. Your code exceeded the permitted RAM usage of %{memory_limit} MB.'
|
||||
exercise_deadline_passed: 'The score cannot be submitted.'
|
||||
tooltips:
|
||||
save: Your code is automatically saved whenever you download, run, or test it. Therefore, explicitly saving is rarely necessary.
|
||||
@ -450,14 +451,16 @@ en:
|
||||
removeAllOnLine: Remove my comments on this line
|
||||
listing: Listing the newest comment requests
|
||||
request: "Request Comments"
|
||||
question: 'Please shortly describe your problem or the program part you would like to get feedback for. </br> </br> Your program code and potential error messages are automatically appended to your request.'
|
||||
question: 'Please shortly describe your problem or the program part you would like to get feedback for. Your program code and potential error messages are automatically appended to your request.'
|
||||
intervention:
|
||||
explanation: "This message appears because you have been working on this exercise for %{duration} minutes. 25% of your fellow learners took more time to solve the exercise, so in that sense it's not a problem, but this has proven to be an <a href='https://hpi.de/en/research/publications/dissertations/dissertation-ralf-teusner.html' style='display: contents;'>effective time for this message</a>."
|
||||
rfc_intervention:
|
||||
text: "It looks like you may struggle with this exercise. </br> If you like we can help you out! </br> </br>"
|
||||
text: "If you are struggling with this exercise and don't want to continue on your own, your fellow learners can help out! </br> </br>"
|
||||
break_intervention:
|
||||
title: "Break"
|
||||
text: "We recognized that you are already working quite a while on this exercise. We would like to encourage you to take a break and come back later."
|
||||
text: "If you are struggling with this exercise, you may take a break at any time and continue later. Your progress in CodeOcean is automatically saved."
|
||||
tips_intervention:
|
||||
text: "It looks like you may struggle with this exercise. </br> </br> Did you notice the tips in the left sidebar? They might answer some of your questions and are also displayed below for your convenience."
|
||||
text: "If you are struggling with this exercise, the available tips may help. You can find them at any time in the left sidebar and are also displayed below for your convenience."
|
||||
error_hints:
|
||||
heading: "Hints"
|
||||
tips:
|
||||
@ -474,6 +477,7 @@ en:
|
||||
feedback: Feedback
|
||||
requests_for_comments: Requests for Comments
|
||||
study_group_dashboard: Live Dashboard
|
||||
external_user_statistics: External User Statistics
|
||||
show:
|
||||
is_unpublished: Exercise is unpublished
|
||||
statistics:
|
||||
@ -518,6 +522,10 @@ en:
|
||||
after_late_deadline: Too Late
|
||||
addendum: "* Deltas longer than %{delta} minutes are ignored."
|
||||
filter: "Remember: Only the last submission per deadline is shown."
|
||||
toggle_autosave_on: Show Autosaves
|
||||
toggle_autosave_off: Hide Autosaves
|
||||
toggle_status_on: Autosaves are currently visible
|
||||
toggle_status_off: Autosaves are currently hidden
|
||||
proxy_exercises:
|
||||
index:
|
||||
clone: Duplicate
|
||||
@ -593,8 +601,6 @@ en:
|
||||
<br>
|
||||
Sie finden ihre Kommentaranfrage hier: %{link_to_comment} <br>
|
||||
<br>
|
||||
Falls Sie beim Klick auf diesen Link eine Fehlermeldung erhalten, dass Sie nicht berechtigt wären diese Aktion auszuführen, öffnen Sie bitte eine beliebige Programmieraufgabe aus einem Kurs heraus und klicken den Link danach noch einmal.<br>
|
||||
<br>
|
||||
Eine Übersicht Ihrer Kommentaranfragen gibt es hier: %{link_my_comments} <br>
|
||||
Alle Kommentaranfragen aller Benutzer finden Sie hier: %{link_all_comments} <br>
|
||||
<br>
|
||||
@ -610,8 +616,6 @@ en:
|
||||
<br>
|
||||
You can find your request for comments here: %{link_to_comment} <br>
|
||||
<br>
|
||||
If you receive an error that you are not authorized to perform this action when clicking the link, please log-in through any course exercise beforehand and click the link again. <br>
|
||||
<br>
|
||||
An overview of all your comments can be accessed here: %{link_my_comments} <br>
|
||||
All comments of all participants are available here: %{link_all_comments} <br>
|
||||
<br>
|
||||
@ -633,8 +637,6 @@ en:
|
||||
<br>
|
||||
Sie finden die Kommentaranfrage hier: %{link_to_comment} <br>
|
||||
<br>
|
||||
Falls Sie beim Klick auf diesen Link eine Fehlermeldung erhalten, dass Sie nicht berechtigt wären diese Aktion auszuführen, öffnen Sie bitte eine beliebige Programmieraufgabe aus einem Kurs heraus und klicken den Link danach noch einmal.<br>
|
||||
<br>
|
||||
Danke, dass Sie anderen Nutzern von CodeOcean helfen!
|
||||
<br>
|
||||
Diese Mail wurde automatisch von CodeOcean verschickt.<br>
|
||||
@ -649,8 +651,6 @@ en:
|
||||
<br>
|
||||
You can find the request for comments here: %{link_to_comment} <br>
|
||||
<br>
|
||||
If you receive an error that you are not authorized to perform this action when clicking the link, please log-in through any course exercise beforehand and click the link again. <br>
|
||||
<br>
|
||||
Thank you for helping other users on CodeOcean!
|
||||
<br>
|
||||
This mail was automatically sent by CodeOcean. <br>
|
||||
@ -668,8 +668,6 @@ en:
|
||||
<br>
|
||||
Sie finden die Kommentaranfrage hier: %{link_to_comment} <br>
|
||||
<br>
|
||||
Falls Sie beim Klick auf diesen Link eine Fehlermeldung erhalten, dass Sie nicht berechtigt wären diese Aktion auszuführen, öffnen Sie bitte eine beliebige Programmieraufgabe aus einem Kurs heraus und klicken den Link danach noch einmal.<br>
|
||||
<br>
|
||||
Wenn Sie keine weiteren Benachrichtigungen zu dieser Anfrage erhalten möchten, klicken Sie bitte hier: %{unsubscribe_link}
|
||||
<br>
|
||||
Diese Mail wurde automatisch von CodeOcean verschickt.<br>
|
||||
@ -684,8 +682,6 @@ en:
|
||||
<br>
|
||||
You can find the request for comments here: %{link_to_comment} <br>
|
||||
<br>
|
||||
If you receive an error that you are not authorized to perform this action when clicking the link, please log-in through any course exercise beforehand and click the link again. <br>
|
||||
<br>
|
||||
If you don't want to be notified about further comments, please click here: %{unsubscribe_link}
|
||||
<br>
|
||||
This mail was automatically sent by CodeOcean. <br>
|
||||
|
@ -1,220 +0,0 @@
|
||||
#
|
||||
# This file configures the New Relic Agent. New Relic monitors Ruby, Java,
|
||||
# .NET, PHP, Python and Node applications with deep visibility and low
|
||||
# overhead. For more information, visit www.newrelic.com.
|
||||
|
||||
|
||||
# Here are the settings that are common to all environments
|
||||
common: &default_settings
|
||||
# ============================== LICENSE KEY ===============================
|
||||
|
||||
# You must specify the license key associated with your New Relic
|
||||
# account. This key binds your Agent's data to your account in the
|
||||
# New Relic service.
|
||||
license_key: 'CHANGE_ME'
|
||||
|
||||
# Agent Enabled (Ruby/Rails Only)
|
||||
# Use this setting to force the agent to run or not run.
|
||||
# Default is 'auto' which means the agent will install and run only
|
||||
# if a valid dispatcher such as Mongrel is running. This prevents
|
||||
# it from running with Rake or the console. Set to false to
|
||||
# completely turn the agent off regardless of the other settings.
|
||||
# Valid values are true, false and auto.
|
||||
#
|
||||
# agent_enabled: auto
|
||||
|
||||
# Application Name Set this to be the name of your application as
|
||||
# you'd like it show up in New Relic. The service will then auto-map
|
||||
# instances of your application into an "application" on your
|
||||
# dashboard page. If you want to map this instance into multiple
|
||||
# apps, like "AJAX Requests" and "All UI" then specify a semicolon
|
||||
# separated list of up to three distinct names, or a yaml list.
|
||||
# Defaults to the capitalized RAILS_ENV or RACK_ENV (i.e.,
|
||||
# Production, Staging, etc)
|
||||
#
|
||||
# Example:
|
||||
#
|
||||
# app_name:
|
||||
# - Ajax Service
|
||||
# - All Services
|
||||
#
|
||||
# Caution: If you change this name, a new application will appear in the New
|
||||
# Relic user interface with the new name, and data will stop reporting to the
|
||||
# app with the old name.
|
||||
#
|
||||
# See https://newrelic.com/docs/site/renaming-applications for more details
|
||||
# on renaming your New Relic applications.
|
||||
#
|
||||
app_name: Code Ocean
|
||||
|
||||
# When "true", the agent collects performance data about your
|
||||
# application and reports this data to the New Relic service at
|
||||
# newrelic.com. This global switch is normally overridden for each
|
||||
# environment below. (formerly called 'enabled')
|
||||
monitor_mode: true
|
||||
|
||||
# Developer mode should be off in every environment but
|
||||
# development as it has very high overhead in memory.
|
||||
developer_mode: false
|
||||
|
||||
# The newrelic agent generates its own log file to keep its logging
|
||||
# information separate from that of your application. Specify its
|
||||
# log level here.
|
||||
log_level: info
|
||||
|
||||
# Optionally set the path to the log file This is expanded from the
|
||||
# root directory (may be relative or absolute, e.g. 'log/' or
|
||||
# '/var/log/') The agent will attempt to create this directory if it
|
||||
# does not exist.
|
||||
# log_file_path: 'log'
|
||||
|
||||
# Optionally set the name of the log file, defaults to 'newrelic_agent.log'
|
||||
# log_file_name: 'newrelic_agent.log'
|
||||
|
||||
# The newrelic agent communicates with the service via https by default. This
|
||||
# prevents eavesdropping on the performance metrics transmitted by the agent.
|
||||
# The encryption required by SSL introduces a nominal amount of CPU overhead,
|
||||
# which is performed asynchronously in a background thread. If you'd prefer
|
||||
# to send your metrics over http uncomment the following line.
|
||||
# ssl: false
|
||||
|
||||
#============================== Browser Monitoring ===============================
|
||||
# New Relic Real User Monitoring gives you insight into the performance real users are
|
||||
# experiencing with your website. This is accomplished by measuring the time it takes for
|
||||
# your users' browsers to download and render your web pages by injecting a small amount
|
||||
# of JavaScript code into the header and footer of each page.
|
||||
browser_monitoring:
|
||||
# By default the agent automatically injects the monitoring JavaScript
|
||||
# into web pages. Set this attribute to false to turn off this behavior.
|
||||
auto_instrument: true
|
||||
|
||||
# Proxy settings for connecting to the New Relic server.
|
||||
#
|
||||
# If a proxy is used, the host setting is required. Other settings
|
||||
# are optional. Default port is 8080.
|
||||
#
|
||||
# proxy_host: hostname
|
||||
# proxy_port: 8080
|
||||
# proxy_user:
|
||||
# proxy_pass:
|
||||
|
||||
# The agent can optionally log all data it sends to New Relic servers to a
|
||||
# separate log file for human inspection and auditing purposes. To enable this
|
||||
# feature, change 'enabled' below to true.
|
||||
# See: https://newrelic.com/docs/ruby/audit-log
|
||||
audit_log:
|
||||
enabled: false
|
||||
|
||||
# Tells transaction tracer and error collector (when enabled)
|
||||
# whether or not to capture HTTP params. When true, frameworks can
|
||||
# exclude HTTP parameters from being captured.
|
||||
# Rails: the RoR filter_parameter_logging excludes parameters
|
||||
# Java: create a config setting called "ignored_params" and set it to
|
||||
# a comma separated list of HTTP parameter names.
|
||||
# ex: ignored_params: credit_card, ssn, password
|
||||
capture_params: false
|
||||
|
||||
# Transaction tracer captures deep information about slow
|
||||
# transactions and sends this to the New Relic service once a
|
||||
# minute. Included in the transaction is the exact call sequence of
|
||||
# the transactions including any SQL statements issued.
|
||||
transaction_tracer:
|
||||
|
||||
# Transaction tracer is enabled by default. Set this to false to
|
||||
# turn it off. This feature is only available at the Professional
|
||||
# and above product levels.
|
||||
enabled: true
|
||||
|
||||
# Threshold in seconds for when to collect a transaction
|
||||
# trace. When the response time of a controller action exceeds
|
||||
# this threshold, a transaction trace will be recorded and sent to
|
||||
# New Relic. Valid values are any float value, or (default) "apdex_f",
|
||||
# which will use the threshold for an dissatisfying Apdex
|
||||
# controller action - four times the Apdex T value.
|
||||
transaction_threshold: apdex_f
|
||||
|
||||
# When transaction tracer is on, SQL statements can optionally be
|
||||
# recorded. The recorder has three modes, "off" which sends no
|
||||
# SQL, "raw" which sends the SQL statement in its original form,
|
||||
# and "obfuscated", which strips out numeric and string literals.
|
||||
record_sql: obfuscated
|
||||
|
||||
# Threshold in seconds for when to collect stack trace for a SQL
|
||||
# call. In other words, when SQL statements exceed this threshold,
|
||||
# then capture and send to New Relic the current stack trace. This is
|
||||
# helpful for pinpointing where long SQL calls originate from.
|
||||
stack_trace_threshold: 0.500
|
||||
|
||||
# Determines whether the agent will capture query plans for slow
|
||||
# SQL queries. Only supported in mysql and postgres. Should be
|
||||
# set to false when using other adapters.
|
||||
# explain_enabled: true
|
||||
|
||||
# Threshold for query execution time below which query plans will
|
||||
# not be captured. Relevant only when `explain_enabled` is true.
|
||||
# explain_threshold: 0.5
|
||||
|
||||
# Error collector captures information about uncaught exceptions and
|
||||
# sends them to New Relic for viewing
|
||||
error_collector:
|
||||
|
||||
# Error collector is enabled by default. Set this to false to turn
|
||||
# it off. This feature is only available at the Professional and above
|
||||
# product levels.
|
||||
enabled: true
|
||||
|
||||
# To stop specific errors from reporting to New Relic, set this property
|
||||
# to comma-separated values. Default is to ignore routing errors,
|
||||
# which are how 404's get triggered.
|
||||
ignore_errors: "ActionController::RoutingError,Sinatra::NotFound"
|
||||
|
||||
# If you're interested in capturing memcache keys as though they
|
||||
# were SQL uncomment this flag. Note that this does increase
|
||||
# overhead slightly on every memcached call, and can have security
|
||||
# implications if your memcached keys are sensitive
|
||||
# capture_memcache_keys: true
|
||||
|
||||
# Application Environments
|
||||
# ------------------------------------------
|
||||
# Environment-specific settings are in this section.
|
||||
# For Rails applications, RAILS_ENV is used to determine the environment.
|
||||
# For Java applications, pass -Dnewrelic.environment <environment> to set
|
||||
# the environment.
|
||||
|
||||
# NOTE if your application has other named environments, you should
|
||||
# provide newrelic configuration settings for these environments here.
|
||||
|
||||
development:
|
||||
<<: *default_settings
|
||||
# Turn on communication to New Relic service in development mode
|
||||
monitor_mode: true
|
||||
app_name: Code Ocean (Development)
|
||||
|
||||
# Rails Only - when running in Developer Mode, the New Relic Agent will
|
||||
# present performance information on the last 100 transactions you have
|
||||
# executed since starting the mongrel.
|
||||
# NOTE: There is substantial overhead when running in developer mode.
|
||||
# Do not use for production or load testing.
|
||||
developer_mode: true
|
||||
|
||||
test:
|
||||
<<: *default_settings
|
||||
# It almost never makes sense to turn on the agent when running
|
||||
# unit, functional or integration tests or the like.
|
||||
monitor_mode: false
|
||||
|
||||
# Turn on the agent in production for 24x7 monitoring. NewRelic
|
||||
# testing shows an average performance impact of < 5 ms per
|
||||
# transaction, you can leave this on all the time without
|
||||
# incurring any user-visible performance degradation.
|
||||
production:
|
||||
<<: *default_settings
|
||||
monitor_mode: true
|
||||
|
||||
# Many applications have a staging environment which behaves
|
||||
# identically to production. Support for that environment is provided
|
||||
# here. By default, the staging environment has the agent turned on.
|
||||
staging:
|
||||
<<: *default_settings
|
||||
monitor_mode: true
|
||||
app_name: Code Ocean (Staging)
|
@ -21,6 +21,7 @@ Rails.application.routes.draw do
|
||||
member do
|
||||
get :mark_as_solved, defaults: {format: :json}
|
||||
post :set_thank_you_note, defaults: {format: :json}
|
||||
post :clear_question
|
||||
end
|
||||
end
|
||||
resources :comments, defaults: {format: :json}
|
||||
@ -116,7 +117,9 @@ Rails.application.routes.draw do
|
||||
resources :user_exercise_feedbacks, except: %i[show index]
|
||||
|
||||
resources :external_users, only: %i[index show], concerns: :statistics do
|
||||
resources :exercises, concerns: :statistics
|
||||
resources :exercises do
|
||||
get :statistics, to: 'exercises#external_user_statistics', on: :member
|
||||
end
|
||||
member do
|
||||
get :tag_statistics
|
||||
end
|
||||
|
@ -3,7 +3,7 @@
|
||||
# Use this file to easily define all of your cron jobs.
|
||||
#
|
||||
# It's helpful, but not entirely necessary to understand cron before proceeding.
|
||||
# http://en.wikipedia.org/wiki/Cron
|
||||
# https://en.wikipedia.org/wiki/Cron
|
||||
|
||||
# Example:
|
||||
#
|
||||
@ -19,10 +19,10 @@
|
||||
# runner "AnotherModel.prune_old_records"
|
||||
# end
|
||||
|
||||
# Learn more: http://github.com/javan/whenever
|
||||
# Learn more: https://github.com/javan/whenever
|
||||
|
||||
set :output, "#{Whenever.path}/log/whenever/whenever_$(date +%Y%m%d%H%M%S).log"
|
||||
set :environment, ENV['RAILS_ENV'] if ENV['RAILS_ENV']
|
||||
set :environment, ENV.fetch('RAILS_ENV', nil) if ENV['RAILS_ENV']
|
||||
|
||||
every 1.day, at: '3:00 am' do
|
||||
rake 'detect_exercise_anomalies:with_at_least[10,50]'
|
||||
|
@ -1,5 +0,0 @@
|
||||
process.env.NODE_ENV = process.env.NODE_ENV || 'development'
|
||||
|
||||
const environment = require('./environment')
|
||||
|
||||
module.exports = environment
|
@ -1,47 +0,0 @@
|
||||
/*
|
||||
./config/webpack/environment.js
|
||||
Info for this file can be found
|
||||
github.com/rails/webpacker/blob/master/docs/webpack.md
|
||||
*/
|
||||
|
||||
const {environment} = require('@rails/webpacker')
|
||||
const {merge} = require('webpack-merge')
|
||||
const webpack = require('webpack')
|
||||
const erb = require('./loaders/erb')
|
||||
|
||||
// Add an additional plugin of your choosing : ProvidePlugin
|
||||
environment.plugins.prepend('Provide', new webpack.ProvidePlugin({
|
||||
$: 'jquery',
|
||||
JQuery: 'jquery',
|
||||
jquery: 'jquery',
|
||||
'window.Tether': "tether",
|
||||
Popper: ['popper.js', 'default'], // for Bootstrap 4
|
||||
_: 'underscore',
|
||||
vis: 'vis',
|
||||
hljs: 'highlight.js',
|
||||
d3: 'd3',
|
||||
Sentry: '@sentry/browser',
|
||||
Sortable: 'sortablejs',
|
||||
})
|
||||
)
|
||||
|
||||
// This setting will change the absolute path used to refer
|
||||
// external files (images, fonts, ...) in the generated assets
|
||||
const relative_url_root = process.env.RAILS_RELATIVE_URL_ROOT || '';
|
||||
const public_output_path = environment.config.output.publicPath;
|
||||
environment.loaders.get('file')
|
||||
.use.find(item => item.loader === 'file-loader')
|
||||
.options.publicPath = relative_url_root + public_output_path;
|
||||
|
||||
environment.loaders.append('erb', erb)
|
||||
|
||||
const envConfig = module.exports = environment
|
||||
const aliasConfig = module.exports = {
|
||||
resolve: {
|
||||
alias: {
|
||||
jquery: 'jquery/src/jquery',
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = merge(envConfig.toWebpackConfig(), aliasConfig)
|
@ -1,5 +0,0 @@
|
||||
process.env.NODE_ENV = process.env.NODE_ENV || 'production'
|
||||
|
||||
const environment = require('./environment')
|
||||
|
||||
module.exports = environment
|
@ -1,5 +0,0 @@
|
||||
process.env.NODE_ENV = process.env.NODE_ENV || 'development'
|
||||
|
||||
const environment = require('./environment')
|
||||
|
||||
module.exports = environment
|
68
config/webpack/webpack.config.js
Normal file
68
config/webpack/webpack.config.js
Normal file
@ -0,0 +1,68 @@
|
||||
// See the shakacode/shakapacker README and docs directory for advice on customizing your webpackConfig.
|
||||
|
||||
const { webpackConfig, merge } = require('shakapacker')
|
||||
const webpack = require('webpack');
|
||||
|
||||
const CompressionPlugin = require("compression-webpack-plugin");
|
||||
const CssMinimizerPlugin = require("css-minimizer-webpack-plugin");
|
||||
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
|
||||
const TerserPlugin = require("terser-webpack-plugin");
|
||||
|
||||
// Custom ERB loader to disable Spring and prevent crashes
|
||||
const erb = require("./loaders/erb");
|
||||
|
||||
// This setting will change the absolute path used to refer
|
||||
// external files (images, fonts, ...) in the generated assets
|
||||
const relative_url_root = process.env.RAILS_RELATIVE_URL_ROOT || '';
|
||||
const public_output_path = webpackConfig.output.publicPath;
|
||||
|
||||
const envConfig = module.exports = {
|
||||
module: {
|
||||
rules: [
|
||||
erb
|
||||
]
|
||||
},
|
||||
optimization: {
|
||||
minimize: true,
|
||||
minimizer: [
|
||||
new TerserPlugin(),
|
||||
new CssMinimizerPlugin()
|
||||
],
|
||||
},
|
||||
output: {
|
||||
publicPath: relative_url_root + public_output_path
|
||||
},
|
||||
performance: {
|
||||
// Turn off size warnings for large assets
|
||||
hints: false
|
||||
},
|
||||
plugins: [
|
||||
new webpack.ProvidePlugin({
|
||||
$: 'jquery',
|
||||
JQuery: 'jquery',
|
||||
jQuery: 'jquery',
|
||||
jquery: 'jquery',
|
||||
'window.Tether': "tether",
|
||||
Popper: ['popper.js', 'default'],
|
||||
_: 'underscore',
|
||||
vis: 'vis',
|
||||
d3: 'd3',
|
||||
Sentry: '@sentry/browser',
|
||||
Sortable: 'sortablejs',
|
||||
sorttable: 'sorttable',
|
||||
}),
|
||||
new CompressionPlugin(),
|
||||
new MiniCssExtractPlugin(),
|
||||
],
|
||||
resolve: {
|
||||
extensions: ['.css', '.ts', '.tsx'],
|
||||
alias: {
|
||||
$: 'jquery/src/jquery',
|
||||
jquery: 'jquery/src/jquery',
|
||||
vis$: 'vis-timeline/standalone',
|
||||
}
|
||||
},
|
||||
stats: 'minimal',
|
||||
}
|
||||
|
||||
module.exports = merge(webpackConfig, envConfig)
|
@ -1,76 +1,82 @@
|
||||
# Note: You must restart bin/webpack-dev-server for changes to take effect
|
||||
# Note: You must restart bin/webpacker-dev-server for changes to take effect
|
||||
|
||||
default: &default
|
||||
source_path: app/javascript
|
||||
source_entry_path: packs
|
||||
|
||||
# You can have a subdirectory of the source_path, like 'packs' (recommended).
|
||||
# Alternatively, you can use '/' to use the whole source_path directory.
|
||||
source_entry_path: /
|
||||
|
||||
# If nested_entries is true, then we'll pick up subdirectories within the source_entry_path.
|
||||
# You cannot set this option to true if you set source_entry_path to '/'
|
||||
nested_entries: false
|
||||
|
||||
public_root_path: public
|
||||
public_output_path: packs
|
||||
cache_path: tmp/cache/webpacker
|
||||
webpack_compile_output: false
|
||||
cache_path: tmp/webpacker
|
||||
webpack_compile_output: true
|
||||
# See https://github.com/shakacode/shakapacker#deployment
|
||||
webpacker_precompile: true
|
||||
|
||||
# Additional paths webpack should lookup modules
|
||||
# Location for manifest.json, defaults to {public_output_path}/manifest.json if unset
|
||||
# manifest_path: public/packs/manifest.json
|
||||
|
||||
# Additional paths webpack should look up modules
|
||||
# ['app/assets', 'engine/foo/app/assets']
|
||||
additional_paths: []
|
||||
|
||||
# Reload manifest.json on all requests so we reload latest compiled packs
|
||||
cache_manifest: false
|
||||
|
||||
# Extract and emit a css file
|
||||
extract_css: true
|
||||
# Select loader to use, available options are 'babel' (default), 'swc' or 'esbuild'
|
||||
webpack_loader: 'babel'
|
||||
|
||||
static_assets_extensions:
|
||||
- .jpg
|
||||
- .jpeg
|
||||
- .png
|
||||
- .gif
|
||||
- .tiff
|
||||
- .ico
|
||||
- .svg
|
||||
- .eot
|
||||
- .otf
|
||||
- .ttf
|
||||
- .woff
|
||||
- .woff2
|
||||
# Set to true to enable check for matching versions of shakapacker gem and NPM package - will raise an error if there is a mismatch or wildcard versioning is used
|
||||
ensure_consistent_versioning: true
|
||||
|
||||
extensions:
|
||||
- .mjs
|
||||
- .js
|
||||
- .sass
|
||||
- .scss
|
||||
- .css
|
||||
- .module.sass
|
||||
- .module.scss
|
||||
- .module.css
|
||||
- .png
|
||||
- .svg
|
||||
- .gif
|
||||
- .jpeg
|
||||
- .jpg
|
||||
# Select whether the compiler will use SHA digest ('digest' option) or most most recent modified timestamp ('mtime') to determine freshness
|
||||
compiler_strategy: digest
|
||||
|
||||
development:
|
||||
<<: *default
|
||||
compile: true
|
||||
compiler_strategy: mtime
|
||||
|
||||
# Reference: https://webpack.js.org/configuration/dev-server/
|
||||
dev_server:
|
||||
https: false
|
||||
host: localhost
|
||||
port: 3035
|
||||
public: localhost:3035
|
||||
# Hot Module Replacement updates modules while the application is running without a full reload
|
||||
hmr: false
|
||||
# Inline should be set to true if using HMR
|
||||
inline: true
|
||||
overlay: true
|
||||
# If HMR is on, CSS will by inlined by delivering it as part of the script payload via style-loader. Be sure
|
||||
# that you add style-loader to your project dependencies.
|
||||
#
|
||||
# If you want to instead deliver CSS via <link> with the mini-extract-css-plugin, set inline_css to false.
|
||||
# In that case, style-loader is not needed as a dependency.
|
||||
#
|
||||
# mini-extract-css-plugin is a required dependency in both cases.
|
||||
inline_css: true
|
||||
# Defaults to the inverse of hmr. Uncomment to manually set this.
|
||||
# live_reload: true
|
||||
client:
|
||||
# Should we show a full-screen overlay in the browser when there are compiler errors or warnings?
|
||||
overlay: true
|
||||
# May also be a string
|
||||
# webSocketURL:
|
||||
# hostname: "0.0.0.0"
|
||||
# pathname: "/ws"
|
||||
# port: 8080
|
||||
# Should we use gzip compression?
|
||||
compress: true
|
||||
disable_host_check: true
|
||||
use_local_ip: false
|
||||
quiet: false
|
||||
pretty: false
|
||||
# Note that apps that do not check the host are vulnerable to DNS rebinding attacks
|
||||
allowed_hosts: "all"
|
||||
pretty: true
|
||||
headers:
|
||||
'Access-Control-Allow-Origin': '*'
|
||||
watch_options:
|
||||
ignored: '**/node_modules/**'
|
||||
|
||||
static:
|
||||
watch:
|
||||
ignored: '**/node_modules/**'
|
||||
|
||||
test:
|
||||
<<: *default
|
||||
@ -85,8 +91,5 @@ production:
|
||||
# Production depends on precompilation of packs prior to booting for performance.
|
||||
compile: false
|
||||
|
||||
# Extract and emit a css file
|
||||
extract_css: true
|
||||
|
||||
# Cache manifest.json for performance
|
||||
cache_manifest: true
|
||||
|
Reference in New Issue
Block a user