From b4083d01a1bc4cbb7567f705e3f04372f8e028fa Mon Sep 17 00:00:00 2001 From: jorg-vr Date: Fri, 14 Jun 2024 15:00:10 +0200 Subject: [PATCH] actually save series id --- app/assets/javascripts/exercise.ts | 3 ++- app/views/activities/show.html.erb | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/exercise.ts b/app/assets/javascripts/exercise.ts index 0c750c9907..cf68207499 100644 --- a/app/assets/javascripts/exercise.ts +++ b/app/assets/javascripts/exercise.ts @@ -139,7 +139,7 @@ function initExerciseDescription(): void { initCodeFragments(); } -async function initExerciseShow(exerciseId: number, programmingLanguage: string, loggedIn: boolean, editorShown: boolean, courseId: number, _deadline: string, baseSubmissionsUrl: string, boilerplate: string): Promise { +async function initExerciseShow(exerciseId: number, programmingLanguage: string, loggedIn: boolean, editorShown: boolean, courseId: number, _deadline: string, baseSubmissionsUrl: string, boilerplate: string, seriesId: number): Promise { let editor: EditorView; let lastSubmission: string; let lastTimeout: number; @@ -228,6 +228,7 @@ async function initExerciseShow(exerciseId: number, programmingLanguage: string, code: code, exercise_id: exerciseId, course_id: courseId, + series_id: seriesId, }, }), "headers": { diff --git a/app/views/activities/show.html.erb b/app/views/activities/show.html.erb index 27faf4d7ba..ebbf643c69 100644 --- a/app/views/activities/show.html.erb +++ b/app/views/activities/show.html.erb @@ -218,6 +218,7 @@ end %> <%= raw "\"#{@series&.deadline&.httpdate}\"" || "null" %>, "<%= submissions_url %>", `<%= escape_javascript (@activity.exercise? && @activity.boilerplate)|| "" %>`, + <%= @series&.id || "null" %>, ); });