Skip to content

Commit

Permalink
fix rwthmoodle#111: statistics tab not working under postgres
Browse files Browse the repository at this point in the history
  • Loading branch information
univietw committed Aug 14, 2024
1 parent e2314a1 commit 6af7859
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions model/pdfannotator.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ class pdfannotator_instance {
private $reports;
private $hiddenanswers;
private $hiddenreports;
private $userposts;

public function __construct($dbrecord) {
$this->id = $dbrecord->id;
Expand Down
2 changes: 1 addition & 1 deletion model/statistics.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -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')));
Expand Down

0 comments on commit 6af7859

Please sign in to comment.