From 8cabfeb5cd4bdfe6d05491d60fc8036d29f9649e Mon Sep 17 00:00:00 2001
From: Dennis Ahrens <dennis.ahrens@hs-hannover.de>
Date: Wed, 14 Jul 2021 11:51:17 +0200
Subject: [PATCH] Hack: Make this plugin PG compliant.

see: https://github.com/rwthmoodle/moodle-mod_pdfannotator/issues/37
---
 locallib.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/locallib.php b/locallib.php
index b1d8635..ed83be8 100644
--- a/locallib.php
+++ b/locallib.php
@@ -508,7 +508,7 @@ function pdfannotator_get_datetime_of_last_modification($annotatorid) {
     $timemodified = $timemodified->timemodified;
 
     // 2. When was the last time an annotation or a comment was added in the specified annotator?
-    $sql = "SELECT max(a.timecreated) as 'last_annotation', max(c.timemodified) as 'last_comment' "
+    $sql = "SELECT max(a.timecreated) as ".'"last_annotation"'." , max(c.timemodified) as ".'"last_comment"'." "
             . "FROM {pdfannotator_annotations} a LEFT OUTER JOIN {pdfannotator_comments} c ON a.id = c.annotationid "
             . "WHERE a.pdfannotatorid = ?";
     $newposts = $DB->get_records_sql($sql, array($annotatorid));
-- 
GitLab