From 4aa6a531955e62ce352dd7add63fb73a63a43668 Mon Sep 17 00:00:00 2001 From: jorg-vr Date: Thu, 16 May 2024 14:50:16 +0200 Subject: [PATCH 1/9] Add plagiarism detection for evaluations --- app/assets/javascripts/dolos.ts | 17 +++++++++++---- app/assets/javascripts/i18n/translations.json | 2 +- app/helpers/export_helper.rb | 11 ++++++++-- app/javascript/packs/dolos.js | 4 ++-- app/models/evaluation.rb | 1 + .../_exercises_progress_table.html.erb | 21 ++++++++++++++++--- app/views/submissions/index.html.erb | 7 ++++++- 7 files changed, 50 insertions(+), 13 deletions(-) diff --git a/app/assets/javascripts/dolos.ts b/app/assets/javascripts/dolos.ts index bd2baea3ba..bab132ade3 100644 --- a/app/assets/javascripts/dolos.ts +++ b/app/assets/javascripts/dolos.ts @@ -5,13 +5,22 @@ import { html, render } from "lit"; import { i18n } from "i18n/i18n"; const LOADER_ID = "dolos-loader"; -const BTN_ID = "dolos-btn"; const DOLOS_URL = "/dolos_reports"; -export async function startDolos(url: string): Promise { +const handledBtns = new Set(); +export function initDolosBtn(btnID: string, url: string): void { + if (handledBtns.has(btnID)) { + return; + } + const btn = document.getElementById(btnID) as HTMLLinkElement; + btn.addEventListener("click", () => startDolos(btn, url)); + handledBtns.add(btnID); +} + +export async function startDolos(btn: HTMLLinkElement, url: string): Promise { + console.log("Starting Dolos report generation", btn.id); const loader = document.getElementById(LOADER_ID) as LoadingBar; loader.show(); - const btn = document.getElementById(BTN_ID) as HTMLLinkElement; btn.classList.add("disabled"); const settings = new FormData(); @@ -43,7 +52,7 @@ export async function startDolos(url: string): Promise { loader.hide(); const newBtn = html` - + ${i18n.t("js.dolos.view_report")} `; diff --git a/app/assets/javascripts/i18n/translations.json b/app/assets/javascripts/i18n/translations.json index 4a8aca4084..300462572f 100644 --- a/app/assets/javascripts/i18n/translations.json +++ b/app/assets/javascripts/i18n/translations.json @@ -722,7 +722,7 @@ "date_on": "op", "description_languages": "Taal van de beschrijving", "dolos": { - "view_report": "Rapport bekijken" + "view_report": "Plagiaat bekijken" }, "draft": "Concept", "dropdown": { diff --git a/app/helpers/export_helper.rb b/app/helpers/export_helper.rb index 9930234993..cc045d1a05 100644 --- a/app/helpers/export_helper.rb +++ b/app/helpers/export_helper.rb @@ -6,8 +6,8 @@ class Zipper attr_reader :users, :item, :errors - CONVERT_TO_BOOL = %w[deadline only_last_submission with_info all with_labels].freeze - SUPPORTED_OPTIONS = %w[deadline filter_students group_by only_last_submission with_info all with_labels].freeze + CONVERT_TO_BOOL = %w[deadline only_last_submission with_info all with_labels evaluation].freeze + SUPPORTED_OPTIONS = %w[deadline filter_students group_by only_last_submission with_info all with_labels evaluation].freeze # Keywords used: # :item : A User, Course or Series for which submissions will be exported @@ -32,6 +32,7 @@ def initialize(**kwargs) .to_h { |m| [m.user, m.course_labels] } @users = @users_labels.keys if users.nil? + @users = @item.evaluation.users if evaluation? when Course @list = @item.series if all? @users_labels = @item.course_memberships @@ -92,6 +93,10 @@ def all? @options[:all].present? end + def evaluation? + @options[:evaluation].present? && @item.is_a?(Series) && @item.evaluation.present? + end + def zip_filename @item.is_a?(User) ? "#{@item.full_name.parameterize}.zip" : "#{@item.name.parameterize}.zip" end @@ -240,6 +245,8 @@ def bundle end def get_submissions_for_series(series, selected_exercises, users) + return policy_scope(series.evaluation.submissions.where(user_id: users.map(&:id), exercise_id: selected_exercises.map(&:id))) if evaluation? + submissions = policy_scope(Submission).where(user_id: users.map(&:id), exercise_id: selected_exercises.map(&:id), course: series.course_id).includes(:user, :exercise) submissions = submissions.before_deadline(@options[:deadline]) if deadline? submissions = submissions.group(:user_id, :exercise_id).most_recent if only_last_submission? diff --git a/app/javascript/packs/dolos.js b/app/javascript/packs/dolos.js index cfcf66c474..127de477f9 100644 --- a/app/javascript/packs/dolos.js +++ b/app/javascript/packs/dolos.js @@ -1,3 +1,3 @@ -import { startDolos } from "dolos.ts"; +import { initDolosBtn } from "dolos.ts"; -window.dodona.startDolos = startDolos; +window.dodona.initDolosBtn = initDolosBtn; diff --git a/app/models/evaluation.rb b/app/models/evaluation.rb index 0a9a2cafa8..20e68c1dbb 100644 --- a/app/models/evaluation.rb +++ b/app/models/evaluation.rb @@ -23,6 +23,7 @@ class Evaluation < ApplicationRecord has_many :users, through: :evaluation_users has_many :exercises, through: :evaluation_exercises has_many :score_items, through: :evaluation_exercises + has_many :submissions, through: :feedbacks has_many :annotated_submissions, -> { distinct }, through: :annotations, source: :submission diff --git a/app/views/evaluations/_exercises_progress_table.html.erb b/app/views/evaluations/_exercises_progress_table.html.erb index d0e3276c03..09786914c3 100644 --- a/app/views/evaluations/_exercises_progress_table.html.erb +++ b/app/views/evaluations/_exercises_progress_table.html.erb @@ -1,4 +1,6 @@ +<%= javascript_include_tag 'dolos' %>
+ @@ -30,12 +32,25 @@ <% end %> diff --git a/app/views/submissions/index.html.erb b/app/views/submissions/index.html.erb index 78f60b1186..cf54162156 100644 --- a/app/views/submissions/index.html.erb +++ b/app/views/submissions/index.html.erb @@ -43,10 +43,15 @@ <% if current_user&.course_admin?(@course) %> <% actions << {icon: 'replay', text: t(".reevaluate_submissions"), confirm: t(".confirm_reevaluate_submissions"), action: mass_rejudge_submissions_path(user_id: @user&.id, activity_id: @activity&.id, course_id: @course&.id, series_id: @series&.id, judge_id: @judge&.id)} if policy(Submission).mass_rejudge? - actions << {icon: 'graph-outline', text: t('.detect_plagiarism'), js: "window.dodona.startDolos(\"#{series_exports_path(@series, token: (@series.access_token if @series.hidden?), selected_ids: [@activity.id])}\")", id: "dolos-btn" } if @series && @activity + actions << {icon: 'graph-outline', text: t('.detect_plagiarism'), id: "dolos-btn" } if @series && @activity options << {label: t('.most_recent'), param: 'most_recent_per_user'} if @activity options << {label: t('.watch_submissions'), param: 'refresh'} %> + <% end %> <%= render partial: 'layouts/searchbar', locals: {actions: actions, options: options, course_labels: @course_labels, statuses: Submission.statuses.keys, refresh_element: "#refresh_element"} %>
From 2471808ca8fc9f2abe719b7028f524b1c7fd8dc8 Mon Sep 17 00:00:00 2001 From: jorg-vr Date: Thu, 16 May 2024 16:37:30 +0200 Subject: [PATCH 2/9] Update page layout --- .../stylesheets/components/table.css.scss | 8 +++--- .../_exercises_progress_table.html.erb | 4 +-- app/views/evaluations/show.html.erb | 26 ++++++++----------- 3 files changed, 16 insertions(+), 22 deletions(-) diff --git a/app/assets/stylesheets/components/table.css.scss b/app/assets/stylesheets/components/table.css.scss index 4d4a8b866c..fe2d33e40f 100644 --- a/app/assets/stylesheets/components/table.css.scss +++ b/app/assets/stylesheets/components/table.css.scss @@ -57,11 +57,9 @@ .table-resource .actions { text-align: right; - &.submissions-table { - // by default the size of the element in the col is used as width if width is smaller than that element. - // This width is just here to force everything to the right - width: 1px; - } + // by default the size of the element in the col is used as width if width is smaller than that element. + // This width is just here to force everything to the right + width: 1px; } tr.gu-mirror { diff --git a/app/views/evaluations/_exercises_progress_table.html.erb b/app/views/evaluations/_exercises_progress_table.html.erb index 09786914c3..c5c05400f6 100644 --- a/app/views/evaluations/_exercises_progress_table.html.erb +++ b/app/views/evaluations/_exercises_progress_table.html.erb @@ -7,7 +7,7 @@
- + @@ -30,7 +30,7 @@ -
<% if meta[:next_incomplete_feedback].present? %> - <%= link_to meta[:next_incomplete_feedback], title: t('evaluations.show.next_incomplete_feedback'), class: 'btn btn-icon' do %> - + <%= link_to meta[:next_incomplete_feedback], title: t('evaluations.show.next_incomplete_feedback'), class: 'btn btn-outline with-icon' do %> + + Evaluate <% end %> <% else %> - + + + Evaluated + <% end %> + + + <%= t "submissions.index.detect_plagiarism" %> + +
<%= t "activities.index.activity_title" %> <%= t "evaluations.show.evaluation_progress" %>
+ <% if meta[:next_incomplete_feedback].present? %> <%= link_to meta[:next_incomplete_feedback], title: t('evaluations.show.next_incomplete_feedback'), class: 'btn btn-outline with-icon' do %> diff --git a/app/views/evaluations/show.html.erb b/app/views/evaluations/show.html.erb index 2b858da5e6..2c0c111434 100644 --- a/app/views/evaluations/show.html.erb +++ b/app/views/evaluations/show.html.erb @@ -5,21 +5,17 @@

<%= t('.title', series: @evaluation.series.name) %>

-
-
-
-

<%= t ".explanation_title" %>

- <% if @evaluation.score_items.empty? %> - <%= t ".explanation_no_grading_html" %> - <% else %> - <%= t ".explanation_yes_grading_html" %> - <% end %> -
-
-
-

<%= t '.deadline_html', users: @evaluation.users.count, exercises: @evaluation.exercises.count, deadline: l(@evaluation.deadline, format: :submission) %>

- <%= render partial: 'exercises_progress_table', locals: { metadata: @evaluation.metadata, series: @evaluation.series } %> -
+
+ <%= t ".explanation_title" %> + <% if @evaluation.score_items.empty? %> + <%= t ".explanation_no_grading_html" %> + <% else %> + <%= t ".explanation_yes_grading_html" %> + <% end %> +
+
+

<%= t '.deadline_html', users: @evaluation.users.count, exercises: @evaluation.exercises.count, deadline: l(@evaluation.deadline, format: :submission) %>

+ <%= render partial: 'exercises_progress_table', locals: { metadata: @evaluation.metadata, series: @evaluation.series } %>
From 04e554c4adffd273faa792e0643f209bc51918a1 Mon Sep 17 00:00:00 2001 From: jorg-vr Date: Tue, 21 May 2024 11:34:03 +0200 Subject: [PATCH 3/9] Undo avoid double --- app/assets/javascripts/dolos.ts | 5 ----- 1 file changed, 5 deletions(-) diff --git a/app/assets/javascripts/dolos.ts b/app/assets/javascripts/dolos.ts index bab132ade3..ab3b8530f0 100644 --- a/app/assets/javascripts/dolos.ts +++ b/app/assets/javascripts/dolos.ts @@ -7,14 +7,9 @@ import { i18n } from "i18n/i18n"; const LOADER_ID = "dolos-loader"; const DOLOS_URL = "/dolos_reports"; -const handledBtns = new Set(); export function initDolosBtn(btnID: string, url: string): void { - if (handledBtns.has(btnID)) { - return; - } const btn = document.getElementById(btnID) as HTMLLinkElement; btn.addEventListener("click", () => startDolos(btn, url)); - handledBtns.add(btnID); } export async function startDolos(btn: HTMLLinkElement, url: string): Promise { From 9222f93874eb1b6d81f7f0a62ea306f7137ec632 Mon Sep 17 00:00:00 2001 From: jorg-vr Date: Tue, 21 May 2024 11:44:39 +0200 Subject: [PATCH 4/9] Fix translations --- app/views/evaluations/_exercises_progress_table.html.erb | 4 ++-- config/locales/views/evaluations/en.yml | 7 +++++-- config/locales/views/evaluations/nl.yml | 7 +++++-- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/app/views/evaluations/_exercises_progress_table.html.erb b/app/views/evaluations/_exercises_progress_table.html.erb index c5c05400f6..d603d020ea 100644 --- a/app/views/evaluations/_exercises_progress_table.html.erb +++ b/app/views/evaluations/_exercises_progress_table.html.erb @@ -34,12 +34,12 @@ <% if meta[:next_incomplete_feedback].present? %> <%= link_to meta[:next_incomplete_feedback], title: t('evaluations.show.next_incomplete_feedback'), class: 'btn btn-outline with-icon' do %> - Evaluate + <%= t(".evaluate") %> <% end %> <% else %> - Evaluated + <%= t(".evaluated") %> <% end %> diff --git a/config/locales/views/evaluations/en.yml b/config/locales/views/evaluations/en.yml index c0a617f9ac..c9108ba254 100644 --- a/config/locales/views/evaluations/en.yml +++ b/config/locales/views/evaluations/en.yml @@ -5,8 +5,8 @@ en: evaluation: "Evaluation" title: "Evaluation for %{series}" explanation_title: "How do I evaluate a submission?" - explanation_no_grading_html: "

In the summary table, you can click on the icon next to an exercise. You will then be taken to an incompleted submission of a random student. If you wish, you can leave feedback on the code and mark the submission as completed. Note that you can also mark a submission as completed without leaving feedback. To get started, we already marked all exercises without submissions as completed.

You can find more information in our documentation.

As a reminder, students will not be able to see the feedback you have given until you click the 'release feedback' button below.

" - explanation_yes_grading_html: "

In the summary table, you can click on the icon next to an exercise. You will then be taken to an incomplete submission of a random student. If you wish, you can leave feedback on the code and assign scores using the score items you configured. Note that you can also assign scores without leaving feedback. You can not give scores to exercises without submissions, these are automatically assigned a 0 in the grade overview.

You can find information in our documentation.

As a reminder, students will not be able to see the feedback and scores until you click the 'Release feedback' button below.

" + explanation_no_grading_html: "

In the summary table, you can click on the 'Evaluate' icon next to an exercise. You will then be taken to an incompleted submission of a random student. If you wish, you can leave feedback on the code and mark the submission as completed. Note that you can also mark a submission as completed without leaving feedback. To get started, we already marked all exercises without submissions as completed.

You can find more information in our documentation.

As a reminder, students will not be able to see the feedback you have given until you click the 'release feedback' button below.

" + explanation_yes_grading_html: "

In the summary table, you can click on the 'Evaluate' icon next to an exercise. You will then be taken to an incomplete submission of a random student. If you wish, you can leave feedback on the code and assign scores using the score items you configured. Note that you can also assign scores without leaving feedback. You can not give scores to exercises without submissions, these are automatically assigned a 0 in the grade overview.

You can find information in our documentation.

As a reminder, students will not be able to see the feedback and scores until you click the 'Release feedback' button below.

" release: Release feedback unrelease: Unrelease feedback deadline_html: This evaluation of %{users} students contains the submissions of %{exercises} exercises with %{deadline} as a deadline. @@ -96,3 +96,6 @@ en: remove_user_consequences: "If this student already received feedback, that feedback will be deleted. Are you sure you want to remove this student?" user_progress: not_submitted: Not submitted + exercises_progress_table: + evaluate: Evaluate + evaluated: Evaluated diff --git a/config/locales/views/evaluations/nl.yml b/config/locales/views/evaluations/nl.yml index 360b2e5958..fd5108e350 100644 --- a/config/locales/views/evaluations/nl.yml +++ b/config/locales/views/evaluations/nl.yml @@ -5,8 +5,8 @@ nl: evaluation: "Evaluatie" title: "Evaluatie voor %{series}" explanation_title: "Hoe evalueer ik een oplossing?" - explanation_no_grading_html: "

In de samenvattende tabel kan je naast een oefening op klikken. Je komt dan op een nog te bekijken oplossing van een willekeurige student terecht. Vervolgens kan je indien gewenst feedback op de code geven en de oplossing als afgewerkt markeren. Bemerk dat je ook een oplossing als afgewerkt kan markeren zonder feedback achter te laten. We hebben alvast alle oefeningen zonder ingediende oplossing als afgewerkt gemarkeerd.

Meer informatie kan je in onze documentatie vinden.

Ter herinnering, de studenten krijgen de gegeven feedback niet automatisch te zien, daarvoor dien je hieronder op 'Feedback vrijgeven' te klikken.

" - explanation_yes_grading_html: "

In de samenvattende tabel kan je naast een oefening op klikken. Je komt dan op een nog te bekijken oplossing van een willekeurige student terecht. Vervolgens kan je indien gewenst feedback op de code geven en scores toekennen via de scoreonderdelen die je geconfigureerd hebt. Je kan de scores ook invullen zonder feedback achter te laten. Oefeningen zonder ingediende oplossing kan je geen scores geven, deze zullen automatisch een 0 krijgen in het puntenoverzicht.

Meer informatie kan je in onze documentatie vinden.

Ter herinnering, de studenten krijgen de gegeven feedback en scores niet automatisch te zien, daarvoor dien je hieronder op 'Feedback vrijgeven' te klikken.

" + explanation_no_grading_html: "

In de samenvattende tabel kan je naast een oefening op 'Evalueren' klikken. Je komt dan op een nog te bekijken oplossing van een willekeurige student terecht. Vervolgens kan je indien gewenst feedback op de code geven en de oplossing als afgewerkt markeren. Bemerk dat je ook een oplossing als afgewerkt kan markeren zonder feedback achter te laten. We hebben alvast alle oefeningen zonder ingediende oplossing als afgewerkt gemarkeerd.

Meer informatie kan je in onze documentatie vinden.

Ter herinnering, de studenten krijgen de gegeven feedback niet automatisch te zien, daarvoor dien je hieronder op 'Feedback vrijgeven' te klikken.

" + explanation_yes_grading_html: "

In de samenvattende tabel kan je naast een oefening op 'Evalueren' klikken. Je komt dan op een nog te bekijken oplossing van een willekeurige student terecht. Vervolgens kan je indien gewenst feedback op de code geven en scores toekennen via de scoreonderdelen die je geconfigureerd hebt. Je kan de scores ook invullen zonder feedback achter te laten. Oefeningen zonder ingediende oplossing kan je geen scores geven, deze zullen automatisch een 0 krijgen in het puntenoverzicht.

Meer informatie kan je in onze documentatie vinden.

Ter herinnering, de studenten krijgen de gegeven feedback en scores niet automatisch te zien, daarvoor dien je hieronder op 'Feedback vrijgeven' te klikken.

" users: "studenten" release: Feedback vrijgeven unrelease: Feedback verbergen @@ -96,3 +96,6 @@ nl: remove_user_consequences: "Als deze student al feedback gekregen had, dan zal deze feedback verwijderd worden. Ben je zeker dat je deze student wil verwijderen?" user_progress: not_submitted: Niet ingediend + exercises_progress_table: + evaluate: Evalueren + evaluated: Geƫvalueerd From f97711ea003e4a50350df6d5fd60cca68002510f Mon Sep 17 00:00:00 2001 From: jorg-vr Date: Tue, 21 May 2024 11:49:39 +0200 Subject: [PATCH 5/9] Fix translations --- config/locales/views/evaluations/en.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/locales/views/evaluations/en.yml b/config/locales/views/evaluations/en.yml index c9108ba254..7492003532 100644 --- a/config/locales/views/evaluations/en.yml +++ b/config/locales/views/evaluations/en.yml @@ -5,8 +5,8 @@ en: evaluation: "Evaluation" title: "Evaluation for %{series}" explanation_title: "How do I evaluate a submission?" - explanation_no_grading_html: "

In the summary table, you can click on the 'Evaluate' icon next to an exercise. You will then be taken to an incompleted submission of a random student. If you wish, you can leave feedback on the code and mark the submission as completed. Note that you can also mark a submission as completed without leaving feedback. To get started, we already marked all exercises without submissions as completed.

You can find more information in our documentation.

As a reminder, students will not be able to see the feedback you have given until you click the 'release feedback' button below.

" - explanation_yes_grading_html: "

In the summary table, you can click on the 'Evaluate' icon next to an exercise. You will then be taken to an incomplete submission of a random student. If you wish, you can leave feedback on the code and assign scores using the score items you configured. Note that you can also assign scores without leaving feedback. You can not give scores to exercises without submissions, these are automatically assigned a 0 in the grade overview.

You can find information in our documentation.

As a reminder, students will not be able to see the feedback and scores until you click the 'Release feedback' button below.

" + explanation_no_grading_html: "

In the summary table, you can click on the 'Evaluate' button next to an exercise. You will then be taken to an incompleted submission of a random student. If you wish, you can leave feedback on the code and mark the submission as completed. Note that you can also mark a submission as completed without leaving feedback. To get started, we already marked all exercises without submissions as completed.

You can find more information in our documentation.

As a reminder, students will not be able to see the feedback you have given until you click the 'release feedback' button below.

" + explanation_yes_grading_html: "

In the summary table, you can click on the 'Evaluate' button next to an exercise. You will then be taken to an incomplete submission of a random student. If you wish, you can leave feedback on the code and assign scores using the score items you configured. Note that you can also assign scores without leaving feedback. You can not give scores to exercises without submissions, these are automatically assigned a 0 in the grade overview.

You can find information in our documentation.

As a reminder, students will not be able to see the feedback and scores until you click the 'Release feedback' button below.

" release: Release feedback unrelease: Unrelease feedback deadline_html: This evaluation of %{users} students contains the submissions of %{exercises} exercises with %{deadline} as a deadline. From c6cea1a440e6eac7870639b675fad6ebd4d65ca2 Mon Sep 17 00:00:00 2001 From: jorg-vr Date: Tue, 21 May 2024 12:05:58 +0200 Subject: [PATCH 6/9] Fix tests --- app/views/submissions/index.html.erb | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/app/views/submissions/index.html.erb b/app/views/submissions/index.html.erb index cf54162156..2059b316e5 100644 --- a/app/views/submissions/index.html.erb +++ b/app/views/submissions/index.html.erb @@ -43,15 +43,17 @@ <% if current_user&.course_admin?(@course) %> <% actions << {icon: 'replay', text: t(".reevaluate_submissions"), confirm: t(".confirm_reevaluate_submissions"), action: mass_rejudge_submissions_path(user_id: @user&.id, activity_id: @activity&.id, course_id: @course&.id, series_id: @series&.id, judge_id: @judge&.id)} if policy(Submission).mass_rejudge? - actions << {icon: 'graph-outline', text: t('.detect_plagiarism'), id: "dolos-btn" } if @series && @activity options << {label: t('.most_recent'), param: 'most_recent_per_user'} if @activity options << {label: t('.watch_submissions'), param: 'refresh'} %> - + <% if @series.present? %> + <% actions << {icon: 'graph-outline', text: t('.detect_plagiarism'), id: "dolos-btn" } if @series && @activity %> + + <% end %> <% end %> <%= render partial: 'layouts/searchbar', locals: {actions: actions, options: options, course_labels: @course_labels, statuses: Submission.statuses.keys, refresh_element: "#refresh_element"} %>
From 08b3f526ccc5a1859354e1553c0413f9ab78a838 Mon Sep 17 00:00:00 2001 From: jorg-vr Date: Tue, 28 May 2024 10:15:18 +0200 Subject: [PATCH 7/9] Remove console.log --- app/assets/javascripts/dolos.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/app/assets/javascripts/dolos.ts b/app/assets/javascripts/dolos.ts index ab3b8530f0..a23c747fed 100644 --- a/app/assets/javascripts/dolos.ts +++ b/app/assets/javascripts/dolos.ts @@ -13,7 +13,6 @@ export function initDolosBtn(btnID: string, url: string): void { } export async function startDolos(btn: HTMLLinkElement, url: string): Promise { - console.log("Starting Dolos report generation", btn.id); const loader = document.getElementById(LOADER_ID) as LoadingBar; loader.show(); btn.classList.add("disabled"); From bed1fe66d9b69187769b449e22931a87cf742bd2 Mon Sep 17 00:00:00 2001 From: jorg-vr Date: Tue, 28 May 2024 10:17:18 +0200 Subject: [PATCH 8/9] update translation --- app/assets/javascripts/i18n/translations.json | 2 +- config/locales/js/nl.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/i18n/translations.json b/app/assets/javascripts/i18n/translations.json index 300462572f..4a8aca4084 100644 --- a/app/assets/javascripts/i18n/translations.json +++ b/app/assets/javascripts/i18n/translations.json @@ -722,7 +722,7 @@ "date_on": "op", "description_languages": "Taal van de beschrijving", "dolos": { - "view_report": "Plagiaat bekijken" + "view_report": "Rapport bekijken" }, "draft": "Concept", "dropdown": { diff --git a/config/locales/js/nl.yml b/config/locales/js/nl.yml index 049d6bab20..d7c4788906 100644 --- a/config/locales/js/nl.yml +++ b/config/locales/js/nl.yml @@ -333,5 +333,5 @@ nl: draft: Concept popularity: Populariteit dolos: - view_report: Plagiaat bekijken + view_report: Rapport bekijken From 29be82bef6cf8deebc848db6b41937155c7822de Mon Sep 17 00:00:00 2001 From: jorg-vr Date: Tue, 28 May 2024 10:24:15 +0200 Subject: [PATCH 9/9] Add content for javascripts --- app/views/evaluations/_exercises_progress_table.html.erb | 4 +++- app/views/submissions/index.html.erb | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/app/views/evaluations/_exercises_progress_table.html.erb b/app/views/evaluations/_exercises_progress_table.html.erb index d603d020ea..7b06cb6dfa 100644 --- a/app/views/evaluations/_exercises_progress_table.html.erb +++ b/app/views/evaluations/_exercises_progress_table.html.erb @@ -1,4 +1,6 @@ -<%= javascript_include_tag 'dolos' %> +<%= content_for :javascripts do %> + <%= javascript_include_tag 'dolos' %> +<% end %>
diff --git a/app/views/submissions/index.html.erb b/app/views/submissions/index.html.erb index 2059b316e5..b099b00014 100644 --- a/app/views/submissions/index.html.erb +++ b/app/views/submissions/index.html.erb @@ -1,6 +1,8 @@ <%= render 'activities/navbar_links' if @activity %> <%= render 'courses/navbar_links' if @course && !@activity %> -<%= javascript_include_tag 'dolos' %> +<%= content_for :javascripts do %> + <%= javascript_include_tag 'dolos' %> +<% end %>