Solution:
Concept: A drying agent must remove water vapour without reacting with the gas. Hydrogen chloride is an acidic gas, so it cannot be dried with a basic substance.
Step 1 — (a) Find the mistake.
The student passed the gas over calcium oxide (quick lime). Calcium oxide is a basic oxide, so it reacts with the acidic hydrogen chloride and absorbs it. No hydrogen chloride came out of the tube, so none could be collected.
CaO+2HCl→CaCl2+H2O
Step 2 — (b) Choose the right drying agent.
Calcium oxide should be replaced by concentrated sulphuric acid, which removes water vapour and does not react with hydrogen chloride. The gas is bubbled through the acid in a wash bottle: the inlet tube dips into the acid and the outlet tube ends above it.
Step 3 — (b) Collect the dry gas.
The dry gas is then collected, as in the student's set-up, by upward displacement of air, because hydrogen chloride is heavier than air.

Watch out: Calcium oxide IS a drying agent, but only for gases that do not react with it (for example ammonia); a drying agent must suit the gas.
Therefore, (a) the student used calcium oxide, a basic drying agent, which reacts with and absorbs the acidic HCl gas; (b) the gas should be dried by passing it through concentrated sulphuric acid instead.