gaku_core 0.3.0.pre.0 → 0.3.0.pre.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (34) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/gaku/courses.js.coffee +20 -0
  3. data/app/assets/javascripts/gaku/exams.js.coffee +23 -0
  4. data/app/assets/stylesheets/gaku/bootstrap_and_theme.css.scss +574 -0
  5. data/app/controllers/gaku/courses/exams/exam_portion_scores_controller.rb +23 -0
  6. data/app/controllers/gaku/courses/exams_controller.rb +291 -0
  7. data/app/controllers/gaku/exams_controller.rb +170 -0
  8. data/app/helpers/gaku/gaku_helper.rb +155 -0
  9. data/app/models/gaku/enrollment.rb +1 -1
  10. data/app/models/gaku/exam_portion.rb +9 -0
  11. data/app/models/gaku/semester_connector.rb +1 -1
  12. data/app/models/gaku/student.rb +4 -0
  13. data/app/views/gaku/admin/grading_methods/_form_fields.html.slim +7 -0
  14. data/app/views/gaku/courses/_form_fields.html.slim +5 -0
  15. data/app/views/gaku/courses/exams/exam_portion_scores/update.js.erb +5 -0
  16. data/app/views/gaku/courses/exams/grading/_calculations.html.slim +16 -0
  17. data/app/views/gaku/courses/exams/grading/_exam_portion_score_form.htmls.lim +0 -0
  18. data/app/views/gaku/courses/exams/grading/_exam_scores.html.slim +78 -0
  19. data/app/views/gaku/courses/exams/grading/_students.html.slim +12 -0
  20. data/app/views/gaku/courses/exams/grading.html.slim +38 -0
  21. data/app/views/gaku/layouts/gaku.html.slim +25 -0
  22. data/app/views/gaku/shared/menu/_global.html.erb +1 -1
  23. data/config/locales/bg.yml +421 -413
  24. data/config/locales/en.yml +53 -110
  25. data/config/locales/ja.yml +891 -883
  26. data/config/locales/pt-BR.yml +11 -3
  27. data/config/locales/zh-CN.yml +9 -1
  28. data/config/routes.rb +120 -5
  29. data/db/migrate/20160209100945_add_score_types_to_exam_portions.rb +6 -0
  30. data/db/migrate/20160209104713_add_fields_to_exam_portion_score.rb +6 -0
  31. data/lib/gaku/grading/single/percentage.rb +3 -3
  32. data/lib/gaku/grading/single/score.rb +3 -3
  33. data/lib/gaku/testing/factories/exam_portion_factory.rb +1 -1
  34. metadata +20 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a76c61f9769e8432f306125839305e169d1cb7ea
4
- data.tar.gz: 6d7eff5c17d2c61af2a28989be672ad19b25d9e7
3
+ metadata.gz: 76f36a0da3f4a55df193bba50983b2fde67f83c4
4
+ data.tar.gz: 1242fb1590dfaf3498d4ba5b1d90534e90957f64
5
5
  SHA512:
6
- metadata.gz: 4ef8d0892328e5bbce88f4e783d6173031a26a8bbfd7ad52df2fecb4524b3c666fbe10dfdef967915604f270a9bd6c08179a5c2178353e723267317825e3be9d
7
- data.tar.gz: e68189a7119431bfc68de5a5b3f7508cf8263858de6cf7ed9e0f5425f2fa2b6a7bb15084c02d4d5e889385d11f0e5b2cf4c6cf08c91ee1642f17ad5a59819ed6
6
+ metadata.gz: a6ad557d7510df78b18c2500aea2f359a2a16cecddfb0cb45a79e81baa48622de1e530b9d2c429947c5a6dbd76151f7bb5934bdf10a30e6c7067ae329a101ee3
7
+ data.tar.gz: 2e2bc28aa211dc0e960db19f77362d113d922c43e325d9a7b9a7f8dd5fb7d07a2192d491946321b0dfdae2979c2cae79fe2123eac56a7f0228d597c343fd88a0
@@ -0,0 +1,20 @@
1
+ ready = ->
2
+
3
+ self = this
4
+
5
+ class CoursesController
6
+ edit: ->
7
+ self.app.student_chooser()
8
+
9
+ grading: ->
10
+ $('.edit_exam_portion_score').find('input').on 'blur', ->
11
+ $(@).parent().submit()
12
+
13
+ faye = new Faye.Client 'http://localhost:9292/faye'
14
+ faye.subscribe '/messages/new', (data) ->
15
+ eval(data)
16
+
17
+ @app.courses = new CoursesController
18
+
19
+ $(document).ready(ready)
20
+ $(document).on('page:load', ready)
@@ -0,0 +1,23 @@
1
+ ready = ->
2
+
3
+ class ExamsController
4
+ init: ->
5
+ $('.exam-portion-weight').on 'change', ->
6
+ $(@).parent('form').submit()
7
+
8
+ $('#new-exam-portion-attachment-link').on 'click', (e)->
9
+ e.preventDefault()
10
+ $('#new-exam-portion-attachment-form').slide()
11
+
12
+ # $(document).ready ->
13
+ # $(document).on 'click','#exam_use_weighting', ->
14
+ # if $(@).is ':checked'
15
+ # $('#exam_weight').attr 'class','validate[required, custom[integer]min[0]] span12'
16
+ # else
17
+ # $('#exam_weight').attr 'class','span12'
18
+ # $('.exam_weightformError').remove()
19
+
20
+ @app.exams = new ExamsController
21
+
22
+ $(document).ready(ready)
23
+ $(document).on('page:load', ready)
@@ -0,0 +1,574 @@
1
+ @import "bootstrap";
2
+ @import "bootstrap/glyphicons";
3
+
4
+ // for submenu --------
5
+ .dropdown-submenu{position:relative;}
6
+ .dropdown-submenu>.dropdown-menu{top:0;left:100%;margin-top:-6px;margin-left:-1px;-webkit-border-radius:0 6px 6px 6px;-moz-border-radius:0 6px 6px 6px;border-radius:0 6px 6px 6px;}
7
+ .dropdown-submenu:hover>.dropdown-menu{display:block;}
8
+ .dropdown-submenu>a:after{display:block;content:" ";float:right;width:0;height:0;border-color:transparent;border-style:solid;border-width:5px 0 5px 5px;border-left-color:#cccccc;margin-top:5px;margin-right:-10px;}
9
+ .dropdown-submenu:hover>a:after{border-left-color:#ffffff;}
10
+ .dropdown-submenu.pull-left{float:none;}.dropdown-submenu.pull-left>.dropdown-menu{left:-100%;margin-left:10px;-webkit-border-radius:6px 0 6px 6px;-moz-border-radius:6px 0 6px 6px;border-radius:6px 0 6px 6px;}
11
+
12
+ // for fix --------
13
+ .nav-pills {
14
+ li {
15
+ background-color: #F8F8F8;
16
+ }
17
+ }
18
+
19
+ //.index-header { margin-bottom: 10px; }
20
+
21
+ .container {
22
+ max-width: 1900px;
23
+ }
24
+
25
+ .alert-dismissable .close {
26
+ position: relative;
27
+ top: -2px;
28
+ right: 0px;
29
+ color: red;
30
+ font-size: 24px;
31
+ }
32
+
33
+ .table {
34
+ & thead>tr>th {
35
+ vertical-align: middle;
36
+ text-align: center;
37
+ }
38
+ & tbody>tr>td {
39
+ vertical-align: middle;
40
+ }
41
+ &.grading tbody>tr>td {
42
+ vertical-align: baseline;
43
+ }
44
+ }
45
+
46
+ .tab-pane {
47
+ .panel {
48
+ margin-bottom: 15px;
49
+ }
50
+ .panel:last-child {
51
+ margin-bottom: 0px;
52
+ }
53
+ }
54
+
55
+ // theme main --------
56
+ .btn-default,
57
+ .btn-primary,
58
+ .btn-success,
59
+ .btn-info,
60
+ .btn-warning,
61
+ .btn-danger {
62
+ text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2);
63
+ -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 1px rgba(0, 0, 0, 0.075);
64
+ box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 1px rgba(0, 0, 0, 0.075);
65
+ }
66
+
67
+ .btn-default:active,
68
+ .btn-primary:active,
69
+ .btn-success:active,
70
+ .btn-info:active,
71
+ .btn-warning:active,
72
+ .btn-danger:active,
73
+ .btn-default.active,
74
+ .btn-primary.active,
75
+ .btn-success.active,
76
+ .btn-info.active,
77
+ .btn-warning.active,
78
+ .btn-danger.active {
79
+ -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
80
+ box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
81
+ }
82
+
83
+ .btn:active,
84
+ .btn.active {
85
+ background-image: none;
86
+ }
87
+
88
+ .btn:hover {
89
+ text-decoration: none;
90
+ background-position: 0 -15px;
91
+ -webkit-transition: background-position 0.1s linear;
92
+ -moz-transition: background-position 0.1s linear;
93
+ -o-transition: background-position 0.1s linear;
94
+ transition: background-position 0.1s linear;
95
+ }
96
+
97
+ .btn-default {
98
+ background-color: hsl(0, 0%, 87%) !important;
99
+ background-repeat: repeat-x;
100
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#f7f7f7", endColorstr="#dddddd");
101
+ background-image: -khtml-gradient(linear, left top, left bottom, from(#f7f7f7), to(#dddddd));
102
+ background-image: -moz-linear-gradient(top, #f7f7f7, #dddddd);
103
+ background-image: -ms-linear-gradient(top, #f7f7f7, #dddddd);
104
+ background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #f7f7f7), color-stop(100%, #dddddd));
105
+ background-image: -webkit-linear-gradient(top, #f7f7f7, #dddddd);
106
+ background-image: -o-linear-gradient(top, #f7f7f7, #dddddd);
107
+ background-image: linear-gradient(#f7f7f7, #dddddd);
108
+ border-color: #dddddd #dddddd hsl(0, 0%, 84.5%);
109
+ color: #333 !important;
110
+ text-shadow: 0 1px 1px rgba(255, 255, 255, 0.16);
111
+ -webkit-font-smoothing: antialiased;
112
+ }
113
+
114
+ .btn-default:active,
115
+ .btn-default.active {
116
+ background-color: #e6e6e6;
117
+ border-color: #e0e0e0;
118
+ }
119
+ .btn-default:hover {
120
+ border-color: #cdcdcd;
121
+ }
122
+
123
+ .btn-primary {
124
+ background-color: hsl(208, 56%, 40%) !important;
125
+ background-repeat: repeat-x;
126
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#3884c6", endColorstr="#2c699f");
127
+ background-image: -khtml-gradient(linear, left top, left bottom, from(#3884c6), to(#2c699f));
128
+ background-image: -moz-linear-gradient(top, #3884c6, #2c699f);
129
+ background-image: -ms-linear-gradient(top, #3884c6, #2c699f);
130
+ background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #3884c6), color-stop(100%, #2c699f));
131
+ background-image: -webkit-linear-gradient(top, #3884c6, #2c699f);
132
+ background-image: -o-linear-gradient(top, #3884c6, #2c699f);
133
+ background-image: linear-gradient(#3884c6, #2c699f);
134
+ border-color: #2c699f #2c699f hsl(208, 56%, 37.5%);
135
+ color: #fff !important;
136
+ text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.16);
137
+ -webkit-font-smoothing: antialiased;
138
+ }
139
+
140
+ .btn-primary:active,
141
+ .btn-primary.active {
142
+ background-color: #3071a9;
143
+ border-color: #2d6ca2;
144
+ }
145
+
146
+ .btn-success {
147
+ background-color: hsl(120, 40%, 41%) !important;
148
+ background-repeat: repeat-x;
149
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#50b450", endColorstr="#3e923e");
150
+ background-image: -khtml-gradient(linear, left top, left bottom, from(#50b450), to(#3e923e));
151
+ background-image: -moz-linear-gradient(top, #50b450, #3e923e);
152
+ background-image: -ms-linear-gradient(top, #50b450, #3e923e);
153
+ background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #50b450), color-stop(100%, #3e923e));
154
+ background-image: -webkit-linear-gradient(top, #50b450, #3e923e);
155
+ background-image: -o-linear-gradient(top, #50b450, #3e923e);
156
+ background-image: linear-gradient(#50b450, #3e923e);
157
+ border-color: #3e923e #3e923e hsl(120, 40%, 38.5%);
158
+ color: #fff !important;
159
+ text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.16);
160
+ -webkit-font-smoothing: antialiased;
161
+ }
162
+
163
+ .btn-success:active,
164
+ .btn-success.active {
165
+ background-color: #449d44;
166
+ border-color: #419641;
167
+ }
168
+
169
+ .btn-warning {
170
+ background-color: hsl(35, 85%, 49%) !important;
171
+ background-repeat: repeat-x;
172
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#efa53d", endColorstr="#e78e12");
173
+ background-image: -khtml-gradient(linear, left top, left bottom, from(#efa53d), to(#e78e12));
174
+ background-image: -moz-linear-gradient(top, #efa53d, #e78e12);
175
+ background-image: -ms-linear-gradient(top, #efa53d, #e78e12);
176
+ background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #efa53d), color-stop(100%, #e78e12));
177
+ background-image: -webkit-linear-gradient(top, #efa53d, #e78e12);
178
+ background-image: -o-linear-gradient(top, #efa53d, #e78e12);
179
+ background-image: linear-gradient(#efa53d, #e78e12);
180
+ border-color: #e78e12 #e78e12 hsl(35, 85%, 46.5%);
181
+ color: #fff !important;
182
+ text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.16);
183
+ -webkit-font-smoothing: antialiased;
184
+ }
185
+
186
+ .btn-warning:active,
187
+ .btn-warning.active {
188
+ background-color: #ec971f;
189
+ border-color: #eb9316;
190
+ }
191
+
192
+ .btn-danger {
193
+ background-color: hsl(2, 65%, 45%) !important;
194
+ background-repeat: repeat-x;
195
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#d64641", endColorstr="#bd2d28");
196
+ background-image: -khtml-gradient(linear, left top, left bottom, from(#d64641), to(#bd2d28));
197
+ background-image: -moz-linear-gradient(top, #d64641, #bd2d28);
198
+ background-image: -ms-linear-gradient(top, #d64641, #bd2d28);
199
+ background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #d64641), color-stop(100%, #bd2d28));
200
+ background-image: -webkit-linear-gradient(top, #d64641, #bd2d28);
201
+ background-image: -o-linear-gradient(top, #d64641, #bd2d28);
202
+ background-image: linear-gradient(#d64641, #bd2d28);
203
+ border-color: #bd2d28 #bd2d28 hsl(2, 65%, 42.5%);
204
+ color: #fff !important;
205
+ text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.16);
206
+ -webkit-font-smoothing: antialiased;
207
+ }
208
+
209
+ .btn-danger:active,
210
+ .btn-danger.active {
211
+ background-color: #c9302c;
212
+ border-color: #c12e2a;
213
+ }
214
+
215
+ .btn-info {
216
+ background-color: hsl(194, 66%, 48%) !important;
217
+ background-repeat: repeat-x;
218
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#4db9da", endColorstr="#29a5cb");
219
+ background-image: -khtml-gradient(linear, left top, left bottom, from(#4db9da), to(#29a5cb));
220
+ background-image: -moz-linear-gradient(top, #4db9da, #29a5cb);
221
+ background-image: -ms-linear-gradient(top, #4db9da, #29a5cb);
222
+ background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #4db9da), color-stop(100%, #29a5cb));
223
+ background-image: -webkit-linear-gradient(top, #4db9da, #29a5cb);
224
+ background-image: -o-linear-gradient(top, #4db9da, #29a5cb);
225
+ background-image: linear-gradient(#4db9da, #29a5cb);
226
+ border-color: #29a5cb #29a5cb hsl(194, 66%, 45.5%);
227
+ color: #fff !important;
228
+ text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.16);
229
+ -webkit-font-smoothing: antialiased;
230
+ }
231
+
232
+ .btn-info:active,
233
+ .btn-info.active {
234
+ background-color: #31b0d5;
235
+ border-color: #2aabd2;
236
+ }
237
+
238
+
239
+ // original btn style
240
+
241
+ .btn-inverse {
242
+ background-color: hsl(0, 0%, 15%) !important;
243
+ background-repeat: repeat-x;
244
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#3f3f3f", endColorstr="#262626");
245
+ background-image: -khtml-gradient(linear, left top, left bottom, from(#3f3f3f), to(#262626));
246
+ background-image: -moz-linear-gradient(top, #3f3f3f, #262626);
247
+ background-image: -ms-linear-gradient(top, #3f3f3f, #262626);
248
+ background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #3f3f3f), color-stop(100%, #262626));
249
+ background-image: -webkit-linear-gradient(top, #3f3f3f, #262626);
250
+ background-image: -o-linear-gradient(top, #3f3f3f, #262626);
251
+ background-image: linear-gradient(#3f3f3f, #262626);
252
+ border-color: #262626 #262626 hsl(0, 0%, 12.5%);
253
+ color: #fff !important;
254
+ text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.16);
255
+ -webkit-font-smoothing: antialiased;
256
+ }
257
+
258
+ .btn-gaku {
259
+ background-color: hsl(240, 34%, 67%) !important;
260
+ background-repeat: repeat-x;
261
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#a2a2d1", endColorstr="#8e8ec7");
262
+ background-image: -khtml-gradient(linear, left top, left bottom, from(#a2a2d1), to(#8e8ec7));
263
+ background-image: -moz-linear-gradient(top, #a2a2d1, #8e8ec7);
264
+ background-image: -ms-linear-gradient(top, #a2a2d1, #8e8ec7);
265
+ background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #a2a2d1), color-stop(100%, #8e8ec7));
266
+ background-image: -webkit-linear-gradient(top, #a2a2d1, #8e8ec7);
267
+ background-image: -o-linear-gradient(top, #a2a2d1, #8e8ec7);
268
+ background-image: linear-gradient(#a2a2d1, #8e8ec7);
269
+ border-color: #8e8ec7 #8e8ec7 hsl(240, 34%, 65.5%);
270
+ color: #fff !important;
271
+ text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.16);
272
+ -webkit-font-smoothing: antialiased;
273
+ }
274
+
275
+ .thumbnail,
276
+ .img-thumbnail {
277
+ -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.075);
278
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.075);
279
+ }
280
+
281
+ .dropdown-menu > li > a:hover,
282
+ .dropdown-menu > li > a:focus,
283
+ .dropdown-menu > .active > a,
284
+ .dropdown-menu > .active > a:hover,
285
+ .dropdown-menu > .active > a:focus {
286
+ color: #FFF;
287
+ background-color: #357ebd;
288
+ background-image: -webkit-gradient(linear, left 0%, left 100%, from(#428bca), to(#357ebd));
289
+ background-image: -webkit-linear-gradient(top, #428bca, 0%, #357ebd, 100%);
290
+ background-image: -moz-linear-gradient(top, #428bca 0%, #357ebd 100%);
291
+ background-image: linear-gradient(to bottom, #428bca 0%, #357ebd 100%);
292
+ background-repeat: repeat-x;
293
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff357ebd', GradientType=0);
294
+ }
295
+
296
+ .navbar {
297
+ background-image: -webkit-gradient(linear, left 0%, left 100%, from(#ffffff), to(#f8f8f8));
298
+ background-image: -webkit-linear-gradient(top, #ffffff, 0%, #f8f8f8, 100%);
299
+ background-image: -moz-linear-gradient(top, #ffffff 0%, #f8f8f8 100%);
300
+ background-image: linear-gradient(to bottom, #ffffff 0%, #f8f8f8 100%);
301
+ background-repeat: repeat-x;
302
+ border-radius: 4px;
303
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff8f8f8', GradientType=0);
304
+ -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 5px rgba(0, 0, 0, 0.075);
305
+ box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 5px rgba(0, 0, 0, 0.075);
306
+ }
307
+
308
+ .navbar .navbar-nav > .active > a {
309
+ background-color: #f8f8f8;
310
+ }
311
+
312
+ .navbar-brand,
313
+ .navbar-nav > li > a {
314
+ text-shadow: 0 1px 0 rgba(255, 255, 255, 0.25);
315
+ }
316
+
317
+ .navbar-inverse {
318
+ background-image: -webkit-gradient(linear, left 0%, left 100%, from(#3c3c3c), to(#222222));
319
+ background-image: -webkit-linear-gradient(top, #3c3c3c, 0%, #222222, 100%);
320
+ background-image: -moz-linear-gradient(top, #3c3c3c 0%, #222222 100%);
321
+ background-image: linear-gradient(to bottom, #3c3c3c 0%, #222222 100%);
322
+ background-repeat: repeat-x;
323
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3c3c3c', endColorstr='#ff222222', GradientType=0);
324
+ }
325
+
326
+ .navbar-inverse .navbar-nav > .active > a {
327
+ background-color: #222222;
328
+ }
329
+
330
+ .navbar-inverse .navbar-brand,
331
+ .navbar-inverse .navbar-nav > li > a {
332
+ text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
333
+ }
334
+
335
+ .navbar-static-top,
336
+ .navbar-fixed-top,
337
+ .navbar-fixed-bottom {
338
+ border-radius: 0;
339
+ }
340
+
341
+ .alert {
342
+ text-shadow: 0 1px 0 rgba(255, 255, 255, 0.2);
343
+ -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 2px rgba(0, 0, 0, 0.05);
344
+ box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 2px rgba(0, 0, 0, 0.05);
345
+ }
346
+
347
+ .alert-success {
348
+ background-image: -webkit-gradient(linear, left 0%, left 100%, from(#dff0d8), to(#c8e5bc));
349
+ background-image: -webkit-linear-gradient(top, #dff0d8, 0%, #c8e5bc, 100%);
350
+ background-image: -moz-linear-gradient(top, #dff0d8 0%, #c8e5bc 100%);
351
+ background-image: linear-gradient(to bottom, #dff0d8 0%, #c8e5bc 100%);
352
+ background-repeat: repeat-x;
353
+ border-color: #b2dba1;
354
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffc8e5bc', GradientType=0);
355
+ }
356
+
357
+ .alert-info {
358
+ background-image: -webkit-gradient(linear, left 0%, left 100%, from(#d9edf7), to(#b9def0));
359
+ background-image: -webkit-linear-gradient(top, #d9edf7, 0%, #b9def0, 100%);
360
+ background-image: -moz-linear-gradient(top, #d9edf7 0%, #b9def0 100%);
361
+ background-image: linear-gradient(to bottom, #d9edf7 0%, #b9def0 100%);
362
+ background-repeat: repeat-x;
363
+ border-color: #9acfea;
364
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffb9def0', GradientType=0);
365
+ }
366
+
367
+ .alert-warning {
368
+ background-image: -webkit-gradient(linear, left 0%, left 100%, from(#fcf8e3), to(#f8efc0));
369
+ background-image: -webkit-linear-gradient(top, #fcf8e3, 0%, #f8efc0, 100%);
370
+ background-image: -moz-linear-gradient(top, #fcf8e3 0%, #f8efc0 100%);
371
+ background-image: linear-gradient(to bottom, #fcf8e3 0%, #f8efc0 100%);
372
+ background-repeat: repeat-x;
373
+ border-color: #f5e79e;
374
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fff8efc0', GradientType=0);
375
+ }
376
+
377
+ .alert-danger {
378
+ background-image: -webkit-gradient(linear, left 0%, left 100%, from(#f2dede), to(#e7c3c3));
379
+ background-image: -webkit-linear-gradient(top, #f2dede, 0%, #e7c3c3, 100%);
380
+ background-image: -moz-linear-gradient(top, #f2dede 0%, #e7c3c3 100%);
381
+ background-image: linear-gradient(to bottom, #f2dede 0%, #e7c3c3 100%);
382
+ background-repeat: repeat-x;
383
+ border-color: #dca7a7;
384
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffe7c3c3', GradientType=0);
385
+ }
386
+
387
+ .progress {
388
+ background-image: -webkit-gradient(linear, left 0%, left 100%, from(#ebebeb), to(#f5f5f5));
389
+ background-image: -webkit-linear-gradient(top, #ebebeb, 0%, #f5f5f5, 100%);
390
+ background-image: -moz-linear-gradient(top, #ebebeb 0%, #f5f5f5 100%);
391
+ background-image: linear-gradient(to bottom, #ebebeb 0%, #f5f5f5 100%);
392
+ background-repeat: repeat-x;
393
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff5f5f5', GradientType=0);
394
+ }
395
+
396
+ .progress-bar {
397
+ background-image: -webkit-gradient(linear, left 0%, left 100%, from(#428bca), to(#3071a9));
398
+ background-image: -webkit-linear-gradient(top, #428bca, 0%, #3071a9, 100%);
399
+ background-image: -moz-linear-gradient(top, #428bca 0%, #3071a9 100%);
400
+ background-image: linear-gradient(to bottom, #428bca 0%, #3071a9 100%);
401
+ background-repeat: repeat-x;
402
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff3071a9', GradientType=0);
403
+ }
404
+
405
+ .progress-bar-success {
406
+ background-image: -webkit-gradient(linear, left 0%, left 100%, from(#5cb85c), to(#449d44));
407
+ background-image: -webkit-linear-gradient(top, #5cb85c, 0%, #449d44, 100%);
408
+ background-image: -moz-linear-gradient(top, #5cb85c 0%, #449d44 100%);
409
+ background-image: linear-gradient(to bottom, #5cb85c 0%, #449d44 100%);
410
+ background-repeat: repeat-x;
411
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff449d44', GradientType=0);
412
+ }
413
+
414
+ .progress-bar-info {
415
+ background-image: -webkit-gradient(linear, left 0%, left 100%, from(#5bc0de), to(#31b0d5));
416
+ background-image: -webkit-linear-gradient(top, #5bc0de, 0%, #31b0d5, 100%);
417
+ background-image: -moz-linear-gradient(top, #5bc0de 0%, #31b0d5 100%);
418
+ background-image: linear-gradient(to bottom, #5bc0de 0%, #31b0d5 100%);
419
+ background-repeat: repeat-x;
420
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff31b0d5', GradientType=0);
421
+ }
422
+
423
+ .progress-bar-warning {
424
+ background-image: -webkit-gradient(linear, left 0%, left 100%, from(#f0ad4e), to(#ec971f));
425
+ background-image: -webkit-linear-gradient(top, #f0ad4e, 0%, #ec971f, 100%);
426
+ background-image: -moz-linear-gradient(top, #f0ad4e 0%, #ec971f 100%);
427
+ background-image: linear-gradient(to bottom, #f0ad4e 0%, #ec971f 100%);
428
+ background-repeat: repeat-x;
429
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffec971f', GradientType=0);
430
+ }
431
+
432
+ .progress-bar-danger {
433
+ background-image: -webkit-gradient(linear, left 0%, left 100%, from(#d9534f), to(#c9302c));
434
+ background-image: -webkit-linear-gradient(top, #d9534f, 0%, #c9302c, 100%);
435
+ background-image: -moz-linear-gradient(top, #d9534f 0%, #c9302c 100%);
436
+ background-image: linear-gradient(to bottom, #d9534f 0%, #c9302c 100%);
437
+ background-repeat: repeat-x;
438
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc9302c', GradientType=0);
439
+ }
440
+
441
+ .list-group {
442
+ border-radius: 4px;
443
+ -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.075);
444
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.075);
445
+ }
446
+
447
+ .list-group-item.active,
448
+ .list-group-item.active:hover,
449
+ .list-group-item.active:focus {
450
+ text-shadow: 0 -1px 0 #3071a9;
451
+ background-image: -webkit-gradient(linear, left 0%, left 100%, from(#428bca), to(#3278b3));
452
+ background-image: -webkit-linear-gradient(top, #428bca, 0%, #3278b3, 100%);
453
+ background-image: -moz-linear-gradient(top, #428bca 0%, #3278b3 100%);
454
+ background-image: linear-gradient(to bottom, #428bca 0%, #3278b3 100%);
455
+ background-repeat: repeat-x;
456
+ border-color: #3278b3;
457
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff3278b3', GradientType=0);
458
+ }
459
+
460
+ .panel {
461
+ -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
462
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
463
+ }
464
+
465
+ .panel-default > .panel-heading {
466
+ background-image: -webkit-gradient(linear, left 0%, left 100%, from(#f5f5f5), to(#e8e8e8));
467
+ background-image: -webkit-linear-gradient(top, #f5f5f5, 0%, #e8e8e8, 100%);
468
+ background-image: -moz-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);
469
+ background-image: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%);
470
+ background-repeat: repeat-x;
471
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);
472
+ }
473
+
474
+ .panel-primary > .panel-heading {
475
+ background-image: -webkit-gradient(linear, left 0%, left 100%, from(#428bca), to(#357ebd));
476
+ background-image: -webkit-linear-gradient(top, #428bca, 0%, #357ebd, 100%);
477
+ background-image: -moz-linear-gradient(top, #428bca 0%, #357ebd 100%);
478
+ background-image: linear-gradient(to bottom, #428bca 0%, #357ebd 100%);
479
+ background-repeat: repeat-x;
480
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff357ebd', GradientType=0);
481
+ }
482
+
483
+ .panel-success > .panel-heading {
484
+ background-image: -webkit-gradient(linear, left 0%, left 100%, from(#dff0d8), to(#d0e9c6));
485
+ background-image: -webkit-linear-gradient(top, #dff0d8, 0%, #d0e9c6, 100%);
486
+ background-image: -moz-linear-gradient(top, #dff0d8 0%, #d0e9c6 100%);
487
+ background-image: linear-gradient(to bottom, #dff0d8 0%, #d0e9c6 100%);
488
+ background-repeat: repeat-x;
489
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffd0e9c6', GradientType=0);
490
+ }
491
+
492
+ .panel-info > .panel-heading {
493
+ background-image: -webkit-gradient(linear, left 0%, left 100%, from(#d9edf7), to(#c4e3f3));
494
+ background-image: -webkit-linear-gradient(top, #d9edf7, 0%, #c4e3f3, 100%);
495
+ background-image: -moz-linear-gradient(top, #d9edf7 0%, #c4e3f3 100%);
496
+ background-image: linear-gradient(to bottom, #d9edf7 0%, #c4e3f3 100%);
497
+ background-repeat: repeat-x;
498
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffc4e3f3', GradientType=0);
499
+ }
500
+
501
+ .panel-warning > .panel-heading {
502
+ background-image: -webkit-gradient(linear, left 0%, left 100%, from(#fcf8e3), to(#faf2cc));
503
+ background-image: -webkit-linear-gradient(top, #fcf8e3, 0%, #faf2cc, 100%);
504
+ background-image: -moz-linear-gradient(top, #fcf8e3 0%, #faf2cc 100%);
505
+ background-image: linear-gradient(to bottom, #fcf8e3 0%, #faf2cc 100%);
506
+ background-repeat: repeat-x;
507
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fffaf2cc', GradientType=0);
508
+ }
509
+
510
+ .panel-danger > .panel-heading {
511
+ background-image: -webkit-gradient(linear, left 0%, left 100%, from(#f2dede), to(#ebcccc));
512
+ background-image: -webkit-linear-gradient(top, #f2dede, 0%, #ebcccc, 100%);
513
+ background-image: -moz-linear-gradient(top, #f2dede 0%, #ebcccc 100%);
514
+ background-image: linear-gradient(to bottom, #f2dede 0%, #ebcccc 100%);
515
+ background-repeat: repeat-x;
516
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffebcccc', GradientType=0);
517
+ }
518
+
519
+ .well {
520
+ background-image: -webkit-gradient(linear, left 0%, left 100%, from(#e8e8e8), to(#f5f5f5));
521
+ background-image: -webkit-linear-gradient(top, #e8e8e8, 0%, #f5f5f5, 100%);
522
+ background-image: -moz-linear-gradient(top, #e8e8e8 0%, #f5f5f5 100%);
523
+ background-image: linear-gradient(to bottom, #e8e8e8 0%, #f5f5f5 100%);
524
+ background-repeat: repeat-x;
525
+ border-color: #dcdcdc;
526
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe8e8e8', endColorstr='#fff5f5f5', GradientType=0);
527
+ -webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 0 rgba(255, 255, 255, 0.1);
528
+ box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 0 rgba(255, 255, 255, 0.1);
529
+ }
530
+
531
+ // for autocomplete
532
+ .ui-autocomplete {
533
+ position: absolute;
534
+ top: 100%;
535
+ left: 0;
536
+ z-index: 1000;
537
+ display: none;
538
+ float: left;
539
+ min-width: 160px;
540
+ padding: 5px 0;
541
+ margin: 2px 0 0;
542
+ font-size: 14px;
543
+ list-style: none;
544
+ background-color: #FFF;
545
+ border: 1px solid #CCC;
546
+ border: 1px solid rgba(0, 0, 0, 0.15);
547
+ border-radius: 4px;
548
+ -webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
549
+ box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
550
+ background-clip: padding-box;
551
+
552
+ font-size: 14px;
553
+ list-style: none;
554
+ &>li>a{
555
+ display: block;
556
+ padding: 3px 12px;
557
+ clear: both;
558
+ font-weight: normal;
559
+ line-height: 1.428571429;
560
+ color: #333;
561
+ white-space: nowrap;
562
+ &:hover, :focus, .dropdown-menu > .active > a, .dropdown-menu > .active > a:hover, .dropdown-menu > .active > a:focus {
563
+ color: #FFF;
564
+ text-decoration: none;
565
+ background-color: #428BCA;
566
+ background-color: #357EBD;
567
+ background-image: -webkit-gradient(linear, left 0%, left 100%, from(#428BCA), to(#357EBD));
568
+ background-image: -webkit-linear-gradient(top, #428bca, 0%, #357ebd, 100%);
569
+ background-image: -moz-linear-gradient(top, #428bca 0%, #357ebd 100%);
570
+ background-image: linear-gradient(to bottom, #428BCA 0%, #357EBD 100%);
571
+ background-repeat: repeat-x;
572
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff357ebd', GradientType=0); }
573
+ }
574
+ }
@@ -0,0 +1,23 @@
1
+ module Gaku
2
+ class Courses::Exams::ExamPortionScoresController < GakuController
3
+
4
+ respond_to :js
5
+
6
+ def update
7
+ @exam_portion_score = ExamPortionScore.find(params[:id])
8
+ @exam_portion_score.update_attributes(exam_portion_score_params)
9
+
10
+ respond_with @exam_portion_score
11
+ end
12
+
13
+ private
14
+
15
+ def exam_portion_score_params
16
+ params.require(:exam_portion_score).permit(attributes)
17
+ end
18
+
19
+ def attributes
20
+ %i( score )
21
+ end
22
+ end
23
+ end