Description:
[web] added help page git-svn-id: http://theory.cpe.ku.ac.th/grader/web/trunk@225 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

r107:be38116d08d3 - - 4 files changed: 63 inserted, 2 deleted

@@ -0,0 +1,56
1 + = user_title_bar(@user)
2 +
3 + .announcementbox
4 + %span{:class => 'title'}
5 + How to submit
6 + .announcement
7 + %p
8 + You <b>must</b> specify the language you are using
9 + in your program header. You can optionally
10 + specify the task you are submitting to.
11 +
12 + %p
13 + The possible language options are
14 + <tt>C</tt>, <tt>C++</tt>, and <tt>Pascal</tt>.
15 + The follow are examples.
16 +
17 + %table{:border => '1'}
18 + %tr
19 + %th{:width => '100px'} C
20 + %th{:width => '100px'} C++
21 + %th{:width => '100px'} Pascal
22 + %tr
23 + %td= "<tt>/*<br/>LANG: C<br/>*/</tt>"
24 + %td= "<tt>/*<br/>LANG: C++<br/>*/</tt>"
25 + %td= "<tt>{<br/>LANG: Pascal<br/>}</tt>"
26 +
27 + %p
28 + The server <b>will not</b> accept your submission,
29 + if you do not specify the language.
30 +
31 + %p
32 + Optionally, you can also specify
33 + the task with <tt>TASK:</tt> <i>taskname</i>.
34 + On the first page, the taskname for each task is
35 + shown in parentheses.
36 +
37 + %p
38 + For example, suppose you are using <tt>C++</tt>
39 + to write task <b>mobiles</b>, you put
40 +
41 + %table{:border => '1'}
42 + %tr
43 + %td{:width => '100px'}
44 + %tt <tt>/*<br/>LANG: C++<br/>TASK: mobiles<br/>*/</tt>
45 +
46 + %p
47 + on top of your source code.
48 + If you are using <tt>Pascal</tt> to write the same task,
49 + you'll use
50 +
51 + %table{:border => '1'}
52 + %tr
53 + %td{:width => '100px'}
54 + %tt <tt>{<br/>LANG: Pascal<br/>TASK: mobiles<br/>}</tt>
55 +
56 +
@@ -24,12 +24,16
24 end
24 end
25
25
26 def list
26 def list
27 prepare_list_information
27 prepare_list_information
28 end
28 end
29
29
30 + def help
31 + @user = User.find(session[:user_id])
32 + end
33 +
30 def submit
34 def submit
31 user = User.find(session[:user_id])
35 user = User.find(session[:user_id])
32
36
33 @submission = Submission.new(params[:submission])
37 @submission = Submission.new(params[:submission])
34 @submission.user = user
38 @submission.user = user
35 @submission.language_id = 0
39 @submission.language_id = 0
@@ -21,13 +21,14
21 # main page
21 # main page
22 append_to menu_items, '[Main]', 'main', 'list'
22 append_to menu_items, '[Main]', 'main', 'list'
23 append_to menu_items, '[Messages]', 'messages', 'list'
23 append_to menu_items, '[Messages]', 'messages', 'list'
24 append_to menu_items, '[Tasks]', 'tasks', 'list'
24 append_to menu_items, '[Tasks]', 'tasks', 'list'
25 append_to menu_items, '[Submissions]', 'main', 'submission'
25 append_to menu_items, '[Submissions]', 'main', 'submission'
26 append_to menu_items, '[Test]', 'test', 'index'
26 append_to menu_items, '[Test]', 'test', 'index'
27 - append_to menu_items, '[Settings]', 'users', 'index'
27 + append_to menu_items, '[Help]', 'main', 'help'
28 + #append_to menu_items, '[Settings]', 'users', 'index'
28 append_to menu_items, '[Log out]', 'main', 'login'
29 append_to menu_items, '[Log out]', 'main', 'login'
29
30
30 menu_items
31 menu_items
31 end
32 end
32
33
33 def append_to(option,label, controller, action)
34 def append_to(option,label, controller, action)
@@ -18,11 +18,11
18 %th
18 %th
19 %th Tasks
19 %th Tasks
20 %th # of sub(s)
20 %th # of sub(s)
21 %th Results
21 %th Results
22 = render :partial => 'problem', :collection => @problems
22 = render :partial => 'problem', :collection => @problems
23
23
24 - %hr
24 + %hr/
25
25
26 .submitbox
26 .submitbox
27 = render :partial => 'submission_box'
27 = render :partial => 'submission_box'
28
28
You need to be logged in to leave comments. Login now