Fix use of deprecated XBlock apis [PLAT-242]
Fix use of deprecated django functions