More than one million people have enrolled in a Yale course on well-being. So what’s its secret?