merge
This commit is contained in:
@ -34,7 +34,6 @@ In order to execute code submissions using Docker, source code files are written
|
||||
- create production configuration files (*database.production.yml*, …)
|
||||
- customize *config/deploy/production.rb* if you want to deploy using [Capistrano](http://capistranorb.com/)
|
||||
|
||||
The application is compatible with MRI and JRuby. Due to superior parallelism, we recommend using JRuby.
|
||||
|
||||
## Useful service maintenance commands
|
||||
|
||||
|
@ -174,8 +174,14 @@ class SubmissionsController < ApplicationController
|
||||
def parse_message(message, output_stream, socket, recursive = true)
|
||||
begin
|
||||
parsed = JSON.parse(message)
|
||||
socket.send_data message
|
||||
Rails.logger.info('parse_message sent: ' + message)
|
||||
if(parsed.class == Hash && parsed.key?('cmd'))
|
||||
socket.send_data message
|
||||
Rails.logger.info('parse_message sent: ' + message)
|
||||
else
|
||||
parsed = {'cmd'=>'write','stream'=>output_stream,'data'=>message}
|
||||
socket.send_data JSON.dump(parsed)
|
||||
Rails.logger.info('parse_message sent: ' + JSON.dump(parsed))
|
||||
end
|
||||
rescue JSON::ParserError => e
|
||||
# Check wether the message contains multiple lines, if true try to parse each line
|
||||
if ((recursive == true) && (message.include? "\n"))
|
||||
|
@ -27,7 +27,7 @@ h1 = Exercise.model_name.human(count: 2)
|
||||
- @exercises.each do |exercise|
|
||||
tr data-id=exercise.id
|
||||
td = exercise.title
|
||||
td = link_to_if(policy(exercise.author).show?, exercise.author, exercise.author)
|
||||
td = link_to_if(exercise.author && policy(exercise.author).show?, exercise.author, exercise.author)
|
||||
td = link_to_if(exercise.execution_environment && policy(exercise.execution_environment).show?, exercise.execution_environment, exercise.execution_environment)
|
||||
td = exercise.files.teacher_defined_tests.count
|
||||
td = exercise.maximum_score
|
||||
|
@ -12,7 +12,7 @@
|
||||
limit 1").first['id'].to_i
|
||||
submission = Submission.find(submission_id)
|
||||
%>
|
||||
<%= user %> | <%= @request_for_comment.requested_at %>
|
||||
<%= user.displayname %> | <%= @request_for_comment.requested_at %>
|
||||
</p>
|
||||
<h5>
|
||||
<% if @request_for_comment.question and not @request_for_comment.question == '' %>
|
||||
|
@ -0,0 +1,10 @@
|
||||
class ChangeCommentTextAttributeToTextDatatype < ActiveRecord::Migration
|
||||
def up
|
||||
change_column :comments, :text, :text
|
||||
end
|
||||
def down
|
||||
# This might cause trouble if you have strings longer
|
||||
# than 255 characters.
|
||||
change_column :comments, :text, :string
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user