* Editing the coordinate string now correctly updates the image only if
the coordinates are valid.
* ... and does the right thing if the number of handles has changed.
* Dragging the shape handles is now constrained so that you cannot
create a shape that goes beyond the edge of the image.
* The PHP validation that the shape is within the imagehas also been
fixed.
* For Mac users, CMD+Click duplicates the handle like CTRL+Click.
* Ensure the shape being edited is always on top of the otehrs.
In the rewrite is one improvement: drag items now animate when they
are moved, for example out of a drop place and back home. Other than
that, the functionality is unchanged. Also, as far as possible, the
HTML structure has not been changed (althought with changes to the HTML,
further JS improvements would be possible. However, those have been left
for a future issue).
Variants should also be treated like random questions in the sense that
a summary row
should be displayed for them as well.
This commit deals with handling variants.
Also the name of the calculated_random_question_summary class has
changed to
calculated_question_summary to be more generic as the summary row is not
specific to random questions only.
Also removed the protected function too_many_subq_and_or_variant_rows
and the const SUBQ_AND_VARIANT_ROW_LIMIT as they were not being used
anymore.
Part of MDL-62610
Fixed calculated_random_question_summary:get_min_max_of and calculated_random_question_summary:get_min_max_of_sd
functions and added unit tests
Part of MDL-62610
Modified calculated_random_question_summary class so that it can return minimum and maximum
of each attribute of the sub questions it is summarising.
Part of MDL-62610
Fix GIFT import to respect default answernumbering for new multichoice
questions (introduced in MDL-50011). Default for shuffleanswers is still
ignored, as this is a rather coarse-grained way to do it, and the wrong
setting for shuffleanswers would irreversibly alter the meaning of some
questions.
This is not an ideal long-term fix, but will save significant effort
for anyone who needs to be able to set answernumbering style for
questions imported in GIFT format.