MDL-36020 overview/report: fix quiz regrade session lock

MDL-36020 overview/report: reduce duplicates in unlocking sessions

MDL-36020 overview/report: revise comment style

MDL-36020 overview/report: add unlock_session function

MDL-36020 overview/report: remove whitespace at the end of line