Skip to content

RUN-43 #727

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

DanyaMarchenko
Copy link
Contributor

Fix wrong difficulty and points values in exercise creation. Update exercise creation page entries for difficulty and points. Fix plus icon hiding in assignment exercises table.

…ercise creation page entries for difficulty and points. Fix plus icon hiding in assignment exercises table.
@DanyaMarchenko DanyaMarchenko requested a review from bnmnetp as a code owner May 25, 2025 19:47
@@ -161,7 +161,7 @@ export const BaseExerciseSettingsContent = <T extends BaseExerciseSettings>({
min={1}
max={5}
className="w-full"
onValueChange={(e) => updateSetting("difficulty", e.value !== null ? e.value : 3)}
onChange={(e) => updateSetting("difficulty", e.value !== null ? e.value : 1)}
Copy link
Contributor

Choose a reason for hiding this comment

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

Please avoid code duplication. create a separate function inside the component and use it in both places

@@ -20,24 +20,13 @@ export const exercisesApi = createApi({
createNewExercise: build.mutation<number, CreateExercisesPayload>({
query: (body) => ({
method: "POST",
url: "/assignment/instructor/new_question",
url: "/assignment/instructor/question_creation",
Copy link
Contributor

Choose a reason for hiding this comment

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

Would it be better to call the endpoint just POST /assignment/instructor/question ?

I assume the HTTP POST method already gives a clear idea of what we're doing here. What do you think, @bnmnetp ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I agree that it's better. Renamed it in the new commit

…ssary import. Remove code duplication in BaseExerciseSettingsContent.tsx
@bnmnetp
Copy link
Member

bnmnetp commented Jun 18, 2025

Sorry for letting this linger. I think the conflicts should be easy to resolve and then I will get this merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants