Merge branch 'MDL-42031-master' of git://github.com/mouneyrac/moodle

Conflicts:
	mod/assign/feedback/editpdf/yui/build/moodle-assignfeedback_editpdf-editor/moodle-assignfeedback_editpdf-editor-min.js
This commit is contained in:
Marina Glancy
2013-11-06 17:18:38 +11:00
5 changed files with 26 additions and 8 deletions
@@ -380,7 +380,25 @@ class document_services {
// Image files are stale - regenerate them.
$files = array();
} else {
return $files;
// Need to reorder the files following their name.
// because get_directory_files() return a different order than generate_page_images_for_attempt().
$orderedfiles = array();
foreach($files as $file) {
// Extract the page number from the file name image_pageXXXX.png.
preg_match('/page([\d]+)\./', $file->get_filename(), $matches);
if (empty($matches) or !is_numeric($matches[1])) {
throw new \coding_exception("'" . $file->get_filename()
. "' file hasn't the expected format filename: image_pageXXXX.png.");
}
$pagenumber = (int)$matches[1];
// Save the page in the ordered array.
$orderedfiles[$pagenumber] = $file;
}
ksort($orderedfiles);
return $orderedfiles;
}
}
return self::generate_page_images_for_attempt($assignment, $userid, $attemptnumber);
@@ -3140,11 +3140,11 @@ EDITOR.prototype = {
this.refresh_button_state();
}
this.load_all_pages();
}
this.dialogue.centerDialogue();
this.dialogue.show();
this.load_all_pages();
},
/**
File diff suppressed because one or more lines are too long
@@ -3140,11 +3140,11 @@ EDITOR.prototype = {
this.refresh_button_state();
}
this.load_all_pages();
}
this.dialogue.centerDialogue();
this.dialogue.show();
this.load_all_pages();
},
/**
+2 -2
View File
@@ -308,11 +308,11 @@ EDITOR.prototype = {
this.refresh_button_state();
}
this.load_all_pages();
}
this.dialogue.centerDialogue();
this.dialogue.show();
this.load_all_pages();
},
/**