Fix resize question image - refs BT#12892

See e5f386c719
pull/2487/head
Angel Fernando Quiroz Campos 9 years ago
parent 486e1e6f5c
commit dde61135e0
  1. 6
      main/exercise/question.class.php

@ -712,12 +712,12 @@ abstract class Question
*/
private function resizePicture($Dimension, $Max)
{
$picturePath = $this->getHotSpotFolderInCourse();
$picturePath = $this->getHotSpotFolderInCourse().'/'.$this->getPictureFilename();
// if the question has an ID
if ($this->id) {
// Get dimensions from current image.
$my_image = new Image($picturePath.'/'.$this->picture);
$my_image = new Image($picturePath);
$current_image_size = $my_image->get_image_size();
$current_width = $current_image_size['width'];
@ -758,7 +758,7 @@ abstract class Question
}
$my_image->resize($new_width, $new_height);
$result = $my_image->send_image($picturePath.'/'.$this->picture);
$result = $my_image->send_image($picturePath);
if ($result) {
return true;

Loading…
Cancel
Save