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
@@ -0,0 +1,16 @@
1
+ table.grading.grading-calculations.table.table-bordered.table-condensed
2
+ thead
3
+ tr
4
+ th.btn-inverse Total & Grade
5
+ tbody
6
+ - @students.each do |student|
7
+ = tr_for student do
8
+ td
9
+ - p "student dayo-"
10
+ - p student
11
+ - p "exam dayo-"
12
+ - p @exam
13
+ - p "student_total_scores dayo-"
14
+ - p @student_total_scores
15
+
16
+ = @student_exams_total_score[:raw][@exam.id][student.id]
@@ -0,0 +1,78 @@
1
+ table.grading.grading-exam-portions.table.table-bordered.table-condensed
2
+ thead
3
+ tr
4
+ - @exam.exam_portions.each do |portion|
5
+ th.btn-warning style="width: 80px"
6
+ = portion.name
7
+ - if @exam.use_weighting
8
+ span style='margin-left: 5px'
9
+ = portion.max_score
10
+ tbody
11
+ - @students.each do |student|
12
+ = tr_for student do
13
+ - @exam.exam_portions.each do |portion|
14
+ - portion.exam_portion_scores.each do |score|
15
+ - if score.student_id == student.id
16
+ td
17
+ = form_for [@course, @exam, score], remote: true do |f|
18
+ = f.text_field :score
19
+
20
+
21
+
22
+
23
+ / course_exam_exam_portion_scores GET /courses/:course_id/exams/:exam_id/exam_portion_scores(.:format) gaku/exam_portion_scores#index
24
+
25
+
26
+ / <table class='exam-parts table table-bordered table-condensed'>
27
+ / <thead>
28
+ / <tr>
29
+ / <% for exam in @exams: %>
30
+ / <% for portion in exam.exam_portions: %>
31
+ / <% if exam.use_weighting : %>
32
+ / <th class='btn-warning' style="width: 80px"> 【 <%= portion.name %> 】 </th>
33
+ / <% else : %>
34
+ / <th class='btn-warning' style="width: 80px"> 【 <%= portion.name %> 】
35
+ / <%= portion.max_score %>
36
+ / </th>
37
+ / <% end %>
38
+ / <% end %>
39
+ / <% end %>
40
+ / </tr>
41
+ / </thead>
42
+ / <tbody>
43
+ / <% for student in @students: %>
44
+ / <tr class='student_<%= student.id %>'>
45
+ / <% for exam in @exams: %>
46
+ / <% for portion in exam.exam_portions: %>
47
+ / <% for score in portion.exam_portion_scores: %>
48
+ / <% if score.student_id == student.id : %>
49
+ / <td class='score-column' id='exam-portion-score-<%= score.id %>' align="left">
50
+ / <form class='portion_score_update span12' style="float: left; padding-right: 50px" name="input" action="<%= @path_to_exam %>/exams/<%= exam.id %>/exam_portion_scores/<%= score.id %>" method="post" data-max-score='<%= portion.max_score %>'>
51
+ / <div class='exam-portion-<%= portion.id %>'>
52
+
53
+ / <% if @attendances[student.id][score.id][0] : %>
54
+ / <input class="score-cell" style="text-align:right; margin-bottom:0px; background-color: <%= @attendances[student.id][score.id][1] %>" name='portion_score' type='number' value='<%= score.score %>'id='score-<%= score.id %>' disabled />
55
+ / <% else : %>
56
+ / <input class="score-cell" style="text-align:right; margin-bottom:0px" name='portion_score' type='number' value='<%= score.score %>' id='score-<%= score.id %>' />
57
+ / <% end %>
58
+ / </div>
59
+ / </form>
60
+ / <div class="portion_set_attendance pull-right btn" id="portion-score-<%= score.id %>" rel ='popover' style="margin-left: -50px" targetinputelement='score-<%= exam.id %>-<%= portion.id %>-<%= student.id %>' action="<%= @path_to_exam %>/exams/<%= exam.id %>/exam_portion_scores/<%= score.id %>" data-attendance="<%= @attendances[student.id][score.id][0] %>" >
61
+ / <i class="icon-chair"></i>
62
+ / </div>
63
+ / </td>
64
+ / <% end %>
65
+ / <% end %>
66
+ / <% end %>
67
+ / <% end %>
68
+ / </tr>
69
+ / <% end %>
70
+ / <tr class='total_row'>
71
+ / <% for exam in @exams: %>
72
+ / <th class='btn-primary' colspan="<%= exam.exam_portions.length %>">
73
+ / Avarages:
74
+ / </th>
75
+ / <% end %>
76
+ / </tr>
77
+ / </tbody>
78
+ / </table>
@@ -0,0 +1,12 @@
1
+ table.grading.grading-students.table.table-bordered.table-condensed
2
+ thead
3
+ tr
4
+ th.btn-info style="width:60px" Class
5
+ th.btn-info style="width:60px" Seat_Number
6
+ th.btn-info style="width:150px" Name
7
+ tbody
8
+ - students.each do |student|
9
+ = tr_for student do
10
+ td.vm-tc
11
+ td.vm-tc
12
+ td.vm = student.full_name
@@ -0,0 +1,38 @@
1
+ .row
2
+ .col-md-12
3
+
4
+ table.grading.main-grading.table.table-bordered.table-condensed
5
+ thead
6
+ tr
7
+ th.btn-primary Students
8
+ th.btn-success colspan='2' = @exam.name
9
+ tbody
10
+ tbody
11
+ tr
12
+ td.grading-students-td
13
+ = render 'gaku/courses/exams/grading/students', students: @students
14
+ td.grading-exam-scores-td
15
+ = render 'gaku/courses/exams/grading/exam_scores'
16
+ td.grading-calculations-td
17
+ = render 'gaku/courses/exams/grading/calculations'
18
+
19
+
20
+
21
+ table.table.table-bordered
22
+ tr
23
+ td colspan="3"
24
+ td colspan="3"
25
+ tr
26
+ td
27
+ td
28
+ td
29
+ td
30
+ td
31
+ td
32
+ tr
33
+ td
34
+ td
35
+ td
36
+ td
37
+ td
38
+ td
@@ -0,0 +1,25 @@
1
+ doctype 5
2
+ html
3
+ head
4
+ = favicon_link_tag 'gakuengine20.png'
5
+ title
6
+ = content_for?(:title) ? yield(:title) + " | GAKU" : "GAKU"
7
+ = javascript_tag '$.fx.off = true;' if Rails.env.test?
8
+ = stylesheet_link_tag "gaku/all"
9
+ = javascript_include_tag "gaku/all"
10
+ = javascript_include_tag "http://localhost:9292/faye.js"
11
+
12
+
13
+ = csrf_meta_tags
14
+ body data-action=current_controller_action data-parent-controller=current_parent_controller
15
+ .container
16
+ = render 'gaku/shared/modal_config'
17
+ = render 'gaku/shared/menubar'
18
+ #notice
19
+ - unless flash.empty?
20
+ = render "gaku/shared/flash", flash: flash
21
+ #errors
22
+
23
+ #modal-dialogs
24
+
25
+ = content_for?(:content) ? yield(:content) : yield
@@ -1,2 +1,2 @@
1
1
  <ul class="nav navbar-nav" id="menu" data-hook="menu">
2
- </ul>ul>
2
+ </ul>