Start expert mode
Use the expert mode as follows:
Go the course you wish to edit in the course view. Click on the pencil icon at the top of the page to open the editing mode.
Switch to the Visibility or Access tab in the desired course element. Clicking on the Display expert mode button opens a text field.
Enter your expert syntax in this field. Confirm your entries with Save.
Publish the course for your changes to take effect.