-
-
Notifications
You must be signed in to change notification settings - Fork 80
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
base: main
Are you sure you want to change the base?
RUN-43 #727
Conversation
…ercise creation page entries for difficulty and points. Fix plus icon hiding in assignment exercises table.
@@ -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)} |
There was a problem hiding this comment.
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", |
There was a problem hiding this comment.
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 ?
There was a problem hiding this comment.
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
Sorry for letting this linger. I think the conflicts should be easy to resolve and then I will get this merged. |
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.