-
Notifications
You must be signed in to change notification settings - Fork 303
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
Quiz exercises
: Allow decimal point values for quiz questions
#10232
Open
badkeyy
wants to merge
10
commits into
develop
Choose a base branch
from
feature/quiz-exercises/allow-decimal-points
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 7 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
962995e
Add decimal points to quiz exercise
badkeyy f6db5f7
Adapt tests
badkeyy 6188a3b
Fixed point issue messages
badkeyy a0e6105
Update src/main/webapp/app/exercises/quiz/manage/multiple-choice-ques…
badkeyy c060921
Change tests to be able to handle the double values
badkeyy 7969467
Make sure QuizQuestion can handle the new double value
badkeyy 26f3d98
Update src/main/java/de/tum/cit/aet/artemis/quiz/domain/QuizQuestion.…
badkeyy 53a6163
Removed step and double max points
badkeyy c1a2ad8
Update src/main/java/de/tum/cit/aet/artemis/quiz/domain/QuizQuestion.…
badkeyy 5eba6d2
Change Double to double in getter and setter
badkeyy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
src/main/resources/config/liquibase/changelog/20250129173003_changelog.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog https://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-latest.xsd"> | ||
<changeSet id="20250129173003" author="badkeyy"> | ||
<modifyDataType tableName="quiz_question" columnName="points" newDataType="double"/> | ||
</changeSet> | ||
</databaseChangeLog> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,7 +21,16 @@ | |
<div class="question-card-header-inputs"> | ||
<div class="form-group question-score"> | ||
<span jhiTranslate="artemisApp.quizQuestion.score" class="colon-suffix"></span> | ||
<input class="form-control" title="score" type="number" min="1" [max]="MAX_POINTS" [(ngModel)]="question.points" (ngModelChange)="questionUpdated.emit()" /> | ||
<input | ||
class="form-control" | ||
title="score" | ||
type="number" | ||
min="0" | ||
[max]="MAX_POINTS" | ||
step="0.5" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this might be too restrictive. I think removing the step would make sense, and instructors are responsible for which points they assign themselves. |
||
[(ngModel)]="question.points" | ||
(ngModelChange)="questionUpdated.emit()" | ||
/> | ||
</div> | ||
<div class="question-type"> | ||
<h3 class="mb-0"><span class="badge bg-warning align-text-top">DnD</span></h3> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
🛠️ Refactor suggestion
Align method signatures with primitive double field type.
The methods are using
Double
wrapper type while the field is primitivedouble
. This inconsistency leads to unnecessary boxing/unboxing operations.📝 Committable suggestion