do not reuse pointer (call-by-reference) $drag for editing task of questtype ?Drag&Drop? (fixs #160)
This commit is contained in:
parent
b8de91c048
commit
9c9efafc65
1 changed files with 3 additions and 3 deletions
|
|
@ -256,10 +256,10 @@
|
||||||
if(!is_null($dndField))
|
if(!is_null($dndField))
|
||||||
{
|
{
|
||||||
$drags = $this->Dragndrop->getDrags($dndField['quest_id']);
|
$drags = $this->Dragndrop->getDrags($dndField['quest_id']);
|
||||||
foreach($drags as &$drag)
|
foreach($drags as &$d)
|
||||||
{
|
{
|
||||||
$drag['media'] = $this->Media->getSeminaryMediaById($drag['questmedia_id']);
|
$d['media'] = $this->Media->getSeminaryMediaById($d['questmedia_id']);
|
||||||
$drag['drops'] = array_map(function($d) { return $d['id']; }, $this->Dragndrop->getDropsForDrag($drag['id']));
|
$d['drops'] = array_map(function($d) { return $d['id']; }, $this->Dragndrop->getDropsForDrag($d['id']));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue