Description:
start testing add compiler msg pop up
Commit status:
[Not Reviewed]
References:
Comments:
0 Commit comments 0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
Add another comment

r622:54dff44ae178 - - 60 files changed: 56 inserted, 1593 deleted

@@ -0,0 +1,3
1 + :javascript
2 + $("#compiler_msg").html("#{j @submissionhcompiler_msg}")
3 +
@@ -0,0 +1,13
1 + require 'test_helper'
2 +
3 + class LoginTest < ActionDispatch::IntegrationTest
4 + # test "the truth" do
5 + # assert true
6 + # end
7 +
8 + test "login with valid information" do
9 + get root_path
10 + assert_response :success
11 +
12 + end
13 + end
@@ -1,82 +1,78
1 1 source 'https://rubygems.org'
2 2
3 3 gem 'rails', '~>4.2.0'
4 4 gem 'activerecord-session_store'
5 5
6 6 gem 'select2-rails'
7 7
8 8 # Bundle edge Rails instead:
9 9 # gem 'rails', :git => 'git://github.com/rails/rails.git'
10 10
11 11 gem 'mysql2'
12 12 gem 'sqlite3'
13 13
14 14 # Gems used only for assets and not required
15 15 # in production environments by default.
16 - group :assets do
17 16 gem 'sass-rails'
18 17 gem 'coffee-rails'
19 18
20 19 # See https://github.com/sstephenson/execjs#readme for more supported runtimes
21 20 # gem 'therubyracer', :platforms => :ruby
22 21
23 22 gem 'uglifier'
24 - end
23 +
25 24
26 25 # gem 'prototype-rails'
27 26
28 27 # To use ActiveModel has_secure_password
29 28 # gem 'bcrypt-ruby', '~> 3.0.0'
30 29
31 30 # To use Jbuilder templates for JSON
32 31 # gem 'jbuilder'
33 32
34 33 # Use unicorn as the app server
35 34 # gem 'unicorn'
36 35
37 36 # Deploy with Capistrano
38 37 # gem 'capistrano'
39 38
40 39 # To use debugger
41 40 # gem 'debugger'
42 41 #
43 42
44 43 #in-place editor
45 44 gem 'best_in_place', '~> 3.0.1'
46 45
47 46 # jquery addition
48 47 gem 'jquery-rails'
49 48 gem 'jquery-ui-rails'
50 49 gem 'jquery-timepicker-addon-rails'
51 50 gem 'jquery-tablesorter'
52 51 gem 'jquery-countdown-rails'
53 52
54 53 #syntax highlighter
55 54 gem 'rouge'
56 55
57 56 #add bootstrap
58 57 gem 'bootstrap-sass', '~> 3.2.0'
59 58 gem 'bootstrap-switch-rails'
60 59 gem 'bootstrap-toggle-rails'
61 60 gem 'autoprefixer-rails'
62 61
63 62 #bootstrap sortable
64 63 gem 'momentjs-rails'
65 64 gem 'rails_bootstrap_sortable'
66 65
67 66 #ace editor
68 67 gem 'ace-rails-ap'
69 68
70 69 gem 'haml'
71 70 gem 'haml-rails'
72 71 gem 'mail'
73 72 gem 'rdiscount'
74 73 gem 'test-unit'
75 74 gem 'will_paginate', '~> 3.0.7'
76 75 gem 'dynamic_form'
77 76 gem 'in_place_editing'
78 77 gem 'verification', :git => 'https://github.com/sikachu/verification.git'
79 78
80 - group :test, :development do
81 - gem 'rspec-rails'
82 - end
@@ -1,241 +1,221
1 1 GIT
2 2 remote: https://github.com/sikachu/verification.git
3 - revision: e6fe084ce16b7b5a4b1cdfca5374d125fd034a0f
3 + revision: ff31697b940d7b0e2ec65f08764215c96104e76d
4 4 specs:
5 5 verification (1.0.3)
6 - actionpack (>= 3.0.0, < 5.0)
7 - activesupport (>= 3.0.0, < 5.0)
6 + actionpack (>= 3.0.0, < 5.1)
7 + activesupport (>= 3.0.0, < 5.1)
8 8
9 9 GEM
10 10 remote: https://rubygems.org/
11 11 specs:
12 12 ace-rails-ap (4.1.1)
13 13 actionmailer (4.2.7.1)
14 14 actionpack (= 4.2.7.1)
15 15 actionview (= 4.2.7.1)
16 16 activejob (= 4.2.7.1)
17 17 mail (~> 2.5, >= 2.5.4)
18 18 rails-dom-testing (~> 1.0, >= 1.0.5)
19 19 actionpack (4.2.7.1)
20 20 actionview (= 4.2.7.1)
21 21 activesupport (= 4.2.7.1)
22 22 rack (~> 1.6)
23 23 rack-test (~> 0.6.2)
24 24 rails-dom-testing (~> 1.0, >= 1.0.5)
25 25 rails-html-sanitizer (~> 1.0, >= 1.0.2)
26 26 actionview (4.2.7.1)
27 27 activesupport (= 4.2.7.1)
28 28 builder (~> 3.1)
29 29 erubis (~> 2.7.0)
30 30 rails-dom-testing (~> 1.0, >= 1.0.5)
31 31 rails-html-sanitizer (~> 1.0, >= 1.0.2)
32 32 activejob (4.2.7.1)
33 33 activesupport (= 4.2.7.1)
34 34 globalid (>= 0.3.0)
35 35 activemodel (4.2.7.1)
36 36 activesupport (= 4.2.7.1)
37 37 builder (~> 3.1)
38 38 activerecord (4.2.7.1)
39 39 activemodel (= 4.2.7.1)
40 40 activesupport (= 4.2.7.1)
41 41 arel (~> 6.0)
42 42 activerecord-session_store (1.0.0)
43 43 actionpack (>= 4.0, < 5.1)
44 44 activerecord (>= 4.0, < 5.1)
45 45 multi_json (~> 1.11, >= 1.11.2)
46 46 rack (>= 1.5.2, < 3)
47 47 railties (>= 4.0, < 5.1)
48 48 activesupport (4.2.7.1)
49 49 i18n (~> 0.7)
50 50 json (~> 1.7, >= 1.7.7)
51 51 minitest (~> 5.1)
52 52 thread_safe (~> 0.3, >= 0.3.4)
53 53 tzinfo (~> 1.1)
54 - arel (6.0.3)
55 - autoprefixer-rails (6.5.3.1)
54 + arel (6.0.4)
55 + autoprefixer-rails (6.6.0)
56 56 execjs
57 57 best_in_place (3.0.3)
58 58 actionpack (>= 3.2)
59 59 railties (>= 3.2)
60 60 bootstrap-sass (3.2.0.2)
61 61 sass (~> 3.2)
62 62 bootstrap-switch-rails (3.3.3)
63 63 bootstrap-toggle-rails (2.2.1.0)
64 64 builder (3.2.2)
65 65 coffee-rails (4.2.1)
66 66 coffee-script (>= 2.2.0)
67 67 railties (>= 4.0.0, < 5.2.x)
68 68 coffee-script (2.4.1)
69 69 coffee-script-source
70 70 execjs
71 - coffee-script-source (1.11.1)
72 - concurrent-ruby (1.0.2)
73 - diff-lcs (1.2.5)
71 + coffee-script-source (1.12.2)
72 + concurrent-ruby (1.0.4)
74 73 dynamic_form (1.1.4)
75 74 erubis (2.7.0)
76 75 execjs (2.7.0)
77 76 globalid (0.3.7)
78 77 activesupport (>= 4.1.0)
79 78 haml (4.0.7)
80 79 tilt
81 80 haml-rails (0.9.0)
82 81 actionpack (>= 4.0.1)
83 82 activesupport (>= 4.0.1)
84 83 haml (>= 4.0.6, < 5.0)
85 84 html2haml (>= 1.0.1)
86 85 railties (>= 4.0.1)
87 86 html2haml (2.0.0)
88 87 erubis (~> 2.7.0)
89 88 haml (~> 4.0.0)
90 89 nokogiri (~> 1.6.0)
91 90 ruby_parser (~> 3.5)
92 91 i18n (0.7.0)
93 92 in_place_editing (1.2.0)
94 93 jquery-countdown-rails (2.0.2)
95 94 jquery-rails (4.2.1)
96 95 rails-dom-testing (>= 1, < 3)
97 96 railties (>= 4.2.0)
98 97 thor (>= 0.14, < 2.0)
99 - jquery-tablesorter (1.23.1)
98 + jquery-tablesorter (1.23.3)
100 99 railties (>= 3.2, < 6)
101 100 jquery-timepicker-addon-rails (1.4.1)
102 101 railties (>= 3.1)
103 - jquery-ui-rails (4.0.3)
104 - jquery-rails
105 - railties (>= 3.1.0)
102 + jquery-ui-rails (6.0.1)
103 + railties (>= 3.2.16)
106 104 json (1.8.3)
107 105 loofah (2.0.3)
108 106 nokogiri (>= 1.5.9)
109 107 mail (2.6.4)
110 108 mime-types (>= 1.16, < 4)
111 109 mime-types (3.1)
112 110 mime-types-data (~> 3.2015)
113 111 mime-types-data (3.2016.0521)
114 112 mini_portile2 (2.1.0)
115 113 minitest (5.10.1)
116 114 momentjs-rails (2.15.1)
117 115 railties (>= 3.1)
118 116 multi_json (1.12.1)
119 117 mysql2 (0.4.5)
120 118 nokogiri (1.6.8.1)
121 119 mini_portile2 (~> 2.1.0)
122 120 power_assert (0.4.1)
123 121 rack (1.6.5)
124 122 rack-test (0.6.3)
125 123 rack (>= 1.0)
126 124 rails (4.2.7.1)
127 125 actionmailer (= 4.2.7.1)
128 126 actionpack (= 4.2.7.1)
129 127 actionview (= 4.2.7.1)
130 128 activejob (= 4.2.7.1)
131 129 activemodel (= 4.2.7.1)
132 130 activerecord (= 4.2.7.1)
133 131 activesupport (= 4.2.7.1)
134 132 bundler (>= 1.3.0, < 2.0)
135 133 railties (= 4.2.7.1)
136 134 sprockets-rails
137 135 rails-deprecated_sanitizer (1.0.3)
138 136 activesupport (>= 4.2.0.alpha)
139 - rails-dom-testing (1.0.7)
137 + rails-dom-testing (1.0.8)
140 138 activesupport (>= 4.2.0.beta, < 5.0)
141 - nokogiri (~> 1.6.0)
139 + nokogiri (~> 1.6)
142 140 rails-deprecated_sanitizer (>= 1.0.1)
143 141 rails-html-sanitizer (1.0.3)
144 142 loofah (~> 2.0)
145 143 rails_bootstrap_sortable (2.0.1)
146 144 momentjs-rails (>= 2.8.3)
147 145 railties (4.2.7.1)
148 146 actionpack (= 4.2.7.1)
149 147 activesupport (= 4.2.7.1)
150 148 rake (>= 0.8.7)
151 149 thor (>= 0.18.1, < 2.0)
152 150 rake (12.0.0)
153 151 rdiscount (2.2.0.1)
154 152 rouge (2.0.7)
155 - rspec-core (3.5.4)
156 - rspec-support (~> 3.5.0)
157 - rspec-expectations (3.5.0)
158 - diff-lcs (>= 1.2.0, < 2.0)
159 - rspec-support (~> 3.5.0)
160 - rspec-mocks (3.5.0)
161 - diff-lcs (>= 1.2.0, < 2.0)
162 - rspec-support (~> 3.5.0)
163 - rspec-rails (3.5.2)
164 - actionpack (>= 3.0)
165 - activesupport (>= 3.0)
166 - railties (>= 3.0)
167 - rspec-core (~> 3.5.0)
168 - rspec-expectations (~> 3.5.0)
169 - rspec-mocks (~> 3.5.0)
170 - rspec-support (~> 3.5.0)
171 - rspec-support (3.5.0)
172 153 ruby_parser (3.8.3)
173 154 sexp_processor (~> 4.1)
174 - sass (3.4.22)
155 + sass (3.4.23)
175 156 sass-rails (5.0.6)
176 157 railties (>= 4.0.0, < 6)
177 158 sass (~> 3.1)
178 159 sprockets (>= 2.8, < 4.0)
179 160 sprockets-rails (>= 2.0, < 4.0)
180 161 tilt (>= 1.1, < 3)
181 162 select2-rails (4.0.3)
182 163 thor (~> 0.14)
183 164 sexp_processor (4.7.0)
184 - sprockets (3.7.0)
165 + sprockets (3.7.1)
185 166 concurrent-ruby (~> 1.0)
186 167 rack (> 1, < 3)
187 168 sprockets-rails (3.2.0)
188 169 actionpack (>= 4.0)
189 170 activesupport (>= 4.0)
190 171 sprockets (>= 3.0.0)
191 172 sqlite3 (1.3.12)
192 173 test-unit (3.2.3)
193 174 power_assert
194 175 thor (0.19.4)
195 176 thread_safe (0.3.5)
196 177 tilt (2.0.5)
197 178 tzinfo (1.2.2)
198 179 thread_safe (~> 0.1)
199 180 uglifier (3.0.4)
200 181 execjs (>= 0.3.0, < 3)
201 182 will_paginate (3.0.12)
202 183
203 184 PLATFORMS
204 185 ruby
205 186
206 187 DEPENDENCIES
207 188 ace-rails-ap
208 189 activerecord-session_store
209 190 autoprefixer-rails
210 191 best_in_place (~> 3.0.1)
211 192 bootstrap-sass (~> 3.2.0)
212 193 bootstrap-switch-rails
213 194 bootstrap-toggle-rails
214 195 coffee-rails
215 196 dynamic_form
216 197 haml
217 198 haml-rails
218 199 in_place_editing
219 200 jquery-countdown-rails
220 201 jquery-rails
221 202 jquery-tablesorter
222 203 jquery-timepicker-addon-rails
223 204 jquery-ui-rails
224 205 mail
225 206 momentjs-rails
226 207 mysql2
227 208 rails (~> 4.2.0)
228 209 rails_bootstrap_sortable
229 210 rdiscount
230 211 rouge
231 - rspec-rails
232 212 sass-rails
233 213 select2-rails
234 214 sqlite3
235 215 test-unit
236 216 uglifier
237 217 verification!
238 218 will_paginate (~> 3.0.7)
239 219
240 220 BUNDLED WITH
241 221 1.13.6
@@ -1,44 +1,41
1 1 // This is a manifest file that'll be compiled into application.js, which will include all the files
2 2 // listed below.
3 3 //
4 4 // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
5 5 // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
6 6 //
7 7 // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
8 8 // the compiled file.
9 9 //
10 10 // WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
11 11 // GO AFTER THE REQUIRES BELOW.
12 12 //
13 13 //= require jquery
14 14 //= require jquery_ujs
15 - //= require jquery.ui.all
15 + //= require jquery-ui
16 16 //= require bootstrap-sprockets
17 17 //= require moment
18 18 //= require bootstrap-sortable
19 19 //= require select2
20 20 //= require ace-rails-ap
21 21 //= require ace/mode-c_cpp
22 22 //= require ace/mode-python
23 23 //= require ace/mode-ruby
24 24 //= require ace/mode-pascal
25 25 //= require ace/mode-javascript
26 26 //= require ace/mode-java
27 27 //= require ace/theme-merbivore
28 28 //= require custom
29 29 //= require jquery.countdown
30 30 //-------------- addition from local_jquery -----------
31 - //= require jquery.ui.datepicker
32 - //= require jquery.ui.slider
33 - //= require jquery-ui-timepicker-addon
34 31 //= require jquery-tablesorter
35 32 //= require best_in_place
36 33 //= require best_in_place.jquery-ui
37 34 //= require brython
38 35
39 36 // since this is after blank line, it is not downloaded
40 37 //x= require prototype
41 38 //x= require prototype_ujs
42 39 //x= require effects
43 40 //x= require dragdrop
44 41 //x= require controls
@@ -1,14 +1,4
1 - //= require jquery
2 - //= require jquery_ujs
3 - //= require jquery.ui.all
4 - //= require jquery.ui.datepicker
5 - //= require jquery.ui.slider
6 - //= require jquery-ui-timepicker-addon
7 - //= require jquery-tablesorter
8 - //= require best_in_place
9 - //= require best_in_place.jquery-ui
10 -
11 1 $(document).ready(function() {
12 2 /* Activating Best In Place */
13 3 jQuery(".best_in_place").best_in_place();
14 4 });
@@ -1,405 +1,405
1 1 /* This is a manifest file that'll be compiled into application.css, which will include all the files
2 2 * listed below.
3 3 *
4 4 * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
5 5 * or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
6 6 *
7 7 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
8 8 * compiled file so the styles you add here take precedence over styles defined in any styles
9 9 * defined in the other CSS/SCSS files in this directory. It is generally better to create a new
10 10 * file per style scope.
11 11 *
12 12 * // bootstrap says that we should not do this, but @import each file instead
13 13 * # *= require_tree .
14 14 * # *= require_self
15 15 */
16 16
17 - @import "jquery.ui.all";
18 - @import "jquery.ui.core";
19 - @import "jquery.ui.theme";
20 - @import "jquery.ui.datepicker";
21 - @import "jquery.ui.slider";
17 + @import "jquery-ui";
18 + //@import "jquery.ui.core";
19 + //@import "jquery.ui.theme";
20 + //@import "jquery.ui.datepicker";
21 + //@import "jquery.ui.slider";
22 22 @import "jquery-ui-timepicker-addon";
23 23 @import "jquery-tablesorter/theme.metro-dark";
24 24 @import "jquery.countdown";
25 25 @import "tablesorter-theme.cafe";
26 26
27 27 //bootstrap
28 28 @import "bootstrap-sprockets";
29 29 @import "bootstrap";
30 30 @import "select2";
31 31 @import "select2-bootstrap";
32 32
33 33 //@import bootstrap3-switch
34 34 @import "bootstrap-toggle";
35 35 @import "bootstrap-sortable";
36 36
37 37 //bootstrap navbar color (from)
38 38 $bgDefault: #19197b;
39 39 $bgHighlight: #06064b;
40 40 $colDefault: #8e8eb4;
41 41 $colHighlight: #ffffff;
42 42 $dropDown: false;
43 43
44 44 @font-face {
45 45 font-family: 'Glyphicons Halflings';
46 46 src: font-path('bootstrap/glyphicons-halflings-regular.eot');
47 47 src: font-path('bootstrap/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'),
48 48 font-path('bootstrap/glyphicons-halflings-regular.woff') format('woff'),
49 49 font-path('bootstrap/glyphicons-halflings-regular.ttf') format('truetype'),
50 50 font-path('bootstrap/glyphicons-halflings-regular.svg#glyphicons-halflingsregular') format('svg');
51 51 }
52 52
53 53
54 54 .navbar-default {
55 55 background-color: $bgDefault;
56 56 border-color: $bgHighlight;
57 57
58 58 .navbar-brand {
59 59 color: $colDefault;
60 60
61 61 &:hover, &:focus {
62 62 color: $colHighlight;
63 63 }
64 64 }
65 65
66 66 .navbar-text {
67 67 color: $colDefault;
68 68 }
69 69
70 70 .navbar-nav {
71 71 > li {
72 72 > a {
73 73 color: $colDefault;
74 74
75 75 &:hover, &:focus {
76 76 color: $colHighlight;
77 77 }
78 78 }
79 79
80 80 @if $dropDown {
81 81 > .dropdown-menu {
82 82 background-color: $bgDefault;
83 83
84 84 > li {
85 85 > a {
86 86 color: $colDefault;
87 87
88 88 &:hover, &:focus {
89 89 color: $colHighlight;
90 90 background-color: $bgHighlight;
91 91 }
92 92 }
93 93
94 94 > .divider {
95 95 background-color: $bgHighlight;
96 96 }
97 97 }
98 98 }
99 99 }
100 100 }
101 101
102 102 @if $dropDown {
103 103 .open .dropdown-menu > .active {
104 104 > a, > a:hover, > a:focus {
105 105 color: $colHighlight;
106 106 background-color: $bgHighlight;
107 107 }
108 108 }
109 109 }
110 110
111 111 > .active {
112 112 > a, > a:hover, > a:focus {
113 113 color: $colHighlight;
114 114 background-color: $bgHighlight;
115 115 }
116 116 }
117 117
118 118 > .open {
119 119 > a, > a:hover, > a:focus {
120 120 color: $colHighlight;
121 121 background-color: $bgHighlight;
122 122 }
123 123 }
124 124 }
125 125
126 126 .navbar-toggle {
127 127 border-color: $bgHighlight;
128 128
129 129 &:hover, &:focus {
130 130 background-color: $bgHighlight;
131 131 }
132 132
133 133 .icon-bar {
134 134 background-color: $colDefault;
135 135 }
136 136 }
137 137
138 138 .navbar-collapse,
139 139 .navbar-form {
140 140 border-color: $colDefault;
141 141 }
142 142
143 143 .navbar-link {
144 144 color: $colDefault;
145 145
146 146 &:hover {
147 147 color: $colHighlight;
148 148 }
149 149 }
150 150 }
151 151
152 152 @media (max-width: 767px) {
153 153 .navbar-default .navbar-nav .open .dropdown-menu {
154 154 > li > a {
155 155 color: $colDefault;
156 156
157 157 &:hover, &:focus {
158 158 color: $colHighlight;
159 159 }
160 160 }
161 161
162 162 > .active {
163 163 > a, > a:hover, > a:focus {
164 164 color: $colHighlight;
165 165 background-color: $bgHighlight;
166 166 }
167 167 }
168 168 }
169 169 }
170 170
171 171 .secondnavbar {
172 172 top: 50px;
173 173 }
174 174
175 175 // --------------- bootstrap file upload ----------------------
176 176 .btn-file {
177 177 position: relative;
178 178 overflow: hidden;
179 179 }
180 180
181 181 .btn-file input[type=file] {
182 182 position: absolute;
183 183 top: 0;
184 184 right: 0;
185 185 min-width: 100%;
186 186 min-height: 100%;
187 187 font-size: 100px;
188 188 text-align: right;
189 189 filter: alpha(opacity = 0);
190 190 opacity: 0;
191 191 outline: none;
192 192 background: white;
193 193 cursor: inherit;
194 194 display: block;
195 195 }
196 196
197 197 body {
198 198 background: white image-url("topbg.jpg") repeat-x top center;
199 199
200 200 //font-size: 13px
201 201 //font-family: Tahoma, "sans-serif"
202 202 margin: 10px;
203 203 padding: 10px;
204 204 padding-top: 60px;
205 205 }
206 206
207 207 // ------------------ bootstrap sortable --------------------
208 208 table.sortable th {
209 209 padding-right: 20px !important;
210 210
211 211 span.sign {
212 212 right: (-15px) !important;
213 213 }
214 214
215 215 &.text-right {
216 216 padding-left: 20px !important;
217 217 padding-right: 8px !important;
218 218
219 219 &:after, span.sign {
220 220 left: (-15px) !important;
221 221 }
222 222 }
223 223 }
224 224
225 225 input {
226 226 font-family: Tahoma, "sans-serif";
227 227 }
228 228
229 229 h1 {
230 230 font-size: 24px;
231 231 color: #334488;
232 232 line-height: 2em;
233 233 }
234 234
235 235 h2 {
236 236 font-size: 18px;
237 237 color: #5566bb;
238 238 line-height: 1.5em;
239 239 }
240 240
241 241 hr {
242 242 border-top: 1px solid #dddddd;
243 243 border-bottom: 1px solid #eeeeee;
244 244 }
245 245
246 246 //#a
247 247 // color: #6666cc
248 248 // text-decoration: none
249 249 //
250 250 // &:link, &:visited
251 251 // color: #6666cc
252 252 // text-decoration: none
253 253 //
254 254 // &:hover, &:focus
255 255 // color: #111166
256 256 // text-decoration: none
257 257
258 258 div {
259 259 &.userbar {
260 260 line-height: 1.5em;
261 261 text-align: right;
262 262 font-size: 12px;
263 263 }
264 264
265 265 &.title {
266 266 padding: 10px 0px;
267 267 line-height: 1.5em;
268 268 font-size: 13px;
269 269
270 270 span.contest-over-msg {
271 271 font-size: 15px;
272 272 color: red;
273 273 }
274 274
275 275 table {
276 276 width: 100%;
277 277 font-weight: bold;
278 278 }
279 279
280 280 td {
281 281 &.left-col {
282 282 text-align: left;
283 283 vertical-align: top;
284 284 color: #444444;
285 285 }
286 286
287 287 &.right-col {
288 288 text-align: right;
289 289 vertical-align: top;
290 290 font-size: 18px;
291 291 color: #116699;
292 292 }
293 293 }
294 294 }
295 295 }
296 296
297 297 table.info {
298 298 margin: 10px 0;
299 299 border: 1px solid #666666;
300 300 border-collapse: collapse;
301 301 font-size: 12px;
302 302
303 303 th {
304 304 border: 1px solid #666666;
305 305 line-height: 1.5em;
306 306 padding: 0 0.5em;
307 307 }
308 308
309 309 td {
310 310 border-left: 1px solid #666666;
311 311 border-right: 1px solid #666666;
312 312 line-height: 1.5em;
313 313 padding: 0 0.5em;
314 314 }
315 315 }
316 316
317 317 tr {
318 318 &.info-head {
319 319 background: #777777;
320 320 color: white;
321 321 }
322 322
323 323 &.info-odd {
324 324 background: #eeeeee;
325 325 }
326 326
327 327 &.info-even {
328 328 background: #fcfcfc;
329 329 }
330 330 }
331 331
332 332 @mixin basicbox {
333 333 background: #eeeeff;
334 334 border: 1px dotted #99aaee;
335 335 padding: 5px;
336 336 margin: 10px 0px;
337 337 color: black;
338 338 font-size: 13px;
339 339 }
340 340
341 341 .infobox {
342 342 @include basicbox;
343 343 }
344 344
345 345 .submitbox {
346 346 @include basicbox;
347 347 }
348 348
349 349 .errorExplanation {
350 350 border: 1px dotted gray;
351 351 color: #bb2222;
352 352 padding: 5px 15px 5px 15px;
353 353 margin-bottom: 5px;
354 354 background-color: white;
355 355 font-weight: normal;
356 356
357 357 h2 {
358 358 color: #cc1111;
359 359 font-weight: bold;
360 360 }
361 361 }
362 362
363 363 table.uinfo {
364 364 border-collapse: collapse;
365 365 border: 1px solid black;
366 366 font-size: 13px;
367 367 }
368 368
369 369 td.uinfo {
370 370 vertical-align: top;
371 371 border: 1px solid black;
372 372 padding: 5px;
373 373 }
374 374
375 375 th.uinfo {
376 376 background: lightgreen;
377 377 vertical-align: top;
378 378 text-align: right;
379 379 border: 1px solid black;
380 380 padding: 5px;
381 381 }
382 382
383 383 div {
384 384 &.compilermsgbody {
385 385 font-family: monospace;
386 386 }
387 387
388 388 &.task-menu {
389 389 text-align: center;
390 390 font-size: 13px;
391 391 line-height: 1.75em;
392 392 font-weight: bold;
393 393 border-top: 1px dashed gray;
394 394 border-bottom: 1px dashed gray;
395 395 margin-top: 2px;
396 396 margin-bottom: 4px;
397 397 }
398 398 }
399 399
400 400 table.taskdesc {
401 401 border: 2px solid #dddddd;
402 402 border-collapse: collapse;
403 403 margin: 10px auto;
404 404 width: 90%;
405 405 font-size: 13px;
@@ -1,39 +1,43
1 1 CafeGrader::Application.configure do
2 2 # Settings specified here will take precedence over those in config/application.rb
3 3
4 4 # The test environment is used exclusively to run your application's
5 5 # test suite. You never need to work with it otherwise. Remember that
6 6 # your test database is "scratch space" for the test suite and is wiped
7 7 # and recreated between test runs. Don't rely on the data there!
8 8 config.cache_classes = true
9 9
10 10 # Configure static asset server for tests with Cache-Control for performance
11 11 config.serve_static_files = true
12 12 config.static_cache_control = "public, max-age=3600"
13 13
14 14 # Log error messages when you accidentally call methods on nil
15 15 config.whiny_nils = true
16 16
17 17 # Show full error reports and disable caching
18 18 config.consider_all_requests_local = true
19 19 config.action_controller.perform_caching = false
20 20
21 21 # Raise exceptions instead of rendering exception templates
22 22 config.action_dispatch.show_exceptions = false
23 23
24 24 # Disable request forgery protection in test environment
25 25 config.action_controller.allow_forgery_protection = false
26 26
27 27 # Tell Action Mailer not to deliver emails to the real world.
28 28 # The :test delivery method accumulates sent emails in the
29 29 # ActionMailer::Base.deliveries array.
30 30 config.action_mailer.delivery_method = :test
31 31
32 32 # Raise exception on mass assignment protection for Active Record models
33 33 #config.active_record.mass_assignment_sanitizer = :strict // DEPRICATED
34 34
35 35 # Print deprecation notices to the stderr
36 36 config.active_support.deprecation = :stderr
37 37
38 38 config.eager_load = false
39 +
40 + #test order
41 + config.active_support.test_order = :sorted
42 +
39 43 end
@@ -1,230 +1,245
1 1 CONFIGURATIONS =
2 2 [
3 3 {
4 4 :key => 'system.single_user_mode',
5 5 :value_type => 'boolean',
6 6 :default_value => 'false',
7 7 :description => 'Only admins can log in to the system when running under single user mode.'
8 8 },
9 9
10 10 {
11 11 :key => 'ui.front.title',
12 12 :value_type => 'string',
13 13 :default_value => 'Grader'
14 14 },
15 15
16 16 {
17 17 :key => 'ui.front.welcome_message',
18 18 :value_type => 'string',
19 19 :default_value => 'Welcome!'
20 20 },
21 21
22 22 {
23 23 :key => 'ui.show_score',
24 24 :value_type => 'boolean',
25 25 :default_value => 'true'
26 26 },
27 27
28 28 {
29 29 :key => 'contest.time_limit',
30 30 :value_type => 'string',
31 31 :default_value => 'unlimited',
32 32 :description => 'Time limit in format hh:mm, or "unlimited" for contests with no time limits. This config is CACHED. Restart the server before the change can take effect.'
33 33 },
34 34
35 35 {
36 36 :key => 'system.mode',
37 37 :value_type => 'string',
38 38 :default_value => 'standard',
39 39 :description => 'Current modes are "standard", "contest", "indv-contest", and "analysis".'
40 40 },
41 41
42 42 {
43 43 :key => 'contest.name',
44 44 :value_type => 'string',
45 45 :default_value => 'Grader',
46 46 :description => 'This name will be shown on the user header bar.'
47 47 },
48 48
49 49 {
50 50 :key => 'contest.multisites',
51 51 :value_type => 'boolean',
52 52 :default_value => 'false',
53 53 :description => 'If the server is in contest mode and this option is true, on the log in of the admin a menu for site selections is shown.'
54 54 },
55 55
56 + #---------------------------- right --------------------------------
56 57 {
57 58 :key => 'right.user_hall_of_fame',
58 59 :value_type => 'boolean',
59 60 :default_value => 'false',
60 61 :description => 'If true, any user can access hall of fame page.'
61 62 },
62 63
63 64 {
64 65 :key => 'right.multiple_ip_login',
65 66 :value_type => 'boolean',
66 67 :default_value => 'true',
67 68 :description => 'When change from true to false, a user can login from the first IP they logged into afterward.'
68 69 },
69 70
70 71 {
71 72 :key => 'right.user_view_submission',
72 73 :value_type => 'boolean',
73 74 :default_value => 'false',
74 75 :description => 'If true, any user can view submissions of every one.'
75 76 },
76 77
78 + {
79 + :key => 'right.bypass_agreement',
80 + :value_type => 'boolean',
81 + :default_value => 'true',
82 + :description => 'When false, a user must accept usage agreement before login'
83 + },
84 +
85 + {
86 + :key => 'right.heartbeat_response',
87 + :value_type => 'string',
88 + :default_value => 'OK',
89 + :description => 'Heart beat response text'
90 + },
91 +
77 92 # If Configuration['system.online_registration'] is true, the
78 93 # system allows online registration, and will use these
79 94 # information for sending confirmation emails.
80 95 {
81 96 :key => 'system.online_registration.smtp',
82 97 :value_type => 'string',
83 98 :default_value => 'smtp.somehost.com'
84 99 },
85 100
86 101 {
87 102 :key => 'system.online_registration.from',
88 103 :value_type => 'string',
89 104 :default_value => 'your.email@address'
90 105 },
91 106
92 107 {
93 108 :key => 'system.admin_email',
94 109 :value_type => 'string',
95 110 :default_value => 'admin@admin.email'
96 111 },
97 112
98 113 {
99 114 :key => 'system.user_setting_enabled',
100 115 :value_type => 'boolean',
101 116 :default_value => 'true',
102 117 :description => 'If this option is true, users can change their settings'
103 118 },
104 119
105 120 {
106 121 :key => 'system.user_setting_enabled',
107 122 :value_type => 'boolean',
108 123 :default_value => 'true',
109 124 :description => 'If this option is true, users can change their settings'
110 125 },
111 126
112 127 # If Configuration['contest.test_request.early_timeout'] is true
113 128 # the user will not be able to use test request at 30 minutes
114 129 # before the contest ends.
115 130 {
116 131 :key => 'contest.test_request.early_timeout',
117 132 :value_type => 'boolean',
118 133 :default_value => 'false'
119 134 },
120 135
121 136 {
122 137 :key => 'system.multicontests',
123 138 :value_type => 'boolean',
124 139 :default_value => 'false'
125 140 },
126 141
127 142 {
128 143 :key => 'contest.confirm_indv_contest_start',
129 144 :value_type => 'boolean',
130 145 :default_value => 'false'
131 146 },
132 147
133 148 {
134 149 :key => 'contest.default_contest_name',
135 150 :value_type => 'string',
136 151 :default_value => 'none',
137 152 :description => "New user will be assigned to this contest automatically, if it exists. Set to 'none' if there is no default contest."
138 153 }
139 154
140 155 ]
141 156
142 157
143 158 def create_configuration_key(key,
144 159 value_type,
145 160 default_value,
146 161 description='')
147 162 conf = (GraderConfiguration.find_by_key(key) ||
148 163 GraderConfiguration.new(:key => key,
149 164 :value_type => value_type,
150 165 :value => default_value))
151 166 conf.description = description
152 167 conf.save
153 168 end
154 169
155 170 def seed_config
156 171 CONFIGURATIONS.each do |conf|
157 172 if conf.has_key? :description
158 173 desc = conf[:description]
159 174 else
160 175 desc = ''
161 176 end
162 177 create_configuration_key(conf[:key],
163 178 conf[:value_type],
164 179 conf[:default_value],
165 180 desc)
166 181 end
167 182 end
168 183
169 184 def seed_roles
170 185 return if Role.find_by_name('admin')
171 186
172 187 role = Role.create(:name => 'admin')
173 188 user_admin_right = Right.create(:name => 'user_admin',
174 189 :controller => 'user_admin',
175 190 :action => 'all')
176 191 problem_admin_right = Right.create(:name=> 'problem_admin',
177 192 :controller => 'problems',
178 193 :action => 'all')
179 194
180 195 graders_right = Right.create(:name => 'graders_admin',
181 196 :controller => 'graders',
182 197 :action => 'all')
183 198
184 199 role.rights << user_admin_right;
185 200 role.rights << problem_admin_right;
186 201 role.rights << graders_right;
187 202 role.save
188 203 end
189 204
190 205 def seed_root
191 206 return if User.find_by_login('root')
192 207
193 208 root = User.new(:login => 'root',
194 209 :full_name => 'Administrator',
195 210 :alias => 'root')
196 211 root.password = 'ioionrails';
197 212
198 213 class << root
199 214 public :encrypt_new_password
200 215 def valid?(context=nil)
201 216 true
202 217 end
203 218 end
204 219
205 220 root.encrypt_new_password
206 221
207 222 root.roles << Role.find_by_name('admin')
208 223
209 224 root.activated = true
210 225 root.save
211 226 end
212 227
213 228 def seed_users_and_roles
214 229 seed_roles
215 230 seed_root
216 231 end
217 232
218 233 def seed_more_languages
219 234 Language.delete_all
220 235 Language.create( name: 'c', pretty_name: 'C', ext: 'c', common_ext: 'c' )
221 236 Language.create( name: 'cpp', pretty_name: 'C++', ext: 'cpp', common_ext: 'cpp,cc' )
222 237 Language.create( name: 'pas', pretty_name: 'Pascal', ext: 'pas', common_ext: 'pas' )
223 238 Language.create( name: 'ruby', pretty_name: 'Ruby', ext: 'rb', common_ext: 'rb' )
224 239 Language.create( name: 'python', pretty_name: 'Python', ext: 'py', common_ext: 'py' )
225 240 Language.create( name: 'java', pretty_name: 'Java', ext: 'java', common_ext: 'java' )
226 241 end
227 242
228 243 seed_config
229 244 seed_users_and_roles
230 245 seed_more_languages
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
You need to be logged in to leave comments. Login now