From: Penny Leach Date: Mon, 13 Apr 2009 13:58:26 +0300 Subject: [PATCH] Array fixes - change name of arrays in unique name. --- question/type/dragdrop/templates/dragdroparrange.tpl | 14 +++++++------- question/type/dragdrop/templates/dragdropshow.tpl | 12 ++++++------ question/type/dragdrop/dragdrop.php | 31 ++++++++++++++++--------------- 3 files changed, 29 insertions(+), 28 deletions(-) --- D:/shea/moodle/вопросы/dragdrop/dragdrop.php Sun Jul 06 08:21:34 2008 +++ D:/shea/moodle/вопросы/drugdrop_main/dragdrop.php Fri Apr 10 15:59:15 2009 @@ -184,12 +184,13 @@ $mediahotspot = $media->hotspots[$media->primary_hotspot]; $suffix = "{$this->dragdropqcount}_$i"; $container = "container$suffix"; - $hotspot = "hotspot$suffix"; + $hotspot = "hotspot$suffix".$id; $isimage = $this->is_image($media->media); $maxheight = max($maxheight, ($media->displayheight > 0 ? $media->displayheight : $media->height)); - $displayname = "gapimage$suffix"; + $displayname = "gapimage$suffix".$id; $displaylayers[$i]['tag'] = $this->dragdrop_tag($question->id, $media, $displayname, !$isimage); $displaylayers[$i]['name'] = $displayname; @@ -306,6 +307,7 @@ // Javascriptcode for DDGapImage object added here because we need it twice. // In dragdropshow.tpl and in dragdroparrange.tpl. $text = ""."\n"."\n"; + $smarty->assign('id1',$id); $smarty->assign('script1', $text); $text = ' --- D:/shea/moodle/вопросы/dragdrop/templates/dragdropshow.tpl Sat Jul 05 18:58:56 2008 +++ D:/shea/moodle/вопросы/drugdrop_main/templates/dragdropshow.tpl Thu Apr 09 15:53:40 2009 @@ -57,12 +57,12 @@ {$gapimages[img].tag}