Academic Settings / Quiz Management / Quiz Settings / Basic Settings / Hide Anonymous Entries Check from Questionnaires
Here you define whether the user will have the possibility to submit quiz/survey anonymously.
If you enable this setting then the submit anonymously buttons disappear and the user submits normally. (Figure 1)
Example in student’s portal
Setting -> Active
Figure 1
Setting -> Inactive
Figure 2