In the tracker - https://tracker.moodle.org/browse/MDL-21367
there was a change that is well intended, but some or many institutions might not agree with. I propose that this be a configuration option for the installation.
The current behavior is
1. hide a course total or category total.
2. add a grade item that is visible
it will trigger a change on the course total visibility status (and not inform you).
We have many instructors who want to hide their course total, as they might be showing a letter grade. It would should an "F" in the beginning of the term (depending upon other settings). So, they hide the course total from their students. But if they add any grade item, activity or do an import into a new grade item, the course total is now visible to the students. There are other reasons why an instructor might hide the course or category total.
I'd prefer that an installation of moodle could choose this behavior, and have an optional override at the course level.
We currently prevent the code from being run which triggers the unhide of the category or course total.
We will share a patch, that allows this to be configurable at the system and course level.
Some institutions might want to just put in the one line fix to prevent this.
I expect we'll post this configuration diff by end of may, to be considered as being integrated into moodle core.