3494-UI-improvements-grading-templates #21

Merged
ansv7779 merged 17 commits from 3494-UI-improvements-grading-templates into develop 2024-11-26 10:18:55 +01:00
Owner

Changes made to the grading template UI

Some of the improvements include:

  • When editing a template, and the user makes a change the user will be informed/alerted that the template has changed.
  • When editing a template the user will now see a project title that shows what project type that template has.
  • Default value of points required to pass has been changed from 0 -> 1
  • Requirements to points will be added by default when adding a new criteria.
  • The create button is now hidden until the user has chosen a grading template project type from the drop down menu.
  • Max available points are now updated as point requirements are added to the criterion.
Changes made to the grading template UI Some of the improvements include: - When editing a template, and the user makes a change the user will be informed/alerted that the template has changed. - When editing a template the user will now see a project title that shows what project type that template has. - Default value of points required to pass has been changed from 0 -> 1 - Requirements to points will be added by default when adding a new criteria. - The create button is now hidden until the user has chosen a grading template project type from the drop down menu. - Max available points are now updated as point requirements are added to the criterion.
niat8586 added 8 commits 2024-11-21 07:06:52 +01:00
Grading template did not have any way to alert the user that changes had been made when editing a template.

Added a way to detect and alert the user when changes have been made on the grading template they are editing. If the user removes his changes, so the template is in the same state as it was when the user started editing the template the alert will disappear.
When you chose to edit a template you could not see what type the template is.
For example if it was a bachelor or master type template.

Now when you choose to edit a grading template the type will be shown as a heading,
so you can more easily see what type of template you are currently editing.
The heading will read:
`You are editing a <type> grading template.`
The <type> will display the correct type of the grading template you are editing.

Open to change of what exactly the heading will display if anyone has a better idea for it.
When adding a new criteria to a template the default value of `Points required to pass` was `0` (zero).
Now when you add a new criterion to a template the `Points required to pass` default to `1` (one).
Previously if you created a new grading template chose a date for `Valid from` field and then added a criterion.
The valid from date would reset to null. This would create a validation error on save.
This creates unnecessary confusion for the user.

Now when you have chosen a date and then choose to add a criterion to the template the date does not reset.

The reason for this was that the AutoSave() added to the field was using the wrong event to trigger the setValidFrom().
Since we use bootstraps date picker we have to trigger on "changeDate" event.
When you added new criteria you only got to set the criterion title, type, flag and point but you had to manually add the requirements for the first criterion.

Now when you add a new criterion the new criterion will by default add the requirement for the points.

reverted a previous change in the for loop the correct condition was to check against 0, I accidently turned that to 1 in a previous commit. Also added a comment to try and explain what that condition checks for.
Previously a user could click on the create button before they had chosen a
grading template project type from the Project type dropdown.
This would result in a runtime exception, and possibly in an unhappy user.

To protect the user from "jumping the gun", the Create button will only become visible
after the user has selected a Project type from the dropdown menu.
Previously max available points where only updated when you added a new criterion.

It is beneficial that the user can see the max available points as they have completed editing the
template without having to click on the create button or add a new criterion.
Fix for project title commit 90604b8ef1f82343e913319c54802dbd09278027
All checks were successful
Build and test / build-and-test (push) Successful in 6m56s
774f1e9d7a
The project title was added to the wrong panel which caused side effect of showing a title when
creating a new template. Moved the previous code it is only shown when editing a template.

Also changed it to read the title from the database using the LoadableDetachableModel pattern.

Now the project title should only be shown when editing an existing template.
ansv7779 approved these changes 2024-11-22 10:08:32 +01:00
Owner

Code looks fine. However, it has to be updated against latest develop before it can be merged.

Code looks fine. However, it has to be updated against latest develop before it can be merged.
ansv7779 added this to the SciPro project 2024-11-25 14:26:50 +01:00
niat8586 added 9 commits 2024-11-26 06:37:31 +01:00
Grading template did not have any way to alert the user that changes had been made when editing a template.

Added a way to detect and alert the user when changes have been made on the grading template they are editing. If the user removes his changes, so the template is in the same state as it was when the user started editing the template the alert will disappear.
When you chose to edit a template you could not see what type the template is.
For example if it was a bachelor or master type template.

Now when you choose to edit a grading template the type will be shown as a heading,
so you can more easily see what type of template you are currently editing.
The heading will read:
`You are editing a <type> grading template.`
The <type> will display the correct type of the grading template you are editing.

Open to change of what exactly the heading will display if anyone has a better idea for it.
When adding a new criteria to a template the default value of `Points required to pass` was `0` (zero).
Now when you add a new criterion to a template the `Points required to pass` default to `1` (one).
Previously if you created a new grading template chose a date for `Valid from` field and then added a criterion.
The valid from date would reset to null. This would create a validation error on save.
This creates unnecessary confusion for the user.

Now when you have chosen a date and then choose to add a criterion to the template the date does not reset.

The reason for this was that the AutoSave() added to the field was using the wrong event to trigger the setValidFrom().
Since we use bootstraps date picker we have to trigger on "changeDate" event.
When you added new criteria you only got to set the criterion title, type, flag and point but you had to manually add the requirements for the first criterion.

Now when you add a new criterion the new criterion will by default add the requirement for the points.

reverted a previous change in the for loop the correct condition was to check against 0, I accidently turned that to 1 in a previous commit. Also added a comment to try and explain what that condition checks for.
Previously a user could click on the create button before they had chosen a
grading template project type from the Project type dropdown.
This would result in a runtime exception, and possibly in an unhappy user.

To protect the user from "jumping the gun", the Create button will only become visible
after the user has selected a Project type from the dropdown menu.
Previously max available points where only updated when you added a new criterion.

It is beneficial that the user can see the max available points as they have completed editing the
template without having to click on the create button or add a new criterion.
The project title was added to the wrong panel which caused side effect of showing a title when
creating a new template. Moved the previous code it is only shown when editing a template.

Also changed it to read the title from the database using the LoadableDetachableModel pattern.

Now the project title should only be shown when editing an existing template.
Author
Owner

Code looks fine. However, it has to be updated against latest develop before it can be merged.

Updated against latest develop. Do you want to do a last sanity check?

> Code looks fine. However, it has to be updated against latest develop before it can be merged. Updated against latest develop. Do you want to do a last sanity check?
ansv7779 merged commit 8a657b21dd into develop 2024-11-26 10:18:55 +01:00
ansv7779 deleted branch 3494-UI-improvements-grading-templates 2024-11-26 10:18:56 +01:00
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: DMC/scipro#21
No description provided.