// remove from underlying model
((GenericQtiNode) clickedNode.getParent()).removeQTIObjectAt(clickedNode.getPosition());
// remove from tree model
clickedNode.removeFromParent();
qtiPackage.serializeQTIDocument();
menuTree.setSelectedNodeId(clickedNode.getParent().getIdent());
event(ureq, menuTree, new Event(MenuTree.COMMAND_TREENODE_CLICKED));
//ask user to confirm referenced media removal
if(deletableMediaFiles!=null && deletableMediaFiles.size()>0) {