Description:
fixed errors on test request: Rails.root is not a string, no errors.length
Commit status:
[Not Reviewed]
References:
Comments:
0 Commit comments 0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
Add another comment

r341:358ad0e58c64 - - 2 files changed: 4 inserted, 4 deleted

@@ -16,13 +16,13
16
16
17 def submit
17 def submit
18 @user = User.find(session[:user_id])
18 @user = User.find(session[:user_id])
19
19
20 @submitted_test_request = TestRequest.new_from_form_params(@user,params[:test_request])
20 @submitted_test_request = TestRequest.new_from_form_params(@user,params[:test_request])
21
21
22 - if @submitted_test_request.errors.length != 0
22 + if ! @submitted_test_request.errors.empty?
23 prepare_index_information
23 prepare_index_information
24 render :action => 'index' and return
24 render :action => 'index' and return
25 end
25 end
26
26
27 if GraderConfiguration.time_limit_mode?
27 if GraderConfiguration.time_limit_mode?
28 if @user.contest_finished?
28 if @user.contest_finished?
@@ -2,18 +2,18
2 # the grader directory below. This dir is where raw, ev, ev-exam,
2 # the grader directory below. This dir is where raw, ev, ev-exam,
3 # scripts reside. All grader scripts will be in
3 # scripts reside. All grader scripts will be in
4 # #{GRADER_ROOT_DIR}/scripts.
4 # #{GRADER_ROOT_DIR}/scripts.
5 GRADER_ROOT_DIR = ''
5 GRADER_ROOT_DIR = ''
6
6
7 # These are where inputs and outputs of test requests are stored
7 # These are where inputs and outputs of test requests are stored
8 - TEST_REQUEST_INPUT_FILE_DIR = Rails.root + '/data/test_request/input'
8 + TEST_REQUEST_INPUT_FILE_DIR = (Rails.root + 'data/test_request/input').to_s
9 - TEST_REQUEST_OUTPUT_FILE_DIR = Rails.root + '/data/test_request/output'
9 + TEST_REQUEST_OUTPUT_FILE_DIR = (Rails.root + 'data/test_request/output').to_s
10
10
11 # To use ANALYSIS MODE, provide the testcases/testruns breakdown,
11 # To use ANALYSIS MODE, provide the testcases/testruns breakdown,
12 # and the directory of the grading result (usually in judge's dir).
12 # and the directory of the grading result (usually in judge's dir).
13 - TASK_GRADING_INFO_FILENAME = Rails.root + '/config/tasks.yml'
13 + TASK_GRADING_INFO_FILENAME = Rails.root + 'config/tasks.yml'
14
14
15 # TODO: change this to where results are kept.
15 # TODO: change this to where results are kept.
16 GRADING_RESULT_DIR = 'RESULT-DIR'
16 GRADING_RESULT_DIR = 'RESULT-DIR'
17
17
18 # Change this to allow importing testdata into database as test-pairs.
18 # Change this to allow importing testdata into database as test-pairs.
19 # This is mainly for Code Jom contest.
19 # This is mainly for Code Jom contest.
You need to be logged in to leave comments. Login now