Fixing comparing date when showing popular courses refs #7005