maths / moodle-qtype_stack

Stack question type for Moodle
GNU General Public License v3.0
142 stars 149 forks source link

Add test of size of embedded media to the bulk check system #1249

Closed sangwinc closed 3 weeks ago

sangwinc commented 2 months ago

Colleagues are embedding large media into STACK questions, sometimes needlessly huge images. This is a particular problem for students in low-resource environments who pay for internet by the MB.

We need a line in the bulk checker to alert when a question has "large" (tbc) images.

This will also be a problem for version control, backup, etc. There is just no need to put a 5MB image into a STACK question!

This should be a warning, not an error, just as we have warnings for "unused" media.

sangwinc commented 2 months ago

A language tag for the error could go around here:

https://github.com/maths/moodle-qtype_stack/blob/master/lang/en/qtype_stack.php#L56

A size check (perhaps) could go here

https://github.com/maths/moodle-qtype_stack/blob/master/question.php#L1597

This is a "nice to have", so if checking the file size is really difficult then please just close this issue without resolving it for cost benefit.