{"id":24843,"library":"xblock-drag-and-drop-v2","title":"XBlock Drag-and-Drop v2","description":"An XBlock for Open edX that provides a drag-and-drop problem type. Current version is 5.0.6, requires Python >=3.12, and supports Django 4.2 and 5.2. Release cadence is irregular, with minor patches and major version bumps aligned with platform updates.","status":"active","version":"5.0.6","language":"python","source_language":"en","source_url":"https://github.com/openedx/xblock-drag-and-drop-v2","tags":["xblock","openedx","drag-and-drop","learning"],"install":[{"cmd":"pip install xblock-drag-and-drop-v2","lang":"bash","label":"PyPI install"}],"dependencies":[{"reason":"Core XBlock framework required","package":"XBlock","optional":false},{"reason":"Web framework, version constraints via Django requirement","package":"Django","optional":false}],"imports":[{"note":"Main XBlock class for drag-and-drop","symbol":"DragAndDropBlock","correct":"from drag_and_drop_v2 import DragAndDropBlock"}],"quickstart":{"code":"from drag_and_drop_v2 import DragAndDropBlock\n# The block is typically used within an Open edX course.\n# Ensure that the XBlock runtime is properly configured.\nprint('Import successful')","lang":"python","description":"Quick import test. The block is usually registered via the XBlock runtime in Open edX."},"warnings":[{"fix":"Upgrade Python to 3.12 or later.","message":"Python 3.11 support dropped in v5.0.4; requires Python >=3.12.","severity":"breaking","affected_versions":"5.0.4+"},{"fix":"Use Python 3.9, 3.10, 3.11 (before 5.0.4), or 3.12+.","message":"Drop of Python 3.8 in v5.0.0; also added Python 3.12 support.","severity":"breaking","affected_versions":"5.0.0+"},{"fix":"Ensure the XBlock runtime is fully set up, e.g., in Open edX Studio or LMS.","message":"The block requires the XBlock runtime to be configured correctly. Simple imports without runtime may fail.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run 'pip install xblock-drag-and-drop-v2'","cause":"Library not installed in the Python environment","error":"ImportError: No module named 'drag_and_drop_v2'"},{"fix":"Use within an Open edX environment or mock the runtime with XBlock SDK.","cause":"The XBlock runtime is missing or improperly initialized","error":"RuntimeError: XBlock runtime not configured"},{"fix":"The block must be created via the XBlock runtime's 'runtime.construct_xblock' method.","cause":"Calling the constructor directly without proper XBlock initialization","error":"TypeError: DragAndDropBlock.__init__() got an unexpected keyword argument 'usage_id'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}