Gitlab CSE Unil

Commit 95c08e27 authored by M. Chardon's avatar M. Chardon
Browse files

correction bug annotation draft mutlipage

parent 6eb9a543
......@@ -252,7 +252,7 @@ class page_editor {
public static function set_annotations($gradeid, $pageno, $annotations) {
global $CFG, $DB;
$annotationsRelease = $DB->get_records(self::BDDTABLEANNOTATION, array(self::GRADEID => $gradeid, self::DRAFLIB => 1));
$annotationsRelease = $DB->get_records(self::BDDTABLEANNOTATION, array(self::GRADEID => $gradeid, 'pageno' => $pageno, self::DRAFLIB => 1));
$added = 0;
if (!$annotationsRelease || sizeof($annotationsRelease) == 0 || $CFG->preserve_student_on_update == 0) {
......@@ -302,7 +302,6 @@ class page_editor {
return $added;
}
/**
* create an annotation for a draft
* @param annotation|record $annotationRecord annotation to create
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment