diff --git a/app/assets/stylesheets/components/card.css.scss b/app/assets/stylesheets/components/card.css.scss index 7380b4c3b0..715096ad71 100644 --- a/app/assets/stylesheets/components/card.css.scss +++ b/app/assets/stylesheets/components/card.css.scss @@ -22,7 +22,7 @@ .card-outlined { box-shadow: none; - border: 1px solid var(--d-outline); + border: 1px solid var(--d-divider); } .card-media { diff --git a/app/assets/stylesheets/models/submissions.css.scss b/app/assets/stylesheets/models/submissions.css.scss index b6138e9b54..bf219e3b27 100644 --- a/app/assets/stylesheets/models/submissions.css.scss +++ b/app/assets/stylesheets/models/submissions.css.scss @@ -510,10 +510,6 @@ iframe.file { } } -.score-details { - padding-bottom: 10px; -} - .submission-history { display: flex; max-height: 75px; @@ -539,3 +535,8 @@ iframe.file { margin-right: 6px; } } + +.scores.card .card-title.card-title-colored-container .btn { + margin-top: -12px; + margin-bottom: -12px; +} diff --git a/app/views/evaluations/overview.html.erb b/app/views/evaluations/overview.html.erb index 8185a80a3c..4f51afffa8 100644 --- a/app/views/evaluations/overview.html.erb +++ b/app/views/evaluations/overview.html.erb @@ -14,7 +14,7 @@ <%= t '.exercise' %> - <%= t '.feedback' %> + <%= t '.grade' if graded %> @@ -33,7 +33,7 @@ <% if graded %> <% if fb.maximum_score %> - <%= t "feedbacks.score_table.total_score" %> + <%= t "feedbacks.score_card.total_score" %> <% else %> <%= t ".no_grading" %> <% end %> diff --git a/app/views/feedbacks/_score_card.html.erb b/app/views/feedbacks/_score_card.html.erb new file mode 100644 index 0000000000..2832ba4475 --- /dev/null +++ b/app/views/feedbacks/_score_card.html.erb @@ -0,0 +1,49 @@ +<% total = policy(feedback.evaluation_exercise).show_total? %> +<% scores = policy_scope(feedback.scores) %> + + +<% if total || feedback.score_items.present? %> +
+
+ <%= t(".evaluation")%> + <%# Link to edit screen if needed %> + <% if policy(feedback).show? %> + <%= link_to feedback_path(feedback), class: "edit-score btn btn-text with-icon float-end", title: t(".view_feedback") do %> + + <%= t "score_items.table.edit" %> + <% end %> + <% end %> +
+
"> +
+ <%= t ".info_html", url: overview_evaluation_path(feedback.evaluation_exercise.evaluation) %> +
+ + <% if total %> + + + + + <% end %> + <% scores.each do |score| %> + + + + + <% end %> +
+ <%= t ".total_score" %> + <% unless feedback.evaluation_exercise.visible_score? %> + "> + <% end %> + <%= format_score feedback.score %> / <%= format_score feedback.maximum_score %>
+ <%= score.score_item.name %> + <% unless score.score_item.visible %> + "> + <% end %> +
+ <%= score.score_item.description %> +
<%= format_score score.score %> / <%= format_score score.score_item.maximum %>
+
+
+<% end %> diff --git a/app/views/feedbacks/_score_link.html.erb b/app/views/feedbacks/_score_link.html.erb deleted file mode 100644 index fc70ce6a64..0000000000 --- a/app/views/feedbacks/_score_link.html.erb +++ /dev/null @@ -1,30 +0,0 @@ -<%# - If the total is visible, show that. - If there are other visible scores, display that. - Else display nothing. -%> -<% total = policy(feedback.evaluation_exercise).show_total? %> -<% scores = policy_scope(feedback.scores) %> -<% if total && feedback.score_items.present? %> - <%= link_to "#score-details-#{feedback.id}", - class: 'toggleable-icon', - title: t("feedbacks.score_link.view_breakdown"), data: { 'bs-toggle': "collapse" } do %> - <%= t("feedbacks.score_link.score", score: format_score(feedback.score), max: format_score(feedback.maximum_score)) %> - - - <% end %> -<% elsif scores.present? %> - <%= link_to "#score-details-#{feedback.id}", - class: 'toggleable-icon', - title: t("feedbacks.score_link.view_breakdown"), data: { 'bs-toggle': "collapse" } do %> - <%= t("feedbacks.score_link.present", count: scores.length) %> - - - <% end %> -<% end %> -<%# Link to edit screen if needed %> -<% if policy(feedback).show? && scores.present? %> - <%= link_to feedback_path(feedback), class: "edit-score btn btn-icon", title: t("feedbacks.score_link.view_feedback") do %> - - <% end %> -<% end %> diff --git a/app/views/feedbacks/_score_table.html.erb b/app/views/feedbacks/_score_table.html.erb deleted file mode 100644 index 224003180e..0000000000 --- a/app/views/feedbacks/_score_table.html.erb +++ /dev/null @@ -1,30 +0,0 @@ -<% total = policy(feedback.evaluation_exercise).show_total? %> -<% scores = policy_scope(feedback.scores).includes(:score_item) %> -<% if total || feedback.score_items.present? %> - - <% if total %> - - - - - <% end %> - <% scores.each do |score| %> - - - - - <% end %> -
- <%= t "feedbacks.score_table.total_score" %> - <% unless feedback.evaluation_exercise.visible_score? %> - "> - <% end %> - <%= format_score feedback.score %> / <%= format_score feedback.maximum_score %>
- <%= score.score_item.name %> - <% unless score.score_item.visible %> - "> - <% end %> -
- <%= score.score_item.description %> -
<%= format_score score.score %> / <%= format_score score.score_item.maximum %>
-<% end %> diff --git a/app/views/submissions/_description.html.erb b/app/views/submissions/_description.html.erb index 0ef68b63f4..c4726ad1b4 100644 --- a/app/views/submissions/_description.html.erb +++ b/app/views/submissions/_description.html.erb @@ -47,46 +47,36 @@ <%= time_ago_in_words submission.created_at %> <%= t "submissions.show.ago" %> - <% if @feedbacks.blank? %> -
-
- <% @submissions_time_stamps.each do |t| %> - <%= t %> -
- <% end %> -
-
- <% @submissions.each_with_index do |s, i| %> - - <%= link_to "##{@submissions.length - i}", submission_path(s), class: 'submission-link' %> - <%= submission_status_icon(s, 12) %> - - <%= Submission.human_enum_name(:status, s.status) %> - <% if s.summary.present? and s.summary.downcase != Submission.human_enum_name(:status, s.status).downcase %> - · <%= s.summary %> - <% end %> - - -
- <% end %> -
+
+
+ <% @submissions_time_stamps.each do |t| %> + <%= t %> +
+ <% end %>
- <% else %> -
- <% @feedbacks.each do |feedback| %> - - <%= render 'feedbacks/score_link', feedback: feedback %> +
+ <% @submissions.each_with_index do |s, i| %> + + <%= link_to "##{@submissions.length - i}", submission_path(s), class: 'submission-link' %> + <%= submission_status_icon(s, 12) %> + + <%= Submission.human_enum_name(:status, s.status) %> + <% if s.summary.present? and s.summary.downcase != Submission.human_enum_name(:status, s.status).downcase %> + · <%= s.summary %> + <% end %> + +
<% end %>
+
+ <% @feedbacks.each do |feedback| %> +
+ <%= render 'feedbacks/score_card', feedback: feedback %> +
<% end %>
-<% @feedbacks.each do |feedback | %> -
"> - <%= render 'feedbacks/score_table', feedback: feedback %> -
-<% end %> <% unless submission.queued? or submission.running? %> <%= submission.judge.renderer.new(submission, current_user).parse %> diff --git a/config/locales/views/evaluations/en.yml b/config/locales/views/evaluations/en.yml index 32c98591c2..c0a617f9ac 100644 --- a/config/locales/views/evaluations/en.yml +++ b/config/locales/views/evaluations/en.yml @@ -75,8 +75,8 @@ en: submission_correct: "Correct submission, " submission_wrong: "Wrong submission, " overview: - title: Evaluation overview - explanation: A course admin has evaluated your submissions for the series "%{series}". For each exercise, your last submission before %{deadline} was automatically selected, but the course admin may have manually selected a different one. Note that this evaluation doesn't necessarily mean that feedback has been added to all of your submissions. + title: Evaluation + explanation: A teacher reviewed your work for the "%{series}" series. They automatically picked your last submission before %{deadline}, but they might have chosen a different one manually. Keep in mind, this evaluation doesn't always include feedback on all your submissions. released: Feedback was added to your code. exercise: Exercise no_annotations: "# comments" diff --git a/config/locales/views/evaluations/nl.yml b/config/locales/views/evaluations/nl.yml index 0cb340fe18..360b2e5958 100644 --- a/config/locales/views/evaluations/nl.yml +++ b/config/locales/views/evaluations/nl.yml @@ -76,8 +76,8 @@ nl: submission_correct: "Juiste oplossing, " submission_wrong: "Foute oplossing, " overview: - title: Evaluatie-overzicht - explanation: Een cursusbeheerder evalueerde je oplossingen voor de reeks "%{series}". Voor elke oefening werd je laatst ingediende oplossing voor %{deadline} automatisch geselecteerd, maar de cursusbeheerder selecteerde mogelijks handmatig een andere oplossing. Merk op dat deze evaluatie niet noodzakelijk betekent dat er feedback werd toevoegd aan elk van je oplossingen. + title: Evaluatie + explanation: Een lesgever heeft je werk voor de reeks "%{series}" bekeken. Dodona heeft automatisch je laatste inzending voor %{deadline} geselecteerd, maar mogelijk heeft de lesgever handmatig een andere gekozen. Houd er rekening mee dat deze evaluatie niet altijd feedback op al je oplossingen omvat. released: Er werd feedback gegeven op je code exercise: Oefening feedback: "Feedback" diff --git a/config/locales/views/feedbacks/en.yml b/config/locales/views/feedbacks/en.yml index 6826f7686e..41544e784f 100644 --- a/config/locales/views/feedbacks/en.yml +++ b/config/locales/views/feedbacks/en.yml @@ -59,12 +59,8 @@ en: submissions_table: update-submission: "Change to this submission" confirm: "Are you sure? All comments on the previous submission will be deleted." - score_table: + score_card: total_score: Total grade - score_breakdown: Grade breakdown - score_link: - score: "Grade: %{score} / %{max}" - score_short: "%{score} / %{max}" - present: "There are %{count} score items" - view_breakdown: View grade breakdown + evaluation: Evaluation view_feedback: Go to the feedback + info_html: "This solution has been manually evaluated by a teacher as part of an evaluation. Below, you can find your feedback." diff --git a/config/locales/views/feedbacks/nl.yml b/config/locales/views/feedbacks/nl.yml index eb254885b6..e85eb35b86 100644 --- a/config/locales/views/feedbacks/nl.yml +++ b/config/locales/views/feedbacks/nl.yml @@ -59,12 +59,8 @@ nl: submissions_table: update-submission: "Veranderen naar deze oplossing" confirm: "Ben je zeker? Alle opmerkingen op de vorige oplossing zullen verwijderd worden." - score_table: + score_card: total_score: Totaalscore - score_breakdown: Puntenverdeling - score_link: - score: "Score: %{score} / %{max}" - score_short: "%{score} / %{max}" - present: "Er zijn %{count} scoreonderdelen" - view_breakdown: Puntenverdeling bekijken + evaluation: Evaluatie view_feedback: Ga naar de feedback + info_html: "Deze oplossing werd manueel nagekeken door een lesgever als deel van een evaluatie. Hieronder vind je jouw feedback."