diff --git a/model/pdfannotator.php b/model/pdfannotator.php index 2850d04..229c0be 100644 --- a/model/pdfannotator.php +++ b/model/pdfannotator.php @@ -37,6 +37,7 @@ class pdfannotator_instance { private $reports; private $hiddenanswers; private $hiddenreports; + private $userposts; public function __construct($dbrecord) { $this->id = $dbrecord->id; diff --git a/model/statistics.class.php b/model/statistics.class.php index dc7bebf..fd5d904 100644 --- a/model/statistics.class.php +++ b/model/statistics.class.php @@ -99,7 +99,7 @@ public function get_comments_average_course($isquestion) { $sql = "SELECT AVG(count) AS average FROM (" . "SELECT COUNT(*) AS count " . "FROM {pdfannotator_comments} c, {pdfannotator} a " - . "WHERE a.course = ? AND a.id = c.pdfannotatorid AND c.isquestion = ? AND c.isdeleted = ?" + . "WHERE a.course = ? AND a.id = c.pdfannotatorid AND c.isquestion = ? AND c.isdeleted = ? " . "GROUP BY c.userid ) AS counts"; return (float) key($DB->get_records_sql($sql, array($this->courseid, $isquestion, '0')));