mumuki-laboratory 9.0.3 → 9.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (171) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/mumuki_laboratory/application/codemirror.js +10 -2
  3. data/app/assets/javascripts/mumuki_laboratory/application/discussions.js +49 -8
  4. data/app/assets/javascripts/mumuki_laboratory/application/gamification.js +3 -3
  5. data/app/assets/javascripts/mumuki_laboratory/application/kids.js +11 -7
  6. data/app/assets/javascripts/mumuki_laboratory/application/kindergarten.js +3 -3
  7. data/app/assets/javascripts/mumuki_laboratory/application/messages.js +3 -3
  8. data/app/assets/javascripts/mumuki_laboratory/application/mu-modal-carrousel.js +4 -4
  9. data/app/assets/javascripts/mumuki_laboratory/application/multiple-files.js +18 -5
  10. data/app/assets/javascripts/mumuki_laboratory/application/multiple-scenarios.js +1 -1
  11. data/app/assets/javascripts/mumuki_laboratory/application/organization.js +32 -0
  12. data/app/assets/javascripts/mumuki_laboratory/application/primary.js +4 -4
  13. data/app/assets/javascripts/mumuki_laboratory/application/profile.js +0 -6
  14. data/app/assets/javascripts/mumuki_laboratory/application/progress.js +1 -1
  15. data/app/assets/javascripts/mumuki_laboratory/application/speech-bubble-renderer.js +1 -1
  16. data/app/assets/javascripts/mumuki_laboratory/application/submission.js +4 -3
  17. data/app/assets/javascripts/mumuki_laboratory/application/submissions-store.js +1 -1
  18. data/app/assets/javascripts/mumuki_laboratory/application/toast.js +3 -0
  19. data/app/assets/javascripts/mumuki_laboratory/application/tooltip.js +1 -1
  20. data/app/assets/javascripts/mumuki_laboratory/application/upload.js +2 -2
  21. data/app/assets/javascripts/mumuki_laboratory/application/user.js +34 -1
  22. data/app/assets/stylesheets/mumuki_laboratory/application.scss +0 -1
  23. data/app/assets/stylesheets/mumuki_laboratory/application/_errors.scss +1 -1
  24. data/app/assets/stylesheets/mumuki_laboratory/application/_layout.scss +1 -27
  25. data/app/assets/stylesheets/mumuki_laboratory/application/_modules.scss +1 -2
  26. data/app/assets/stylesheets/mumuki_laboratory/application/modules/_activity.scss +14 -0
  27. data/app/assets/stylesheets/mumuki_laboratory/application/modules/_avatar.scss +5 -0
  28. data/app/assets/stylesheets/mumuki_laboratory/application/modules/_breadcrumb.scss +2 -2
  29. data/app/assets/stylesheets/mumuki_laboratory/application/modules/_datepicker.scss +0 -4
  30. data/app/assets/stylesheets/mumuki_laboratory/application/modules/_discussion.scss +49 -59
  31. data/app/assets/stylesheets/mumuki_laboratory/application/modules/_editor.scss +16 -18
  32. data/app/assets/stylesheets/mumuki_laboratory/application/modules/_exercise_assignment.scss +2 -11
  33. data/app/assets/stylesheets/mumuki_laboratory/application/modules/_exercise_results.scss +1 -7
  34. data/app/assets/stylesheets/mumuki_laboratory/application/modules/_faqs.scss +3 -3
  35. data/app/assets/stylesheets/mumuki_laboratory/application/modules/_flash.scss +7 -46
  36. data/app/assets/stylesheets/mumuki_laboratory/application/modules/_kids.scss +19 -4
  37. data/app/assets/stylesheets/mumuki_laboratory/application/modules/_kids_results.scss +18 -23
  38. data/app/assets/stylesheets/mumuki_laboratory/application/modules/_kindergarten.scss +1 -9
  39. data/app/assets/stylesheets/mumuki_laboratory/application/modules/_overlap.scss +1 -1
  40. data/app/assets/stylesheets/mumuki_laboratory/application/modules/_progress_bar.scss +5 -5
  41. data/app/assets/stylesheets/mumuki_laboratory/application/modules/_terms.scss +3 -2
  42. data/app/assets/stylesheets/mumuki_laboratory/application/modules/_timer.scss +1 -3
  43. data/app/assets/stylesheets/mumuki_laboratory/application/modules/_user_menu.scss +14 -7
  44. data/app/assets/stylesheets/mumuki_laboratory/application/modules/_user_profile.scss +1 -2
  45. data/app/controllers/application_controller.rb +4 -2
  46. data/app/controllers/discussions_messages_controller.rb +9 -3
  47. data/app/controllers/users_controller.rb +13 -0
  48. data/app/helpers/application_helper.rb +5 -5
  49. data/app/helpers/assignment_result_helper.rb +3 -2
  50. data/app/helpers/assistance_box_helper.rb +1 -1
  51. data/app/helpers/concerns/with_student_path_navigation.rb +8 -3
  52. data/app/helpers/concerns/with_student_path_navigation/continue_navigation.rb +1 -1
  53. data/app/helpers/concerns/with_student_path_navigation/finish_navigation.rb +1 -1
  54. data/app/helpers/concerns/with_student_path_navigation/next_parent_navigation.rb +7 -0
  55. data/app/helpers/concerns/with_student_path_navigation/revisit_navigation.rb +1 -1
  56. data/app/helpers/discussions_helper.rb +64 -23
  57. data/app/helpers/editor_tabs_helper.rb +10 -6
  58. data/app/helpers/email_helper.rb +2 -2
  59. data/app/helpers/exercise_input_helper.rb +2 -3
  60. data/app/helpers/links_helper.rb +12 -9
  61. data/app/helpers/menu_bar_helper.rb +1 -1
  62. data/app/helpers/messages_helper.rb +1 -1
  63. data/app/helpers/multiple_file_editor_helper.rb +2 -1
  64. data/app/helpers/overlapped_buttons_helper.rb +22 -12
  65. data/app/helpers/profile_helper.rb +3 -3
  66. data/app/helpers/toast_helper.rb +27 -0
  67. data/app/helpers/user_activity_helper.rb +48 -0
  68. data/app/helpers/user_menu_helper.rb +4 -0
  69. data/app/views/book/show.html.erb +2 -2
  70. data/app/views/certificates/verify.html.erb +1 -1
  71. data/app/views/chapters/show.html.erb +2 -2
  72. data/app/views/discussions/_description_message.html.erb +1 -1
  73. data/app/views/discussions/_message.html.erb +32 -7
  74. data/app/views/discussions/_new_message.html.erb +13 -2
  75. data/app/views/discussions/index.html.erb +8 -10
  76. data/app/views/discussions/new.html.erb +2 -2
  77. data/app/views/discussions/show.html.erb +20 -12
  78. data/app/views/exam_registrations/show.html.erb +10 -11
  79. data/app/views/exercise_solutions/_assistant_rules_box.html.erb +1 -1
  80. data/app/views/exercise_solutions/_contextualization_results_body.html.erb +1 -1
  81. data/app/views/exercise_solutions/_contextualization_results_container.html.erb +1 -1
  82. data/app/views/exercise_solutions/_kids_results_button.html.erb +2 -2
  83. data/app/views/exercise_solutions/_results.html.erb +1 -1
  84. data/app/views/exercises/_exercise_assignment.html.erb +2 -2
  85. data/app/views/exercises/_exercise_skipped.html.erb +1 -1
  86. data/app/views/exercises/_read_only.html.erb +108 -105
  87. data/app/views/exercises/show.html.erb +7 -7
  88. data/app/views/guides/_guide.html.erb +1 -1
  89. data/app/views/guides/_guide_container.html.erb +4 -4
  90. data/app/views/invitations/_invitation_form.html.erb +5 -4
  91. data/app/views/layouts/_authoring.html.erb +1 -1
  92. data/app/views/layouts/_discussions.html.erb +7 -7
  93. data/app/views/layouts/_kids.html.erb +5 -5
  94. data/app/views/layouts/_kindergarten.html.erb +10 -6
  95. data/app/views/layouts/_main.html.erb +10 -10
  96. data/app/views/layouts/_organizations_listing.html.erb +2 -2
  97. data/app/views/layouts/_progress_bar.html.erb +2 -0
  98. data/app/views/layouts/_submission_result_error.html.erb +1 -1
  99. data/app/views/layouts/_test_results.html.erb +1 -1
  100. data/app/views/layouts/_timer.html.erb +1 -1
  101. data/app/views/layouts/_user_menu.html.erb +4 -3
  102. data/app/views/layouts/application.html.erb +39 -42
  103. data/app/views/layouts/exercise_inputs/editors/_code.html.erb +4 -4
  104. data/app/views/layouts/exercise_inputs/editors/_free_form.html.erb +1 -1
  105. data/app/views/layouts/exercise_inputs/editors/_multiple_choice.html.erb +7 -9
  106. data/app/views/layouts/exercise_inputs/editors/_multiple_files.html.erb +10 -10
  107. data/app/views/layouts/exercise_inputs/editors/_single_choice.html.erb +6 -8
  108. data/app/views/layouts/exercise_inputs/editors/_text.html.erb +2 -3
  109. data/app/views/layouts/exercise_inputs/editors/_upload.html.erb +5 -5
  110. data/app/views/layouts/exercise_inputs/forms/_form.html.erb +1 -1
  111. data/app/views/layouts/exercise_inputs/forms/_interactive_form.html.erb +2 -2
  112. data/app/views/layouts/exercise_inputs/forms/_kids_form.html.erb +1 -1
  113. data/app/views/layouts/exercise_inputs/forms/_playground_form.html.erb +2 -2
  114. data/app/views/layouts/exercise_inputs/forms/_problem_form.html.erb +13 -9
  115. data/app/views/layouts/exercise_inputs/layouts/_input_primary.html.erb +2 -2
  116. data/app/views/layouts/exercise_inputs/layouts/_input_right.html.erb +2 -2
  117. data/app/views/layouts/exercise_inputs/read_only_editors/_code.html.erb +1 -1
  118. data/app/views/layouts/exercise_inputs/read_only_editors/_free_form.html.erb +1 -1
  119. data/app/views/layouts/exercise_inputs/read_only_editors/_multiple_choice.html.erb +4 -4
  120. data/app/views/layouts/exercise_inputs/read_only_editors/_multiple_files.html.erb +2 -2
  121. data/app/views/layouts/exercise_inputs/read_only_editors/_single_choice.html.erb +4 -4
  122. data/app/views/layouts/exercise_inputs/read_only_editors/_text.erb +1 -1
  123. data/app/views/layouts/modals/_avatar_picker.html.erb +2 -5
  124. data/app/views/layouts/modals/_guide_corollary.html.erb +4 -8
  125. data/app/views/layouts/modals/_kids_context.html.erb +7 -5
  126. data/app/views/layouts/modals/_kids_results.html.erb +2 -2
  127. data/app/views/layouts/modals/_kids_results_aborted.html.erb +2 -2
  128. data/app/views/layouts/modals/_kindergarten_context.html.erb +3 -3
  129. data/app/views/layouts/modals/_kindergarten_results.html.erb +3 -3
  130. data/app/views/layouts/modals/_kindergarten_results_aborted.html.erb +2 -2
  131. data/app/views/layouts/modals/_level_up.html.erb +2 -5
  132. data/app/views/layouts/modals/_new_message.html.erb +5 -5
  133. data/app/views/notifications/_dropdown.html.erb +3 -3
  134. data/app/views/users/_activity_indicator.html.erb +17 -0
  135. data/app/views/users/_edit_user_form.html.erb +6 -6
  136. data/app/views/users/_profile_fields.html.erb +6 -6
  137. data/app/views/users/_user_form.html.erb +2 -2
  138. data/app/views/users/activity.html.erb +37 -0
  139. data/app/views/users/certificates.html.erb +26 -24
  140. data/app/views/users/discussions.html.erb +23 -21
  141. data/app/views/users/messages.html.erb +22 -20
  142. data/app/views/users/show.html.erb +5 -3
  143. data/app/views/users/terms.html.erb +4 -2
  144. data/config/initializers/inflections.rb +3 -0
  145. data/config/routes.rb +3 -0
  146. data/lib/mumuki/laboratory.rb +1 -1
  147. data/lib/mumuki/laboratory/extensions.rb +1 -0
  148. data/lib/mumuki/laboratory/extensions/date_and_time.rb +11 -0
  149. data/lib/mumuki/laboratory/locales/en.yml +28 -2
  150. data/lib/mumuki/laboratory/locales/es-CL.yml +33 -4
  151. data/lib/mumuki/laboratory/locales/es.yml +33 -4
  152. data/lib/mumuki/laboratory/locales/pt.yml +34 -3
  153. data/lib/mumuki/laboratory/version.rb +1 -1
  154. data/spec/capybara_helper.rb +1 -0
  155. data/spec/controllers/discussions_messages_controller_spec.rb +84 -3
  156. data/spec/dummy/db/schema.rb +23 -3
  157. data/spec/features/discussion_flow_spec.rb +22 -2
  158. data/spec/features/exercise_flow_spec.rb +1 -1
  159. data/spec/features/guide_reset_spec.rb +1 -1
  160. data/spec/features/terms_flow_spec.rb +1 -2
  161. data/spec/features/user_activity_flow_spec.rb +65 -0
  162. data/spec/helpers/breadcrumbs_helper_spec.rb +2 -2
  163. data/spec/helpers/user_activity_helper_spec.rb +32 -0
  164. data/spec/helpers/with_navigation_spec.rb +36 -13
  165. data/spec/javascripts/editors-spec.js +3 -3
  166. data/spec/javascripts/kids-button-spec.js +2 -2
  167. data/spec/javascripts/upload-spec.js +8 -8
  168. metadata +133 -123
  169. data/app/assets/stylesheets/mumuki_laboratory/application/hovers.scss +0 -12
  170. data/app/assets/stylesheets/mumuki_laboratory/application/modules/_checkboxes.scss +0 -34
  171. data/app/assets/stylesheets/mumuki_laboratory/application/modules/_guide_corollary.scss +0 -9
@@ -94,7 +94,7 @@ mumuki.SubmissionsStore = (() => {
94
94
  }
95
95
 
96
96
  _keyFor(exerciseId) {
97
- return `/exercise/${exerciseId}/submission`;
97
+ return `/organization/${mumuki.organization.id}/user/${mumuki.user.id}/exercise/${exerciseId}/submission`;
98
98
  }
99
99
  }();
100
100
 
@@ -0,0 +1,3 @@
1
+ mumuki.load(() => {
2
+ document.querySelectorAll('.toast').forEach((toast) => new bootstrap.Toast(toast).show());
3
+ });
@@ -1,3 +1,3 @@
1
1
  mumuki.load(() => {
2
- $('[title]').tooltip();
2
+ document.querySelectorAll('[data-bs-toggle="tooltip"]').forEach((tooltip) => new bootstrap.Tooltip(tooltip));
3
3
  });
@@ -35,14 +35,14 @@ mumuki.upload = (() => {
35
35
  }
36
36
 
37
37
  showFileExceedsMaxSize() {
38
- this.$uploadFileLimitExceeded.removeClass('hidden');
38
+ this.$uploadFileLimitExceeded.removeClass('d-none');
39
39
  this.$uploadLabel.text(this.$uploadLabelText);
40
40
  this.$uploadIcon.addClass('fa-upload').removeClass('fa-file-alt');
41
41
  this.$btnSubmit.addClass('disabled');
42
42
  }
43
43
 
44
44
  allowSubmissionFor(filename) {
45
- this.$uploadFileLimitExceeded.addClass('hidden');
45
+ this.$uploadFileLimitExceeded.addClass('d-none');
46
46
  this.$uploadLabel.text(filename);
47
47
  this.$uploadIcon.removeClass('fa-upload').addClass('fa-file-alt');
48
48
  this.$btnSubmit.removeClass('disabled');
@@ -1,9 +1,40 @@
1
+ mumuki.user = {
2
+
3
+ /**
4
+ * The current user's id
5
+ *
6
+ * @type {number?}
7
+ * */
8
+ _id: null,
9
+
10
+ /**
11
+ * The current user's id
12
+ *
13
+ * @type {number?}
14
+ * */
15
+ get id() {
16
+ return this._id;
17
+ },
18
+
19
+ /**
20
+ * Set global current user information
21
+ */
22
+ load() {
23
+ const $muUserId = $('#mu-user-id');
24
+ if ($muUserId.length) {
25
+ this._id = $muUserId.val();
26
+ } else {
27
+ this._id = null;
28
+ }
29
+ }
30
+ };
31
+
1
32
  mumuki.load(() => {
2
33
  const $userMenuHeader = $('.mu-user-menu-header');
3
34
  let onUserProfile = document.querySelector('.mu-profile-info') !== null;
4
35
 
5
36
  $userMenuHeader.click(() => {
6
- $('.mu-user-menu-items').toggleClass('hidden-sm-screen');
37
+ $('.mu-user-menu-items').toggleClass('mu-hidden-sm-screen');
7
38
  $('#mu-user-menu-header-icon').toggleClass('fa-chevron-up fa-chevron-down');
8
39
  });
9
40
 
@@ -17,4 +48,6 @@ mumuki.load(() => {
17
48
  $userMenuHeader.click();
18
49
  }
19
50
  });
51
+
52
+ mumuki.user.load()
20
53
  });
@@ -8,7 +8,6 @@ $da-font-path: asset-path('assets');
8
8
  @import "application/vendor";
9
9
  @import "application/locked";
10
10
  @import "application/tooltip";
11
- @import "application/hovers";
12
11
  @import "application/mixins";
13
12
  @import "application/layout";
14
13
  @import "application/invitations";
@@ -19,7 +19,7 @@
19
19
  width: calc(100%);
20
20
  object-position: 50% 50%;
21
21
  overflow: hidden;
22
- @media (max-width: $screen-lg) {
22
+ @include media-breakpoint-down(xl) {
23
23
  object-fit: none;
24
24
  }
25
25
  }
@@ -1,8 +1,3 @@
1
- html {
2
- position: relative;
3
- min-height: 100%;
4
- }
5
-
6
1
  .navbar-brand {
7
2
  padding-top: 0;
8
3
  padding-bottom: 0;
@@ -21,10 +16,6 @@ html {
21
16
  }
22
17
  }
23
18
 
24
- body {
25
- margin-bottom: 110px;
26
- }
27
-
28
19
  .mu-footer {
29
20
  &.container {
30
21
  margin-top: 45px;
@@ -76,17 +67,12 @@ body {
76
67
 
77
68
  .editor-tab {
78
69
  padding: 5px 10px 5px 10px !important;
79
- cursor: pointer;
80
70
  }
81
71
 
82
72
  .mu-input-panel {
83
73
  margin-top: 5px;
84
74
  }
85
75
 
86
- h1 {
87
- margin-top: 10px;
88
- }
89
-
90
76
  .text-box {
91
77
  text-align: justify;
92
78
 
@@ -123,16 +109,8 @@ hr {
123
109
  /* TODO: move to mumuki-styles */
124
110
  .mu-inline-block-left {
125
111
  display: flex;
112
+ flex-grow: 1;
126
113
  align-items: center;
127
-
128
- margin-left: 15px;
129
- }
130
-
131
- .mu-inline-block-right {
132
- float: right !important;
133
- display: inline-block;
134
- margin-right: 15px;
135
- margin-left: 10px;
136
114
  }
137
115
 
138
116
  .mu-org-link {
@@ -147,7 +125,3 @@ hr {
147
125
  padding: 0;
148
126
  }
149
127
  }
150
-
151
- h3 {
152
- margin-top: 20px;
153
- }
@@ -1,8 +1,8 @@
1
+ @import "modules/activity";
1
2
  @import "modules/avatar";
2
3
  @import "modules/book_header";
3
4
  @import "modules/breadcrumb";
4
5
  @import "modules/certificate";
5
- @import "modules/checkboxes";
6
6
  @import "modules/console";
7
7
  @import "modules/content_show";
8
8
  @import "modules/datepicker";
@@ -14,7 +14,6 @@
14
14
  @import "modules/faqs";
15
15
  @import "modules/flash";
16
16
  @import "modules/gs-board";
17
- @import "modules/guide_corollary";
18
17
  @import "modules/highlight";
19
18
  @import "modules/kids";
20
19
  @import "modules/kindergarten";
@@ -0,0 +1,14 @@
1
+ .mu-user-activity-indicator {
2
+ text-align: center;
3
+ border-radius: 10px;
4
+
5
+ padding: 0.5em 0;
6
+ margin-bottom: 30px;
7
+ }
8
+
9
+ .mu-user-activity-week-selector {
10
+ &:hover {
11
+ background-color: $mu-color-separator;
12
+ text-decoration: none;
13
+ }
14
+ }
@@ -1,3 +1,8 @@
1
+ .mu-user-avatar-container {
2
+ text-align: center;
3
+ white-space: nowrap;
4
+ }
5
+
1
6
  .mu-user-avatar {
2
7
  width: 250px;
3
8
  height: 250px;
@@ -10,7 +10,7 @@
10
10
  .brand {
11
11
  font-size: 38px;
12
12
  padding: 8px 3px 0;
13
- color: $brand-primary;
13
+ color: $primary;
14
14
  &:hover, &:focus {
15
15
  text-decoration: none;
16
16
  }
@@ -52,7 +52,7 @@
52
52
 
53
53
  .mu-navbar-avatar {
54
54
  justify-self: flex-end;
55
- .img-circle {
55
+ .rounded-circle {
56
56
  cursor: pointer;
57
57
  }
58
58
  }
@@ -6,8 +6,4 @@ input[type="date"] {
6
6
  &::-webkit-inner-spin-button {
7
7
  display: none;
8
8
  }
9
-
10
- &.form-control {
11
- line-height: 33px;
12
- }
13
9
  }
@@ -7,6 +7,23 @@ $discussion-button-color: #fafafa;
7
7
  $toolbar-filter-color: #808080;
8
8
  $moderator-badge-color: #dd9900;
9
9
 
10
+ .discussions {
11
+ margin-bottom: 20px;
12
+
13
+ a {
14
+ color: unset;
15
+ text-decoration: unset;
16
+ }
17
+ }
18
+
19
+ .mu-discussion-accordion button {
20
+ color: $primary;
21
+
22
+ &:not(.collapsed) {
23
+ background-color: $mu-color-highlight-background;
24
+ }
25
+ }
26
+
10
27
  .discussions-list {
11
28
  margin: 30px 0;
12
29
  .discussion {
@@ -20,8 +37,6 @@ $moderator-badge-color: #dd9900;
20
37
  border: 1px solid $discussion-message-border-color;
21
38
  }
22
39
  a {
23
- color: unset;
24
- text-decoration: unset;
25
40
  &:not(:last-child) > .discussion {
26
41
  border-bottom: 0;
27
42
  }
@@ -42,17 +57,6 @@ $moderator-badge-color: #dd9900;
42
57
  justify-content: center;
43
58
  }
44
59
 
45
- .discussion-pagination .pagination li {
46
- a, span {
47
- background-color: lighten($brand-primary, 10%);
48
- }
49
- &:hover, &.active, &.active:hover {
50
- a, span {
51
- background-color: $brand-primary;
52
- }
53
- }
54
- }
55
-
56
60
  .discussion-language-icon {
57
61
  float: right;
58
62
  margin-right: 10px;
@@ -139,18 +143,24 @@ $moderator-badge-color: #dd9900;
139
143
  border-bottom: none;
140
144
  .discussions-toolbar-status {
141
145
  float: left;
146
+
147
+ a {
148
+ text-decoration: unset;
149
+ }
142
150
  li {
143
151
  text-decoration: none;
144
152
  display: inline;
145
153
  margin-right: 15px;
146
154
  &:not(.selected) .status-icon, span {
147
- color: $toolbar-filter-color;
155
+ filter: contrast(0%);
148
156
  }
149
157
  &:hover span {
150
158
  color: darken($toolbar-filter-color, 20%);
159
+ filter: contrast(100%);
151
160
  }
152
161
  &.selected span {
153
162
  color: darken($toolbar-filter-color, 40%);
163
+ filter: contrast(100%);
154
164
  font-weight: bold;
155
165
  }
156
166
  }
@@ -159,6 +169,11 @@ $moderator-badge-color: #dd9900;
159
169
  float: right;
160
170
  margin-right: 20px;
161
171
  cursor: pointer;
172
+
173
+ > a {
174
+ text-decoration: unset;
175
+ color: $primary;
176
+ }
162
177
  li.selected {
163
178
  a {
164
179
  font-weight: bold;
@@ -190,26 +205,6 @@ $moderator-badge-color: #dd9900;
190
205
  padding-inline: 5px;
191
206
  }
192
207
 
193
- .discussion-user-menu {
194
- a {
195
- padding: 5px 10px;
196
- font-size: 15px;
197
- line-height: 20px;
198
- border: 1px solid rgba(27, 31, 35, 0.2);
199
- border-radius: 0.25em;
200
- background-color: $discussion-button-color;
201
- font-weight: bold;
202
- color: black;
203
- cursor: pointer;
204
- margin-left: 10px;
205
- &:hover {
206
- text-decoration: none;
207
- background-color: darken($discussion-button-color, 5%);
208
- color: black;
209
- }
210
- }
211
- }
212
-
213
208
  .discussion-context {
214
209
  margin-top: 40px;
215
210
  }
@@ -233,10 +228,6 @@ $moderator-badge-color: #dd9900;
233
228
  }
234
229
  }
235
230
 
236
- .discussion-tabs {
237
- margin-top: 20px;
238
- }
239
-
240
231
  .discussion-info {
241
232
  font-size: 18px;
242
233
  }
@@ -256,6 +247,7 @@ $moderator-badge-color: #dd9900;
256
247
  .discussion-new-message-content {
257
248
  resize: none;
258
249
  min-height: 150px;
250
+ padding: 0;
259
251
  border-radius: 0;
260
252
  border-color: transparent;
261
253
  overflow: hidden;
@@ -263,7 +255,7 @@ $moderator-badge-color: #dd9900;
263
255
  white-space: nowrap;
264
256
  .CodeMirror {
265
257
  border: unset;
266
- color: $brand-primary;
258
+ color: $primary;
267
259
  font-family: $font-family-sans-serif;
268
260
  padding: 15px;
269
261
  }
@@ -277,19 +269,21 @@ $moderator-badge-color: #dd9900;
277
269
  }
278
270
  }
279
271
 
280
- summary.discussion-summary {
281
- display: list-item;
282
- font-size: 29px;
283
- outline: 0;
284
- cursor: pointer;
285
- .discussion-exercise-title {
286
- display: inline;
272
+ .discussion-new-message-buttons {
273
+ display: flex;
274
+ margin: 0 -10px;
275
+
276
+ .btn {
277
+ margin: 15px 10px;
287
278
  }
288
279
  }
289
280
 
281
+ .discussion-new-message-preview-button {
282
+ flex-grow: 0.2;
283
+ }
284
+
290
285
  .discussion-new-message-button {
291
- border-radius: 0;
292
- margin-top: 15px;
286
+ flex-grow: 1;
293
287
  }
294
288
 
295
289
  .discussion-message {
@@ -334,7 +328,7 @@ summary.discussion-summary {
334
328
  }
335
329
  .actions {
336
330
  float: right;
337
- a {
331
+ > a, .dropdown {
338
332
  margin-left: 20px;
339
333
  cursor: pointer;
340
334
  }
@@ -345,7 +339,7 @@ summary.discussion-summary {
345
339
  }
346
340
  &:hover, &.selected {
347
341
  i {
348
- color: $brand-success;
342
+ color: $success;
349
343
  }
350
344
  }
351
345
  }
@@ -368,9 +362,9 @@ summary.discussion-summary {
368
362
  }
369
363
  &:hover, &.selected {
370
364
  i {
371
- color: $brand-primary;
365
+ color: $primary;
372
366
  &:after {
373
- background-color: $brand-primary;
367
+ background-color: $primary;
374
368
  }
375
369
  }
376
370
  }
@@ -401,10 +395,10 @@ summary.discussion-summary {
401
395
  }
402
396
 
403
397
  $statuses: (
404
- closed: ($brand-danger white $brand-danger),
398
+ closed: ($danger white $danger),
405
399
  opened: (white #333333 #eaeaea),
406
- solved: ($brand-success white $brand-success),
407
- pending_review: ($brand-success white $brand-success)
400
+ solved: ($success white $success),
401
+ pending_review: ($success white $success)
408
402
  );
409
403
 
410
404
  @each $status, $style in $statuses {
@@ -425,10 +419,6 @@ $statuses: (
425
419
  }
426
420
  }
427
421
 
428
- .no-margin {
429
- margin: 0 !important;
430
- }
431
-
432
422
  .discussion-requires-attention {
433
423
  margin-right: 20px;
434
424
  label {