# HG changeset patch # User jittat # Date 2008-05-08 16:38:00 # Node ID 89874907db3ed7ebf5a56ee48c540ef9a9e137c3 # Parent 44e64c191944def5913c1b2489f118d18da70561 [web] normalize full_score to 100, more hints on how to submit questions, hint on the disabling to test interface during the last 30 minutes git-svn-id: http://theory.cpe.ku.ac.th/grader/web/trunk@253 6386c4cd-e34a-4fa8-8920-d93eb39b512e 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 @@

Test Interface

+

+ 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 %>