{"id":1615,"date":"2011-08-09T09:26:43","date_gmt":"2011-08-09T07:26:43","guid":{"rendered":"http:\/\/blog.fh-kaernten.at\/wehr\/?p=1615"},"modified":"2011-08-10T08:07:49","modified_gmt":"2011-08-10T06:07:49","slug":"moodle-2-0-attendance-fix-for-use-with-postgresql","status":"publish","type":"post","link":"https:\/\/blog.fh-kaernten.at\/wehr\/2011\/08\/09\/moodle-2-0-attendance-fix-for-use-with-postgresql\/","title":{"rendered":"Moodle 2.0 Attendance module fix for use with PostgreSQL"},"content":{"rendered":"<p id=\"top\" \/>Here you will find a small fix for the attendance module for moodle 2.0. Some queries have problems if the are executed on our PostgreSQL database. So if you get some &#8220;group by&#8221; errors you could use the following fix. For the module see <a href=\"http:\/\/tracker.moodle.org\/browse\/CONTRIB-2196\">here<\/a><br \/>\nChange query @row 826<\/p>\n<pre class=\"brush:sql\">SELECT ue.userid, ue.status, ue.timestart, ue.timeend\r\n                      FROM {user_enrolments} ue\r\n                      JOIN {enrol} e ON e.id = ue.enrolid\r\n                     WHERE ue.userid $usql\r\n                           AND e.status = :estatus\r\n                           AND e.courseid = :courseid\r\n                  GROUP BY ue.userid, ue.status, ue.timestart,ue.timeend<\/pre>\n<p>and @row 851<\/p>\n<pre class=\"brush:sql\">SELECT ue.userid, ue.status, ue.timestart, ue.timeend\r\n                  FROM {user_enrolments} ue\r\n                  JOIN {enrol} e ON e.id = ue.enrolid\r\n                 WHERE ue.userid = :uid\r\n                       AND e.status = :estatus\r\n                       AND e.courseid = :courseid\r\n              GROUP BY ue.userid,ue.status, ue.timestart, ue.timeend<\/pre>\n<p>have fun<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Here you will find a small fix for the attendance module for moodle 2.0. Some queries have problems if the are executed on our PostgreSQL database. So if you get some &#8220;group by&#8221; errors you could use the following fix. For the module see here Change query @row 826 SELECT ue.userid, ue.status, ue.timestart, ue.timeend FROM &hellip; <a href=\"https:\/\/blog.fh-kaernten.at\/wehr\/2011\/08\/09\/moodle-2-0-attendance-fix-for-use-with-postgresql\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Moodle 2.0 Attendance module fix for use with PostgreSQL<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"ngg_post_thumbnail":0,"footnotes":""},"categories":[1],"tags":[15,12],"class_list":["post-1615","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-fixes","tag-patches"],"_links":{"self":[{"href":"https:\/\/blog.fh-kaernten.at\/wehr\/wp-json\/wp\/v2\/posts\/1615","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.fh-kaernten.at\/wehr\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.fh-kaernten.at\/wehr\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.fh-kaernten.at\/wehr\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.fh-kaernten.at\/wehr\/wp-json\/wp\/v2\/comments?post=1615"}],"version-history":[{"count":0,"href":"https:\/\/blog.fh-kaernten.at\/wehr\/wp-json\/wp\/v2\/posts\/1615\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.fh-kaernten.at\/wehr\/wp-json\/wp\/v2\/media?parent=1615"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.fh-kaernten.at\/wehr\/wp-json\/wp\/v2\/categories?post=1615"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.fh-kaernten.at\/wehr\/wp-json\/wp\/v2\/tags?post=1615"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}