numbas / Numbas

A completely browser-based e-assessment/e-learning system, with an emphasis on mathematics
http://www.numbas.org.uk
Apache License 2.0
197 stars 118 forks source link

Feature request: add parts to basket to create new question #1103

Open wrushworth opened 1 month ago

wrushworth commented 1 month ago

I often find myself wishing that I could copy individual question parts from distinct questions, and combine them to create a new question. E.g. copy parts b), c) from Question X and part d) from Question Y, and combine them into the new Question Z.

This could be done in a similar fashion to how exams are created by adding questions to the user's basket. An important difference would be the need to copy the question parts into a new question (in contrast to the exam functionality that attachs questions to exams, so that editing a question alters every exam it is attached to).

christianp commented 1 month ago

This has been asked for before, but I'm surprised I can't find an issue for it. I think that the right mechanism is the clipboard, rather than the basket. But the clipboard API hasn't been properly implemented yet, so I've put off doing this.

A big problem is that you'd need to copy over all the variables that a part uses, and any extensions or custom functions used by the question. I suppose that a copied part could come with a list of the definitions of all those things, and add them in to the question if they're not present.