LDEV-4187: Delegate non-HTTP-request tasks to own threads. Open and close Hibernate session for each of such thread. Bind created session to context and thread. Close session at the end of thread execution.
LDEV-4187: Commented out the actions that bind the session to the thread as this is causing the progress bar issues. Needs to be reviewed and fixed properly.
LDEV-4187: Debugging for the learner progress issues commented out in the code in case needed for future testing. Only the warnings left active to warn if the attempted activity set is wrong.
LDEV-4187: Synchronise completeActivity() method again. Do not pull LearnerProgress from DB as the same object seems to be fetched fron cache anyway. Add extra logs for attempted->completed activity transition.
LDEV-3971: Move code that creates a session on tool side to the same transaction where core tool session gets created. Otherwise a learner can read that the core session is created and enter the activity where tool session does not exist yet.