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

@@ -35,12 +35,13
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'
@@ -89,13 +89,13
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).
You need to be logged in to leave comments. Login now