The images were not loading in the filemanager.
This meant that when the element was saved the
images would be deleted for that course, affecting
existing image elements as well.
It may not be the case where everyone wants the name of the grade item to be displayed on the page next to the grade. However, if they do they can simply add another element to show the desired name.
This variable determines whether we are viewing the custom certificate for a particular user, or if we are simply previewing it. This may be needed for some elements. For example, an element may retrieve the data for when the custom certificate was issued, but if the user has just set up the custom certificate and no issue has been created then this data is missing, so in this case we pass that the user is previewing the custom certificate so other data can be shown.