This refers to Moodle 3.10 from August 2021 onwards
It is possible to hide a whole section or topic from students
Navigate to the relevant Moodle module.
Click on the 'Turn Editing on' button in the top-right .
If a section is hidden, it will say 'Hidden from students' under the title of the section (see below)
3. Visibility of items can be toggled by clicking Edit, then selecting 'Hide' or 'Show' from the option list.
4. When finished click on the 'Turn editing off' button in the top right of your Moodle page
NOTE: You may have to refresh or reload your web page (use the option in your browser) to see the grey disappear.
For Single Items
Visibility is set by opening the Edit menu next to the item and selecting 'Hide' or 'Show' as required. Make sure you have turned the editing on your page beforehand.
What about assignments?
If an assignment is hidden then students will NEITHER see the assignment NOR their marks.