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

Require at least one correct submission and a valid config before publishing #5330

Merged
merged 11 commits into from
Feb 2, 2024

Conversation

jorg-vr
Copy link
Contributor

@jorg-vr jorg-vr commented Jan 29, 2024

This pull request adds a validation to activities that checks if an activity has at least one correct submission and a valid config before publishing.

This info is displayed to the user in the notice.

image

  • Tests were added

Closes #5084

@jorg-vr jorg-vr added the enhancement A change that isn't substantial enough to be called a feature label Jan 29, 2024
@jorg-vr jorg-vr self-assigned this Jan 29, 2024
@jorg-vr jorg-vr requested a review from a team as a code owner January 29, 2024 15:25
@jorg-vr jorg-vr requested review from bmesuere and chvp and removed request for a team January 29, 2024 15:25
@jorg-vr jorg-vr marked this pull request as draft January 29, 2024 15:30
@jorg-vr jorg-vr marked this pull request as ready for review January 29, 2024 16:19
Copy link
Member

@chvp chvp left a comment

Choose a reason for hiding this comment

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

  • In general I would not use the valid terminology, but use correct everywhere.

app/models/activity.rb Outdated Show resolved Hide resolved
config/locales/models/nl.yml Outdated Show resolved Hide resolved
@jorg-vr jorg-vr requested a review from chvp January 30, 2024 08:57
Copy link
Member

@bmesuere bmesuere left a comment

Choose a reason for hiding this comment

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

In the current implementation, the check is only done when trying to publish. I would do this every time when we render the "this exercise is a draft" callout and add some kind of checklist there so it is clear which steps need to be taken, like

  • have a problem description in Dutch and/or English
  • have a valid configuration
  • have at least one correct submission

In the future, we could expand that list if we would think of other requirements.

@jorg-vr jorg-vr changed the title Require at least one correct submission before publishing Require at least one correct submission and a valid config before publishing Jan 31, 2024
@jorg-vr jorg-vr requested review from bmesuere and chvp January 31, 2024 10:45
Copy link
Member

@bmesuere bmesuere left a comment

Choose a reason for hiding this comment

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

Can you indent the text starting from line 2 a bit so it aligns with the text of line 1?

config/locales/views/activities/en.yml Outdated Show resolved Hide resolved
config/locales/views/activities/nl.yml Outdated Show resolved Hide resolved
jorg-vr and others added 3 commits February 1, 2024 15:13
Co-authored-by: Bart Mesuere <Bart.Mesuere@UGent.be>
Co-authored-by: Bart Mesuere <Bart.Mesuere@UGent.be>
@jorg-vr jorg-vr requested a review from bmesuere February 1, 2024 14:17
@jorg-vr jorg-vr merged commit 493c7d8 into main Feb 2, 2024
13 checks passed
@jorg-vr jorg-vr deleted the enhance/draft-remove branch February 2, 2024 09:33
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.

Check valid configuration when publishing draft exercise
3 participants