Is it just me or does the automatic voice sound regretful when pronouncing this sentence? I know that some voices can do that, but I would be very much surprised if they could already detect the meaning of a sentence in this way, or if the course contributors had programmed this. (I thought there was no infrastructure for this.)
Slightly more precisely: The only case when an adjective in front of a noun is not inflected is if it is a singular neuter (het) word without the definite article het. Usually it has the indefinite article een in that case, but it could also be geen or in some contexts (tables, titles, etc.) no article at all.
If it is used just before the noun (The weak child) it gets the -e. If it is used as it's own word (The child is weak), then it does not have an -e. The main exception to this is if it follows the word EEN, in which case only DE words have an -e and HET words do not have -e.