Adding api_get_cidreq() in URL before redirecting.
Adding course code in URL in order to fix the "newscorm -1" error see BT#6962
Minor - style code.