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 +
@@ -18,24 +18,28
18 18 def login
19 19 saved_notice = flash[:notice]
20 20 reset_session
21 21 flash[:notice] = saved_notice
22 22
23 23 render :action => 'login', :layout => 'empty'
24 24 end
25 25
26 26 def list
27 27 prepare_list_information
28 28 end
29 29
30 + def help
31 + @user = User.find(session[:user_id])
32 + end
33 +
30 34 def submit
31 35 user = User.find(session[:user_id])
32 36
33 37 @submission = Submission.new(params[:submission])
34 38 @submission.user = user
35 39 @submission.language_id = 0
36 40 if params['file']!=''
37 41 @submission.source = params['file'].read
38 42 @submission.source_filename = params['file'].original_filename
39 43 end
40 44 @submission.submitted_at = Time.new
41 45
@@ -15,25 +15,26
15 15 append_to menu_items, '[User stat]', 'user_admin', 'user_stat'
16 16 append_to menu_items, '[Graders]', 'graders', 'list'
17 17 append_to menu_items, '[Site config]', 'configurations', 'index'
18 18 menu_items << "<br/>"
19 19 end
20 20
21 21 # main page
22 22 append_to menu_items, '[Main]', 'main', 'list'
23 23 append_to menu_items, '[Messages]', 'messages', 'list'
24 24 append_to menu_items, '[Tasks]', 'tasks', 'list'
25 25 append_to menu_items, '[Submissions]', 'main', 'submission'
26 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 29 append_to menu_items, '[Log out]', 'main', 'login'
29 30
30 31 menu_items
31 32 end
32 33
33 34 def append_to(option,label, controller, action)
34 35 option << ' ' if option!=''
35 36 option << link_to_unless_current(label,
36 37 :controller => controller,
37 38 :action => action)
38 39 end
39 40
@@ -12,17 +12,17
12 12
13 13
14 14 %hr/
15 15
16 16 %table.info
17 17 %tr.info-head
18 18 %th
19 19 %th Tasks
20 20 %th # of sub(s)
21 21 %th Results
22 22 = render :partial => 'problem', :collection => @problems
23 23
24 - %hr
24 + %hr/
25 25
26 26 .submitbox
27 27 = render :partial => 'submission_box'
28 28
You need to be logged in to leave comments. Login now