Don’t use the inline code style for multiple lines of code within activities. These will not be numbered and tend to be unstable. For multiple lines of code use the code formatting method detailed under the ‘Code snippets in activities’ heading below.
Code to be presented inline with text can be added to an activity using the same method used in a unit. Highlight the text to be code and select Style and then the Code option from the menu.
Code snippets can be added to activities using a slightly different method. The text menu for activities includes Code in the format ¶ menu.
To add code, first select this format (a grey format line should appear), then past the code to be added.
The code will be formatted and line numbers allocated upon saving the activity.