The following extract is taken from the Equality and Human Rights Commission (EHRC) website:

If a pupil cannot attend school because of pregnancy, the LEA still has
a duty to provide suitable alternative education, under section 19 of
the Education Act 1996. ‘Suitable education’ is defined by section
19(6) as efficient education suitable to the age, ability, aptitude and
to any special educational needs the child or young person may have.’
Lack of resources is not a sufficient reason for the LEA to fail to
provide suitable alternative education.

Pregnancy cannot be used as a reason for exclusion.Health and safety
should not be used as a reason to prevent a pregnant pupil attending
school. The school’s aim should be to keep the pregnant pupil or school
age mother in learning. This means keeping the pupil on the school
roll, even if she may not be able to attend for a period of time;
keeping up to date with her progress and working with the LEA looking
for a suitable time to re-integrate her into the school. A pupil who
becomes pregnant is entitled to 18 calendar weeks’ authorised absence
to cover the time immediately before and after the birth of the child.

An education provider should not treat a pregnant woman or a new mother worse than they would treat a man or a non-pregnant
woman.

It is not sex discrimination against a man to make special provision for a woman in connection with her pregnancy or maternity.

Flexibility in course provision and child care:

In
order to ensure that course provision meets the needs of all students
and potential students, HEIs should consider the impact that parenting
and caring responsibilities have on women’s and men’s ability to engage
in higher education.

Courses
that are delivered flexibly will enable women and men with caring
responsibilities to access FE and HE. Provision that fits in with
their caring responsibilities and affordable childcare on or nearby
campus, can assist in widening participation. You
are permitted to provide (or make arrangements for or facilitate)
childcare for your students’ children. This includes all kinds of
assistance with childcare including paying for it, subsidising it, or
enabling students to spend more time caring for their child.