MOODLE2: Correct get_service_url function