This is a template for JS-based drag and drop quizzes in LiaScript documents.
To use these macros within your document, simply import it into LiaScript via:
import: https://raw.githubusercontent.com/MichaelMarkert/LiaScript_DragAndDrop_Template/refs/heads/main/README.md
Try to order these items correctly by dragging and dropping them!
@dragdroporder(@uid,4|2|3|1,1|2|3|4)
Try to order these items correctly by dragging and dropping them (hint: should be a sentence)!
@dragdroporder(@uid,solution|is|this|the,this|is|the|solution)
Select the correct numbers from the pool (hint: odd numbers only)!
@dragdropmultiple(@uid,1|2|3|4|5|6,1|3|5)
Select the correct numbers from the pool (hint: even numbers only)!
@dragdropmultiple(@uid,1|2|3|4|5|6,2|4|6)
Just put
@dragdroporder(@uid,4|2|3|1,1|2|3|4)
, or
@dragdroporder(@uid,solution|is|this|the,this|is|the|solution)
, where
@uidgenerates an id for the quiz which is important for correct implementation- parameter after
@uidis the initial order of elements (separated by|), and the - second parameter is the correct order of elements (separated by
|)
I tried to avoid having @uidin the script by nesting in the header (@dragdroporder: @dragdroporder_(@uid,@0)) but then the second parameter is not written correctly which breaks the quiz.