corrected getcoursejson method