Description:
[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
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
r125:89874907db3e - - 5 files changed: 25 inserted, 4 deleted
@@ -29,13 +29,17 | |||
|
29 | 29 | :conditions => ["active AND updated_at < ?", |
|
30 | 30 | Time.now.gmtime - GraderProcess.stalled_time]) |
|
31 | 31 | end |
|
32 | 32 | |
|
33 | 33 | def report_active(task=nil) |
|
34 | 34 | self.active = true |
|
35 | - self.task_id = task.id | |
|
35 | + if task!=nil | |
|
36 | + self.task_id = task.id | |
|
37 | + else | |
|
38 | + self.task_id = nil | |
|
39 | + end | |
|
36 | 40 | self.task_type = task.class.to_s |
|
37 | 41 | self.save |
|
38 | 42 | end |
|
39 | 43 | |
|
40 | 44 | def report_inactive() |
|
41 | 45 | self.active = false |
@@ -6,13 +6,13 | |||
|
6 | 6 | %td.info{:align => "center"} |
|
7 | 7 | = link_to('[load]',{:action => 'source', :id => submission.id}) |
|
8 | 8 | %td.info |
|
9 | 9 | - if submission.graded_at!=nil |
|
10 | 10 | = "Graded at #{format_short_time(submission.graded_at)}." |
|
11 | 11 | %br/ |
|
12 | - = "Score: #{submission.points} " if Configuration['ui.show_score'] | |
|
12 | + = "Score: #{(submission.points*100/submission.problem.full_score).to_i} " if Configuration['ui.show_score'] | |
|
13 | 13 | = " [" |
|
14 | 14 | %tt |
|
15 | 15 | = submission.grader_comment |
|
16 | 16 | = "]" |
|
17 | 17 | %td.info |
|
18 | 18 | = render :partial => 'compiler_message', :locals => {:compiler_message => submission.compiler_message } |
@@ -4,13 +4,13 | |||
|
4 | 4 | - else |
|
5 | 5 | - if submission.graded_at==nil |
|
6 | 6 | Submitted at |
|
7 | 7 | = format_short_time(submission.submitted_at) |
|
8 | 8 | - else |
|
9 | 9 | = "Graded at #{format_short_time(submission.graded_at)}, " |
|
10 | - = "score: #{submission.points} " if Configuration['ui.show_score'] | |
|
10 | + = "score: #{(submission.points*100/submission.problem.full_score).to_i} " if Configuration['ui.show_score'] | |
|
11 | 11 | = " [" |
|
12 | 12 | %tt |
|
13 | 13 | = submission.grader_comment |
|
14 | 14 | = "]" |
|
15 | 15 | = " | " |
|
16 | 16 | = link_to('[msg]', {:action => 'compiler_msg', :id => submission.id}, {:popup => true}) |
@@ -1,9 +1,21 | |||
|
1 | 1 | = user_title_bar(@user) |
|
2 | 2 | |
|
3 | - %h3 Your Messages | |
|
3 | + .announcementbox | |
|
4 | + %span{:class => 'title'} | |
|
5 | + How to submit clarification requests | |
|
6 | + .announcement | |
|
7 | + %p | |
|
8 | + :markdown | |
|
9 | + The clarification requests should be phrased as yes/no questions. | |
|
10 | + The answers will be one of the following: | |
|
11 | + (1) **YES**, | |
|
12 | + (2) <b>NO</b>, | |
|
13 | + (3) **ANSWERED IN TASK DESCRIPTION (EXPLICITLY OR IMPLICITLY)**, | |
|
14 | + (4) **INVALID QUESTION**, and | |
|
15 | + (5) **NO COMMENT**. | |
|
4 | 16 | |
|
5 | 17 | - form_for 'message', nil, :url => { :action => 'create'} do |f| |
|
6 | 18 | %p |
|
7 | 19 | %b New clarification request |
|
8 | 20 | = submit_tag "Post" |
|
9 | 21 | %br/ |
@@ -1,10 +1,15 | |||
|
1 | 1 | <%= user_title_bar(@user) %> |
|
2 | 2 | |
|
3 | 3 | <h2>Test Interface</h2> |
|
4 | 4 | |
|
5 | + <p> | |
|
6 | + <b>Note:</b> Test interface will be disabled in the last 30 minutes | |
|
7 | + of the contest time on your site. | |
|
8 | + </p> | |
|
9 | + | |
|
5 | 10 | <% if @problems.length==0 %> |
|
6 | 11 | There is no submission |
|
7 | 12 | <% else %> |
|
8 | 13 | |
|
9 | 14 | <script type="text/javascript"> |
|
10 | 15 | var submissionCount = new Array(); |
You need to be logged in to leave comments.
Login now