Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
moodle-mod_pdfannotator
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
elc
moodle-mod_pdfannotator
Commits
432550ae
Unverified
Commit
432550ae
authored
2 years ago
by
Tim Schroeder
Browse files
Options
Downloads
Patches
Plain Diff
fixed warning when commenting on a nonexistent annotation
parent
f031c15e
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
action.php
+3
-8
3 additions, 8 deletions
action.php
with
3 additions
and
8 deletions
action.php
+
3
−
8
View file @
432550ae
...
@@ -350,7 +350,6 @@ if ($action === 'addComment') {
...
@@ -350,7 +350,6 @@ if ($action === 'addComment') {
}
else
{
}
else
{
// Insert the comment into the mdl_pdfannotator_comments table and get its record id.
// 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
);
$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 successful, create a comment array and return it as json.
if
(
$comment
)
{
if
(
$comment
)
{
...
@@ -360,11 +359,7 @@ if ($action === 'addComment') {
...
@@ -360,11 +359,7 @@ if ($action === 'addComment') {
echo
json_encode
(
$data
);
echo
json_encode
(
$data
);
}
else
{
}
else
{
if
(
$commentid
==
-
1
)
{
echo
json_encode
([
'status'
=>
'-1'
]);
echo
json_encode
([
'status'
=>
'-1'
]);
}
else
{
echo
json_encode
([
'status'
=>
'error'
]);
}
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment