ucfopen / Materia-Server-Client-Assets

Common Javascript and CSS resources needed for Materia and the Materia Widget Development Kit.
https://ucfopen.github.io/Materia-Docs/
GNU Affero General Public License v3.0
3 stars 10 forks source link

Imported questions should strip all question/answer IDs. #37

Open FrenjaminBanklin opened 5 years ago

FrenjaminBanklin commented 5 years ago

Refer to https://github.com/ucfopen/Materia/issues/1188.

Question and answer IDs - though especially question ids - need to be unset on any imported questions to prevent the possibility of collisions within the same widget.

Example: Create a widget, import a question, then import the same question again. Now two copies of the same question exist in the widget, both with the same ID. At the very least this causes issues in (most) widget score modules.

Setting IDs to the default/null values will allow the backend to correctly set them uniquely and prevent collisions.