Skip to content

Commit

Permalink
actually save series id
Browse files Browse the repository at this point in the history
  • Loading branch information
jorg-vr committed Jun 14, 2024
1 parent 3279246 commit b4083d0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/assets/javascripts/exercise.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<void> {
async function initExerciseShow(exerciseId: number, programmingLanguage: string, loggedIn: boolean, editorShown: boolean, courseId: number, _deadline: string, baseSubmissionsUrl: string, boilerplate: string, seriesId: number): Promise<void> {
let editor: EditorView;
let lastSubmission: string;
let lastTimeout: number;
Expand Down Expand Up @@ -228,6 +228,7 @@ async function initExerciseShow(exerciseId: number, programmingLanguage: string,
code: code,
exercise_id: exerciseId,
course_id: courseId,
series_id: seriesId,
},
}),
"headers": {
Expand Down
1 change: 1 addition & 0 deletions app/views/activities/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@ end %>
<%= raw "\"#{@series&.deadline&.httpdate}\"" || "null" %>,
"<%= submissions_url %>",
`<%= escape_javascript (@activity.exercise? && @activity.boilerplate)|| "" %>`,
<%= @series&.id || "null" %>,
);
});
</script>

0 comments on commit b4083d0

Please sign in to comment.