Depth and difficulty of mandatory courses that could be elective Background
Some universities around the world still don't adopt the common system of elective classes. To broaden the scope of this question, one could also consider the applicability of answers in high school or any other technical degree.
Problem
Consider the following scenario: every available class is mandatory. How should a course be given knowing that is not a strong requisite for your students but you still want to give them the opportunity to go deep in to the subject?
Concrete example to discuss
In a computer engineering department, there is a course on Web Programming. Strictly speaking, Computer Engineers are not expected to be proficient in web programming, but it is a valuable skill nowadays and is of interest of many of them.
For all engineering students, there is a two-semester course on linear algebra. The second semester is focused on complex spaces and cover topics like Jordan Canonical Form. The course is highly theoretical and focused on theorem demonstrations instead of applications and engineering concepts.
Approaches
What methodology would be a best practice? If the answer may vary according to situation, what factors should influence the choice of one over another?

In-depth lectures, broad coverage but low complexity exams/assignments
In-depth lectures, basic concepts but higher complexity exams/assignments
Basic coverage overall, with in-depth extra material provided.
&lt; Open to suggestions &gt;

One idea I'm particularly fond of is extra credits in assignments and exams that cover the deeper knowledge available.
In such an inflexible curriculum, this may not be possible, but one thing that I frequently encountered in my undergraduate and graduate education was courses with an option "add-on" component.  The lectures were the same, but the students who opted into the add-on were expected to do extra work outside of class.  In different classes, this can take on different forms, such as extra assignments, or a final project, or a stronger version of the same project everybody else was doing, or something else entirely.  In exchange, the students a) get a deeper education in the material, and b) receive additional units for their transcript.  The latter can be a significant incentive, particularly since students usually don't opt for extra units unless it's a subject they are likely to receive a good grade in.