Closed antoniodaugello closed 3 years ago
Hi there and sorry for the late reply.
Yes, that seems like a bug. That code was written a loooong time ago and I have forgotten why there is a random -12. I will look into this. Perhaps I can replace the YUI code completely.
I am closing this in favour of https://github.com/mdjnelson/moodle-mod_customcert/issues/416.
perfect. tnx
Hi Mark, congratulations on the awesome plugin. I have an element repositioning problem, i use moodle Version 3.10 and adaptable template. When i create a model and i use the reposition item and save all, in the db the background save in the column posy the value -12 and this value is application on all item before it's saved in database.
i have half solved editing file ajax.php
// Loop through the data. /foreach ($values as $value) { $element = new stdClass(); $element->id = $value->id; $element->posx = $value->posx; $element->posy = $value->posy; $DB->update_record('customcert_elements', $element); }/
// HALF FIX Loop through the data. foreach ($va lues as $value) { if($value->posy == -12){ $element = new stdClass(); $element->id = $value->id; $element->posx = $value->posx; $element->posy = $value->posy+12; } else { $element = new stdClass(); $element->id = $value->id; $element->posx = $value->posx; $element->posy = $value->posy;
} but the problem it's not resolve because $value->posy it is not always -12.
do you have any suggestions?
could it be a bug?
tnx