diff --git a/app/assets/stylesheets/components/evaluations.css.scss b/app/assets/stylesheets/components/evaluations.css.scss index 86629a54af..8ea0a2289c 100644 --- a/app/assets/stylesheets/components/evaluations.css.scss +++ b/app/assets/stylesheets/components/evaluations.css.scss @@ -8,24 +8,52 @@ } } -.feedback-metadata .complete-feedback { - display: flex; - justify-content: center; - align-items: center; - line-height: normal; - width: 100%; -} -.feedback-metadata .uncomplete-feedback { - display: flex; -} +.feedback-metadata { + .complete-feedback { + display: flex; + justify-content: center; + align-items: center; + line-height: normal; + width: 100%; + } -.feedback-metadata .form-row { - display: flex; - align-items: center; - padding-bottom: 5px; -} + .uncomplete-feedback { + display: flex; + } + + .form-row { + display: flex; + align-items: center; + padding-bottom: 5px; + } + + .username-row { + display: flex; + align-items: center; + white-space: nowrap; + padding-bottom: 5px; + + .name { + flex-shrink: 0; + } + } + + .token { + display: inline-block; + margin-left: 6px; + padding-top: 6px; + overflow: hidden; + text-overflow: ellipsis; + } + + .labels-row { + display: flex; + white-space: nowrap; + margin-top: -6px; + margin-bottom: 12px; + margin-left: -6px; + } -.feedback-metadata { .form-group.input { width: 100%; margin-bottom: 0; diff --git a/app/controllers/feedbacks_controller.rb b/app/controllers/feedbacks_controller.rb index 5d46aac240..3a4e841746 100644 --- a/app/controllers/feedbacks_controller.rb +++ b/app/controllers/feedbacks_controller.rb @@ -23,6 +23,13 @@ def show ] @title = I18n.t('feedbacks.show.feedback') + @user_labels = @feedback.evaluation + .series + .course + .course_memberships + .find_by(user_id: @feedback.user) + .course_labels + @score_map = @feedback.scores.index_by(&:score_item_id) # If we refresh all scores because of a conflict, we want to make # sure the user is aware the update was not successful. By setting diff --git a/app/views/feedbacks/_feedback_actions.html.erb b/app/views/feedbacks/_feedback_actions.html.erb index f0b2095516..212a55a735 100644 --- a/app/views/feedbacks/_feedback_actions.html.erb +++ b/app/views/feedbacks/_feedback_actions.html.erb @@ -106,8 +106,19 @@
<%= render partial: 'feedbacks/progress_row', locals: { metadata: @feedback.evaluation_exercise.metadata } %>
- -

<%= @feedback.user.full_name %>

+
+

<%= @feedback.user.full_name %>

+ <% if @user_labels.present? %> + <%= @user_labels.first.name %> + <% end %> +
+ <% if @user_labels.present? && @user_labels.length > 1 %> +
+ <% @user_labels[1..].each do |label| %> + <%= label.name %> + <% end %> +
+ <% end %>
<%= render partial: 'feedbacks/user_feedback_row', locals: { current_feedback: @feedback } %>