Description:
hacked user creation to bypass member name validation, changed default config for test pair import
Commit status:
[Not Reviewed]
References:
Comments:
0 Commit comments 0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
Add another comment

r261:432c3e723bef - - 2 files changed: 2 inserted, 1 deleted

@@ -29,24 +29,25
29 end
29 end
30
30
31 def show
31 def show
32 @user = User.find(params[:id])
32 @user = User.find(params[:id])
33 end
33 end
34
34
35 def new
35 def new
36 @user = User.new
36 @user = User.new
37 end
37 end
38
38
39 def create
39 def create
40 @user = User.new(params[:user])
40 @user = User.new(params[:user])
41 + @user.member1_full_name = @user.full_name
41 @user.activated = true
42 @user.activated = true
42 if @user.save
43 if @user.save
43 flash[:notice] = 'User was successfully created.'
44 flash[:notice] = 'User was successfully created.'
44 redirect_to :action => 'list'
45 redirect_to :action => 'list'
45 else
46 else
46 render :action => 'new'
47 render :action => 'new'
47 end
48 end
48 end
49 end
49
50
50 def create_from_list
51 def create_from_list
51 lines = params[:user_list]
52 lines = params[:user_list]
52
53
@@ -83,25 +83,25
83 TEST_REQUEST_INPUT_FILE_DIR = RAILS_ROOT + '/data/test_request/input'
83 TEST_REQUEST_INPUT_FILE_DIR = RAILS_ROOT + '/data/test_request/input'
84 TEST_REQUEST_OUTPUT_FILE_DIR = RAILS_ROOT + '/data/test_request/output'
84 TEST_REQUEST_OUTPUT_FILE_DIR = RAILS_ROOT + '/data/test_request/output'
85
85
86 # To use ANALYSIS MODE, provide the testcases/testruns breakdown,
86 # To use ANALYSIS MODE, provide the testcases/testruns breakdown,
87 # and the directory of the grading result (usually in judge's dir).
87 # and the directory of the grading result (usually in judge's dir).
88 TASK_GRADING_INFO_FILENAME = RAILS_ROOT + '/config/tasks.yml'
88 TASK_GRADING_INFO_FILENAME = RAILS_ROOT + '/config/tasks.yml'
89
89
90 # TODO: change this to where results are kept.
90 # TODO: change this to where results are kept.
91 GRADING_RESULT_DIR = 'RESULT-DIR'
91 GRADING_RESULT_DIR = 'RESULT-DIR'
92
92
93 # Change this to allow importing testdata into database as test-pairs.
93 # Change this to allow importing testdata into database as test-pairs.
94 # This is mainly for Code Jom contest.
94 # This is mainly for Code Jom contest.
95 - ALLOW_TEST_PAIR_IMPORT = false
95 + ALLOW_TEST_PAIR_IMPORT = true
96
96
97 # Uncomment so that the system validates user e-mails
97 # Uncomment so that the system validates user e-mails
98 # VALIDATE_USER_EMAILS = true
98 # VALIDATE_USER_EMAILS = true
99
99
100 # Uncomment so that Apache X-Sendfile is used when delivering files
100 # Uncomment so that Apache X-Sendfile is used when delivering files
101 # (e.g., in /tasks/view).
101 # (e.g., in /tasks/view).
102 # USE_APACHE_XSENDFILE = true
102 # USE_APACHE_XSENDFILE = true
103
103
104 # Uncomment so that configuration is read only once when the server is loaded
104 # Uncomment so that configuration is read only once when the server is loaded
105 # Configuration.enable_caching
105 # Configuration.enable_caching
106
106
107 # OPTIONS FOR CODE JOM
107 # OPTIONS FOR CODE JOM
You need to be logged in to leave comments. Login now