Skip to content
Snippets Groups Projects
Unverified Commit 432550ae authored by Tim Schroeder's avatar Tim Schroeder
Browse files

fixed warning when commenting on a nonexistent annotation

parent f031c15e
Branches
No related tags found
No related merge requests found
......@@ -350,7 +350,6 @@ if ($action === 'addComment') {
} else {
// Insert the comment into the mdl_pdfannotator_comments table and get its record id.
$comment = pdfannotator_comment::create($documentid, $annotationid, $extracted_content, $visibility, $isquestion, $cm, $context);
$commentid = $comment->uuid;
// If successful, create a comment array and return it as json.
if ($comment) {
......@@ -360,11 +359,7 @@ if ($action === 'addComment') {
echo json_encode($data);
} else {
if ($commentid == -1) {
echo json_encode(['status' => '-1']);
} else {
echo json_encode(['status' => 'error']);
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment