There is a confirm message when attempting to delete a course that has items in it, but it should also warn about the number of items in the course. If a course has many items in it they may decide not to delete it, or realise they are deleting the wrong one.
Created attachment 66679 [details] [review] Bug 19231: Add number of attached items to confirm message when deleting course To test: 1) Ensure UseCourseReserves is enabled 2) Go to Course Reserves and create 3 new courses 3) Add one item to a course, add two items to another course, and add no items to the third course 4) Delete the course with no items. Confirm the error message shows up. No need to say how many attached items there are here (because there are none). 5) Delete the course with one item. Confirm the error message shows and warns of the one attached item and makes grammatical sense 6) Delete the course with two items. Confirm the error message shows and shows the correct number of attached items and makes grammatical sense 7) Confirm clicking 'Cancel' and 'OK' does what is expected Sponsored-by: Catalyst IT
Hi Aleisha, I only got the normal warning message, but didn't get any information about the number of items attached.
I followed the steps and go the same results as Claire did. No error messages, only the normal warning were shown, none specified the items attached to the course.
Created attachment 67069 [details] showing expected warning pop up (In reply to Claire Gravely from comment #2) > Hi Aleisha, > I only got the normal warning message, but didn't get any information about > the number of items attached. (In reply to Dominic Pichette from comment #3) > I followed the steps and go the same results as Claire did. No error > messages, only the normal warning were shown, none specified the items > attached to the course. Thank you both for testing, sorry I wasn't clear in my test plan. The normal warning pop up should be what shows, not an error message, that was my mistake. However, for courses that have more than one item in course, there should be an extra sentence in the warning, such as in the screenshot attached. I have tested and it is showing for me. Could you please test again?
Created attachment 67071 [details] [review] Bug 19231: Add number of attached items to confirm message when deleting course To test: 1) Ensure UseCourseReserves is enabled 2) Go to Course Reserves and create 3 new courses 3) Add one item to a course, add two items to another course, and add no items to the third course 4) Delete the course with no items. Confirm the error message shows up. No need to say how many attached items there are here (because there are none). 5) Delete the course with one item. Confirm the error message shows and warns of the one attached item and makes grammatical sense 6) Delete the course with two items. Confirm the error message shows and shows the correct number of attached items and makes grammatical sense 7) Confirm clicking 'Cancel' and 'OK' does what is expected Sponsored-by: Catalyst IT Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de> Looks good!
Created attachment 68726 [details] [review] Bug 19231: Add number of attached items to confirm message when deleting course To test: 1) Ensure UseCourseReserves is enabled 2) Go to Course Reserves and create 3 new courses 3) Add one item to a course, add two items to another course, and add no items to the third course 4) Delete the course with no items. Confirm the error message shows up. No need to say how many attached items there are here (because there are none). 5) Delete the course with one item. Confirm the error message shows and warns of the one attached item and makes grammatical sense 6) Delete the course with two items. Confirm the error message shows and shows the correct number of attached items and makes grammatical sense 7) Confirm clicking 'Cancel' and 'OK' does what is expected Sponsored-by: Catalyst IT Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de> Looks good! Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 68783 [details] [review] Bug 19231: No need to pass the size to the template We have the array already, we just need to call .size on it
Pushed to master for 17.11, thanks to everybody involved!