Query assignment by assignmentId and courseId