code to convert courses to html datalist options