Description:
update Current time to properly use rails time
Commit status:
[Not Reviewed]
References:
Comments:
0 Commit comments 0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
Add another comment

r351:a14389fe8773 - - 1 file changed: 1 inserted, 1 deleted

@@ -92,42 +92,42
92 end
92 end
93 end
93 end
94
94
95 #
95 #
96 # if the contest is in the anaysis mode
96 # if the contest is in the anaysis mode
97 if GraderConfiguration.analysis_mode?
97 if GraderConfiguration.analysis_mode?
98 header = <<ANALYSISMODE
98 header = <<ANALYSISMODE
99 <tr><td colspan="2" align="center">
99 <tr><td colspan="2" align="center">
100 <span class="contest-over-msg">ANALYSIS MODE</span>
100 <span class="contest-over-msg">ANALYSIS MODE</span>
101 </td></tr>
101 </td></tr>
102 ANALYSISMODE
102 ANALYSISMODE
103 end
103 end
104
104
105 contest_name = GraderConfiguration['contest.name']
105 contest_name = GraderConfiguration['contest.name']
106
106
107 #
107 #
108 # build real title bar
108 # build real title bar
109 result = <<TITLEBAR
109 result = <<TITLEBAR
110 <div class="title">
110 <div class="title">
111 <table>
111 <table>
112 #{header}
112 #{header}
113 <tr>
113 <tr>
114 <td class="left-col">
114 <td class="left-col">
115 #{user.full_name}<br/>
115 #{user.full_name}<br/>
116 - #{t 'title_bar.current_time'} #{format_short_time(Time.new)}
116 + #{t 'title_bar.current_time'} #{format_short_time(Time.zone.now)}
117 #{time_left}
117 #{time_left}
118 <br/>
118 <br/>
119 </td>
119 </td>
120 <td class="right-col">#{contest_name}</td>
120 <td class="right-col">#{contest_name}</td>
121 </tr>
121 </tr>
122 </table>
122 </table>
123 </div>
123 </div>
124 TITLEBAR
124 TITLEBAR
125 result.html_safe
125 result.html_safe
126 end
126 end
127
127
128 def markdown(text)
128 def markdown(text)
129 markdown = RDiscount.new(text)
129 markdown = RDiscount.new(text)
130 markdown.to_html.html_safe
130 markdown.to_html.html_safe
131 end
131 end
132
132
133 end
133 end
You need to be logged in to leave comments. Login now