Your players misunderstand how rituals work.
Casting a ritual adds a time cost of ten additional minutes to the casting time. So casting Detect Magic this way takes one action and ten minutes before they gain the benefit of the effect.
Detect Magic has a regular duration of ten minutes, but your players need to cast the spell first before they can use it - they can either do so by using a spell slot or spending the additional time cost of the ritual. Rituals:
Certain spells have a special tag: ritual. Such a spell can be cast
following the normal rules for spellcasting, or the spell can be cast
as a ritual. The ritual version of a spell takes 10 minutes longer to
cast than normal. It also doesn't expend a spell slot, which means the
ritual version of a spell can't be cast at a higher level.
For more information read the section about Casting Time.
Also note that Detect Magic is a spell that requires concentration, so the wizard needs to maintain concentration while scouting out the area.
Some spells require you to maintain concentration in order to keep
their magic active. If you lose concentration, such a spell ends.
Normal activity, such as moving and attacking, doesn't interfere with
concentration. The following factors can break concentration:
- Casting another spell that requires concentration. You lose
concentration on a spell if you cast another spell that requires
concentration. You can't concentrate on two spells at once.
- Taking damage. Whenever you take damage while you are concentrating on a
spell, you must make a Constitution saving throw to maintain your
concentration. The DC equals 10 or half the damage you take, whichever
number is higher. If you take damage from multiple sources, such as an
arrow and a dragon's breath, you make a separate saving throw for each
source of damage.
- Being incapacitated or killed. You loseconcentration on a spell if you are
incapacitated or if you die. [...]
Also note that the penetrative magic detection of Detect Magic is restricted by materials:
The spell can penetrate most barriers, but it is blocked by 1 foot of
stone, 1 inch of common metal, a thin sheet of lead, or 3 feet of wood
So while the way the players used Detect Magic to scan an area within 10 minutes with a 30 feet radius is correct, they disregarded the cost to ritual casting - and there are additional things that you have to consider when they use Detect Magic like materials blocking off vision, concentration, and time, or spell slot cost - all of which are limited resources in dangerous situations.