Almost-primes in arithmetic progressions and short intervals