local_academywebservices updated to use new context API.