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
60458aa8
Commit
60458aa8
authored
4 years ago
by
Hendrik Donath
Committed by
Friederike Schwager
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Changed SQL-Statements so that they work under Standard SQL not only MySQL
parent
e804cff3
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
locallib.php
+2
-3
2 additions, 3 deletions
locallib.php
model/comment.class.php
+3
-1
3 additions, 1 deletion
model/comment.class.php
version.php
+1
-1
1 addition, 1 deletion
version.php
with
6 additions
and
5 deletions
locallib.php
+
2
−
3
View file @
60458aa8
...
...
@@ -736,8 +736,7 @@ function pdfannotator_get_questions($courseid, $context, $questionfilter) {
if
(
$questionfilter
==
1
)
{
$sql
=
$sql
.
' AND NOT c.solved = 0 '
;
}
$sql
=
$sql
.
"GROUP BY a.id, p.name, p.usevotes, cm.id, c.id"
;
$params
=
array_merge
([
$courseid
],
$inparams
);
$sql
=
$sql
.
"GROUP BY a.id, p.name, p.usevotes, cm.id, c.id, a.page, a.pdfannotatorid, c.content, c.userid, c.visibility, c.timecreated, c.isdeleted, c.ishidden"
;
$params
=
array_merge
([
$courseid
],
$inparams
);
$questions
=
$DB
->
get_records_sql
(
$sql
,
$params
);
$seehidden
=
has_capability
(
'mod/pdfannotator:seehiddencomments'
,
$context
);
...
...
@@ -827,7 +826,7 @@ function pdfannotator_get_posts_by_this_user($courseid, $context) {
.
"JOIN
{
course_modules
}
cm ON p.id = cm.instance "
.
"LEFT JOIN
{
pdfannotator_votes
}
v ON c.id = v.commentid "
.
"WHERE c.userid = ? AND p.course = ? AND cm.id
$insql
"
.
"GROUP BY a.id, p.name, p.usevotes, cm.id, c.id"
;
.
"GROUP BY a.id, p.name, p.usevotes, cm.id, c.id
, c.annotationid, c.content, c.timemodified, c.ishidden, a.page, a.pdfannotatorid
"
;
$params
=
array_merge
([
$USER
->
id
,
$courseid
],
$inparams
);
...
...
This diff is collapsed.
Click to expand it.
model/comment.class.php
+
3
−
1
View file @
60458aa8
...
...
@@ -145,7 +145,9 @@ class pdfannotator_comment {
// Get the ids and text content of all comments attached to this annotation/highlight.
$sql
=
"SELECT c.id, c.content, c.userid, c.visibility, c.isquestion, c.isdeleted, c.ishidden, c.timecreated, c.timemodified, c.modifiedby, c.solved, SUM(vote) AS votes "
.
"FROM
{
pdfannotator_comments
}
c LEFT JOIN
{
pdfannotator_votes
}
v"
.
" ON c.id=v.commentid WHERE annotationid = ? GROUP BY c.id ORDER BY c.timecreated"
;
.
" ON c.id=v.commentid WHERE annotationid = ?"
.
" GROUP BY c.id, c.content, c.userid, c.visibility, c.isquestion, c.isdeleted, c.ishidden, c.timecreated, c.timemodified, c.modifiedby, c.solved"
.
" ORDER BY c.timecreated"
;
$a
=
array
();
$a
[]
=
$annotationid
;
$comments
=
$DB
->
get_records_sql
(
$sql
,
$a
);
// Records taken from table 'comments' as an array of objects.
...
...
This diff is collapsed.
Click to expand it.
version.php
+
1
−
1
View file @
60458aa8
...
...
@@ -25,6 +25,6 @@
defined
(
'MOODLE_INTERNAL'
)
||
die
();
$plugin
->
component
=
'mod_pdfannotator'
;
// Full name of the plugin (used for diagnostics).
$plugin
->
version
=
202010
08
00
;
// The current module version (Date: YYYYMMDDXX).
$plugin
->
version
=
202010
23
00
;
// The current module version (Date: YYYYMMDDXX).
$plugin
->
release
=
'PDF Annotator v1.4 release 4'
;
$plugin
->
requires
=
2016112900
;
// Requires this Moodle version.
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