Yes, you need consent if the photo is taken at a private place or function. You should blur or remove the person(s) photo before posting it.
As much as possible, avoid uploading to online image editors or mobile apps that may store the photo on their servers and use it for whatever purpose.
No. The student number is considered Sensitive Personal Information under the DPA (see definition below). Regardless of the exam result, students consider exams and grades private data.
DPA of 2012 Chapter 1 Sec.3(l) defines sensitive personal information as follows:
Sensitive personal information refers to personal information:
Data collection should follow the principle of proportionality. Only collect what is necessary to process the data according to your units' functions. If you need to collect data that is not required by your unit, you must obtain consent from the data subject and state the collection and processing purpose.