diff --git a/app/models/grader_process.rb b/app/models/grader_process.rb --- a/app/models/grader_process.rb +++ b/app/models/grader_process.rb @@ -32,7 +32,11 @@ def report_active(task=nil) self.active = true - self.task_id = task.id + if task!=nil + self.task_id = task.id + else + self.task_id = nil + end self.task_type = task.class.to_s self.save end diff --git a/app/views/main/_submission.html.haml b/app/views/main/_submission.html.haml --- a/app/views/main/_submission.html.haml +++ b/app/views/main/_submission.html.haml @@ -9,7 +9,7 @@ - if submission.graded_at!=nil = "Graded at #{format_short_time(submission.graded_at)}." %br/ - = "Score: #{submission.points} " if Configuration['ui.show_score'] + = "Score: #{(submission.points*100/submission.problem.full_score).to_i} " if Configuration['ui.show_score'] = " [" %tt = submission.grader_comment diff --git a/app/views/main/_submission_short.html.haml b/app/views/main/_submission_short.html.haml --- a/app/views/main/_submission_short.html.haml +++ b/app/views/main/_submission_short.html.haml @@ -7,7 +7,7 @@ = format_short_time(submission.submitted_at) - else = "Graded at #{format_short_time(submission.graded_at)}, " - = "score: #{submission.points} " if Configuration['ui.show_score'] + = "score: #{(submission.points*100/submission.problem.full_score).to_i} " if Configuration['ui.show_score'] = " [" %tt = submission.grader_comment diff --git a/app/views/messages/list.html.haml b/app/views/messages/list.html.haml --- a/app/views/messages/list.html.haml +++ b/app/views/messages/list.html.haml @@ -1,6 +1,18 @@ = user_title_bar(@user) -%h3 Your Messages +.announcementbox + %span{:class => 'title'} + How to submit clarification requests + .announcement + %p + :markdown + The clarification requests should be phrased as yes/no questions. + The answers will be one of the following: + (1) **YES**, + (2) NO, + (3) **ANSWERED IN TASK DESCRIPTION (EXPLICITLY OR IMPLICITLY)**, + (4) **INVALID QUESTION**, and + (5) **NO COMMENT**. - form_for 'message', nil, :url => { :action => 'create'} do |f| %p diff --git a/app/views/test/index.html.erb b/app/views/test/index.html.erb --- a/app/views/test/index.html.erb +++ b/app/views/test/index.html.erb @@ -2,6 +2,11 @@
+ Note: Test interface will be disabled in the last 30 minutes + of the contest time on your site. +
+ <% if @problems.length==0 %> There is no submission <% else %>