Finalizes a lecture by marking remaining students as absent and cleaning up resources. This function can be used without socket authentication checks.

finalizeLecture

If the finalize operation fails