Replaced non-existing courseId var with proper date[courseid]