Get name and course id from the database instead of manualy. Update
function added but still buggy :(