Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Save series_id for submissions #5609

Merged
merged 20 commits into from
Jul 3, 2024
Merged

Conversation

jorg-vr
Copy link
Contributor

@jorg-vr jorg-vr commented Jun 14, 2024

This pull request saves the series_id when creating a submission or an activity read state.

It also limits visibility of hidden series to course_members.

This series ID is used for:

  • better links to the activity in series in course from a submission (defaults to previous behavior if no series present)
  • determining the next suggested activities on the homepage (will only suggest course if no series_id present)
  • validating if activity is accessible within that specific series when submitting (defaults to previous behavior if no series present)

This ID currently isn't used for the activity status. This is planned for a next step, but we'll also need a decent change for existing submissions.

Next steps:

  • Use series id for activity status
  • Handle removal of series/removal of activities from series
  • Update existing submissions or correctly handle submissions without series_id
  • Tests were added

Part of #5548

@jorg-vr jorg-vr added the chore Repository/build/dependency maintenance label Jun 14, 2024
@jorg-vr jorg-vr self-assigned this Jun 14, 2024
@pdawyndt
Copy link
Contributor

While working on this issue, we might also consider storing some other submission properties that are now missed. It concerns those properties that are passed to the judge upon submission. One such property is the language setting of the user upon submission. As this is not stored, we no longer have that information upon re-evaluation. As a result, the language setting of the person re-evaluating is taken as the language passed to the judge upon re-evaluation (which changes the feedback in that respect).

@jorg-vr jorg-vr marked this pull request as ready for review June 17, 2024 15:14
@jorg-vr jorg-vr requested a review from bmesuere as a code owner June 17, 2024 15:14
@bmesuere bmesuere added enhancement A change that isn't substantial enough to be called a feature and removed chore Repository/build/dependency maintenance labels Jun 26, 2024
app/assets/javascripts/exercise.ts Outdated Show resolved Hide resolved
app/models/activity.rb Outdated Show resolved Hide resolved
app/models/activity.rb Show resolved Hide resolved
app/models/submission.rb Outdated Show resolved Hide resolved
db/migrate/20240614111643_add_series_id_to_submissions.rb Outdated Show resolved Hide resolved
@bmesuere bmesuere requested a review from niknetniko June 26, 2024 07:46
Copy link
Member

@niknetniko niknetniko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Besides the single comment, the code looks good.

Do we also want to include this information in the JSON API, or is it better to do this later?

app/models/series.rb Show resolved Hide resolved
@jorg-vr jorg-vr merged commit 2f94f5d into main Jul 3, 2024
13 checks passed
@jorg-vr jorg-vr deleted the feat/link-submissions-to-series branch July 3, 2024 09:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement A change that isn't substantial enough to be called a feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants