-
Notifications
You must be signed in to change notification settings - Fork 74
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
Personalized points goal #1387
Personalized points goal #1387
Conversation
1d124db
to
a5103c2
Compare
a5103c2
to
c694072
Compare
c6e7c85
to
2dc4c8e
Compare
2dc4c8e
to
c07dbdb
Compare
e8a83ba
to
bd05872
Compare
bd05872
to
145ac2f
Compare
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.
Nice!
A couple of comments from me, and a question:
Is it currently possible to remove points goals at all?
If not, it should be added as an option for the user.
Maybe setting the goal to zero should remove it completely?
exercise/templates/exercise/personalized_points_goal_modal.html
Outdated
Show resolved
Hide resolved
b93cbd1
to
3a4d0d1
Compare
3a4d0d1
to
debfa75
Compare
7e200b7
to
67f5158
Compare
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.
Good job on the fixes!
Is it possible to check if there exists a points goal when clicking the button, and if it exists, show the Remove-button in the modal? If there is no points goal the button wouldn't be shown.
Also, if a previous goal exists, it would be nice if it was auto-filled into the points goal input field.
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.
Can the Remove
button be hidden after it has been clicked? Currently, it's possible to click it more than once, which results in a failure message.
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.
Nice! Let's wait for @murhum1 to review this too.
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.
Added some comments and change requests; might still be missing some, but will check the rest tomorrow!
8326413
to
8caddf7
Compare
if ($progressDiv.length) { | ||
const tooltipTitle = $progressDiv.attr('data-original-title'); | ||
const parser = new DOMParser(); | ||
const doc = parser.parseFromString(tooltipTitle, 'text/html'); |
Check warning
Code scanning / CodeQL
DOM text reinterpreted as HTML Medium
DOM text
// Update tooltip | ||
const tooltipTitle = $progressDiv.attr('data-original-title'); | ||
const parser = new DOMParser(); | ||
const doc = parser.parseFromString(tooltipTitle, 'text/html'); |
Check warning
Code scanning / CodeQL
DOM text reinterpreted as HTML Medium
DOM text
867c68a
to
2f99612
Compare
I added some more fixes:
Is the renaming operation ok for you @mikaelGusse? If so, I'll proceed with the merge. |
Yes. All of these changes seem sensible to me. Go ahead and merge 👍 |
Description
What?
Add a feature to the progress bar for modules which allows you to set a points goal for that particular module. When this goal is reached, the points progress bar changes color to blue.
Why?
Was asked for and improves the student experience of using APlus.
How?
Changed templates, added a new class to store points goals, added a modal to the interface to modify and create goals.
Also changed how the points required vertical bar is shown to be clearer.
Fixes #1332
Testing
Remember to add or update unit tests for new features and changes.
What type of test did you run?
Added playwright tests to test this feature. Manually tested different combinations of required points, points goals etc.
Did you test the changes in
Think of what is affected by these changes and could become broken
Translation
Programming style
Have you updated the README or other relevant documentation?
Is it Done?
Clean up your git commit history before submitting the pull request!