mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 16:32:18 +02:00
MDL-49864 mod_assign: Fix missing annotations when viewing PDF
Added 'draft = 1' criteria for the delete query in page_editor::set_annotations in order to prevent the deletion of non-draft annotations while the PDF is being edited.
This commit is contained in:
parent
032a4fe51c
commit
0bf75ff15f
@ -159,7 +159,7 @@ class page_editor {
|
||||
public static function set_annotations($gradeid, $pageno, $annotations) {
|
||||
global $DB;
|
||||
|
||||
$DB->delete_records('assignfeedback_editpdf_annot', array('gradeid'=>$gradeid, 'pageno'=>$pageno));
|
||||
$DB->delete_records('assignfeedback_editpdf_annot', array('gradeid' => $gradeid, 'pageno' => $pageno, 'draft' => 1));
|
||||
$added = 0;
|
||||
foreach ($annotations as $record) {
|
||||
// Force these.
|
||||
|
Loading…
x
Reference in New Issue
Block a user