diff --git a/app/assets/javascripts/editor/evaluation.js b/app/assets/javascripts/editor/evaluation.js index 6c90abd7..4f81ac27 100644 --- a/app/assets/javascripts/editor/evaluation.js +++ b/app/assets/javascripts/editor/evaluation.js @@ -150,6 +150,7 @@ CodeOceanEditorEvaluation = { } var element = this.findOrCreateOutputElement(index); + // Switch all four lines below to enable the output of images and render tags if (!colorize) { if (output.stdout !== undefined && output.stdout !== '') { //element.append(output.stdout) diff --git a/app/controllers/submissions_controller.rb b/app/controllers/submissions_controller.rb index c704cc60..d4bb0a66 100644 --- a/app/controllers/submissions_controller.rb +++ b/app/controllers/submissions_controller.rb @@ -235,7 +235,11 @@ class SubmissionsController < ApplicationController # Filter out information about run_command, test_command, user or working directory run_command = @submission.execution_environment.run_command % command_substitutions(sanitize_filename) test_command = @submission.execution_environment.test_command % command_substitutions(sanitize_filename) - unless /root|workspace|#{run_command}|#{test_command}/.match(message) + if test_command.blank? + # If no test command is set, use the run_command for the RegEx below. Otherwise, no output will be displayed! + test_command = run_command + end + unless /root|workspace|#{run_command.gsub('.', '\.')}|#{test_command}/.match(message) parse_message(message, 'stdout', tubesock) end end