Description:
enable user settings, remove APIO header git-svn-id: http://theory.cpe.ku.ac.th/grader/web/trunk@277 6386c4cd-e34a-4fa8-8920-d93eb39b512e
Commit status:
[Not Reviewed]
References:
Comments:
0 Commit comments 0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
Add another comment

r138:0f4011aaed34 - - 4 files changed: 7 inserted, 6 deleted

@@ -80,7 +80,7
80 80 @problems.each do |p|
81 81 sub = Submission.find_last_by_user_and_problem(u.id,p.id)
82 82 if (sub!=nil) and (sub.points!=nil)
83 - ustat << [sub.points, (sub.points>=p.full_score)]
83 + ustat << [(sub.points.to_f*100/p.full_score).round, (sub.points>=p.full_score)]
84 84 else
85 85 ustat << [0,false]
86 86 end
@@ -9,9 +9,10
9 9 in_place_edit_for :user, :email_for_editing
10 10
11 11 def index
12 - # ... disable in this contest ...
13 - # @user = User.find(session[:user_id])
14 - redirect_to :controller => 'main', :action => 'list'
12 + # uncomment below to disable settings
13 + #redirect_to :controller => 'main', :action => 'list'
14 +
15 + @user = User.find(session[:user_id])
15 16 end
16 17
17 18 def chg_passwd
@@ -30,7 +30,7
30 30 append_to menu_items, '[Test]', 'test', 'index'
31 31 end
32 32 append_to menu_items, '[Help]', 'main', 'help'
33 - #append_to menu_items, '[Settings]', 'users', 'index'
33 + append_to menu_items, '[Settings]', 'users', 'index'
34 34 append_to menu_items, '[Log out]', 'main', 'login'
35 35
36 36 menu_items
@@ -4,7 +4,7
4 4 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5 5 <head>
6 6 <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
7 - <title>APIO'08</title>
7 + <title>Grader</title>
8 8 <%= stylesheet_link_tag 'application' %>
9 9 <%= yield :head %>
10 10 </head>
You need to be logged in to leave comments. Login now