lml/ost#341: Fix code style and formatting.

- Added comments for weird code bits.
- Changed scope name from by_student to visible_by_student.
- Changed to do/end from braces.
- Changed present_user => user.