{"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"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Moodle 2.0 Attendance module fix for use with PostgreSQL - Mario&#039;s TinyLab<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"http:\/\/blog.fh-kaernten.at\/wehr\/2011\/08\/09\/moodle-2-0-attendance-fix-for-use-with-postgresql\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Moodle 2.0 Attendance module fix for use with PostgreSQL - Mario&#039;s TinyLab\" \/>\n<meta property=\"og:description\" content=\"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; Continue reading Moodle 2.0 Attendance module fix for use with PostgreSQL &rarr;\" \/>\n<meta property=\"og:url\" content=\"http:\/\/blog.fh-kaernten.at\/wehr\/2011\/08\/09\/moodle-2-0-attendance-fix-for-use-with-postgresql\/\" \/>\n<meta property=\"og:site_name\" content=\"Mario&#039;s TinyLab\" \/>\n<meta property=\"article:published_time\" content=\"2011-08-09T07:26:43+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2011-08-10T06:07:49+00:00\" \/>\n<meta name=\"author\" content=\"Mario Wehr\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Mario Wehr\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"http:\\\/\\\/blog.fh-kaernten.at\\\/wehr\\\/2011\\\/08\\\/09\\\/moodle-2-0-attendance-fix-for-use-with-postgresql\\\/#article\",\"isPartOf\":{\"@id\":\"http:\\\/\\\/blog.fh-kaernten.at\\\/wehr\\\/2011\\\/08\\\/09\\\/moodle-2-0-attendance-fix-for-use-with-postgresql\\\/\"},\"author\":{\"name\":\"Mario Wehr\",\"@id\":\"https:\\\/\\\/blog.fh-kaernten.at\\\/wehr\\\/#\\\/schema\\\/person\\\/8761b4d788b13b547de9ccd6504ce62d\"},\"headline\":\"Moodle 2.0 Attendance module fix for use with PostgreSQL\",\"datePublished\":\"2011-08-09T07:26:43+00:00\",\"dateModified\":\"2011-08-10T06:07:49+00:00\",\"mainEntityOfPage\":{\"@id\":\"http:\\\/\\\/blog.fh-kaernten.at\\\/wehr\\\/2011\\\/08\\\/09\\\/moodle-2-0-attendance-fix-for-use-with-postgresql\\\/\"},\"wordCount\":59,\"commentCount\":0,\"keywords\":[\"fixes\",\"patches\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"http:\\\/\\\/blog.fh-kaernten.at\\\/wehr\\\/2011\\\/08\\\/09\\\/moodle-2-0-attendance-fix-for-use-with-postgresql\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"http:\\\/\\\/blog.fh-kaernten.at\\\/wehr\\\/2011\\\/08\\\/09\\\/moodle-2-0-attendance-fix-for-use-with-postgresql\\\/\",\"url\":\"http:\\\/\\\/blog.fh-kaernten.at\\\/wehr\\\/2011\\\/08\\\/09\\\/moodle-2-0-attendance-fix-for-use-with-postgresql\\\/\",\"name\":\"Moodle 2.0 Attendance module fix for use with PostgreSQL - Mario&#039;s TinyLab\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/blog.fh-kaernten.at\\\/wehr\\\/#website\"},\"datePublished\":\"2011-08-09T07:26:43+00:00\",\"dateModified\":\"2011-08-10T06:07:49+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/blog.fh-kaernten.at\\\/wehr\\\/#\\\/schema\\\/person\\\/8761b4d788b13b547de9ccd6504ce62d\"},\"breadcrumb\":{\"@id\":\"http:\\\/\\\/blog.fh-kaernten.at\\\/wehr\\\/2011\\\/08\\\/09\\\/moodle-2-0-attendance-fix-for-use-with-postgresql\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"http:\\\/\\\/blog.fh-kaernten.at\\\/wehr\\\/2011\\\/08\\\/09\\\/moodle-2-0-attendance-fix-for-use-with-postgresql\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"http:\\\/\\\/blog.fh-kaernten.at\\\/wehr\\\/2011\\\/08\\\/09\\\/moodle-2-0-attendance-fix-for-use-with-postgresql\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/blog.fh-kaernten.at\\\/wehr\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Moodle 2.0 Attendance module fix for use with PostgreSQL\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/blog.fh-kaernten.at\\\/wehr\\\/#website\",\"url\":\"https:\\\/\\\/blog.fh-kaernten.at\\\/wehr\\\/\",\"name\":\"Mario&#039;s TinyLab\",\"description\":\"About cool\\\/interesting Projects and Technologies\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/blog.fh-kaernten.at\\\/wehr\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/blog.fh-kaernten.at\\\/wehr\\\/#\\\/schema\\\/person\\\/8761b4d788b13b547de9ccd6504ce62d\",\"name\":\"Mario Wehr\",\"url\":\"https:\\\/\\\/blog.fh-kaernten.at\\\/wehr\\\/author\\\/wehr\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Moodle 2.0 Attendance module fix for use with PostgreSQL - Mario&#039;s TinyLab","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"http:\/\/blog.fh-kaernten.at\/wehr\/2011\/08\/09\/moodle-2-0-attendance-fix-for-use-with-postgresql\/","og_locale":"en_US","og_type":"article","og_title":"Moodle 2.0 Attendance module fix for use with PostgreSQL - Mario&#039;s TinyLab","og_description":"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; Continue reading Moodle 2.0 Attendance module fix for use with PostgreSQL &rarr;","og_url":"http:\/\/blog.fh-kaernten.at\/wehr\/2011\/08\/09\/moodle-2-0-attendance-fix-for-use-with-postgresql\/","og_site_name":"Mario&#039;s TinyLab","article_published_time":"2011-08-09T07:26:43+00:00","article_modified_time":"2011-08-10T06:07:49+00:00","author":"Mario Wehr","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Mario Wehr","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"http:\/\/blog.fh-kaernten.at\/wehr\/2011\/08\/09\/moodle-2-0-attendance-fix-for-use-with-postgresql\/#article","isPartOf":{"@id":"http:\/\/blog.fh-kaernten.at\/wehr\/2011\/08\/09\/moodle-2-0-attendance-fix-for-use-with-postgresql\/"},"author":{"name":"Mario Wehr","@id":"https:\/\/blog.fh-kaernten.at\/wehr\/#\/schema\/person\/8761b4d788b13b547de9ccd6504ce62d"},"headline":"Moodle 2.0 Attendance module fix for use with PostgreSQL","datePublished":"2011-08-09T07:26:43+00:00","dateModified":"2011-08-10T06:07:49+00:00","mainEntityOfPage":{"@id":"http:\/\/blog.fh-kaernten.at\/wehr\/2011\/08\/09\/moodle-2-0-attendance-fix-for-use-with-postgresql\/"},"wordCount":59,"commentCount":0,"keywords":["fixes","patches"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["http:\/\/blog.fh-kaernten.at\/wehr\/2011\/08\/09\/moodle-2-0-attendance-fix-for-use-with-postgresql\/#respond"]}]},{"@type":"WebPage","@id":"http:\/\/blog.fh-kaernten.at\/wehr\/2011\/08\/09\/moodle-2-0-attendance-fix-for-use-with-postgresql\/","url":"http:\/\/blog.fh-kaernten.at\/wehr\/2011\/08\/09\/moodle-2-0-attendance-fix-for-use-with-postgresql\/","name":"Moodle 2.0 Attendance module fix for use with PostgreSQL - Mario&#039;s TinyLab","isPartOf":{"@id":"https:\/\/blog.fh-kaernten.at\/wehr\/#website"},"datePublished":"2011-08-09T07:26:43+00:00","dateModified":"2011-08-10T06:07:49+00:00","author":{"@id":"https:\/\/blog.fh-kaernten.at\/wehr\/#\/schema\/person\/8761b4d788b13b547de9ccd6504ce62d"},"breadcrumb":{"@id":"http:\/\/blog.fh-kaernten.at\/wehr\/2011\/08\/09\/moodle-2-0-attendance-fix-for-use-with-postgresql\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["http:\/\/blog.fh-kaernten.at\/wehr\/2011\/08\/09\/moodle-2-0-attendance-fix-for-use-with-postgresql\/"]}]},{"@type":"BreadcrumbList","@id":"http:\/\/blog.fh-kaernten.at\/wehr\/2011\/08\/09\/moodle-2-0-attendance-fix-for-use-with-postgresql\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/blog.fh-kaernten.at\/wehr\/"},{"@type":"ListItem","position":2,"name":"Moodle 2.0 Attendance module fix for use with PostgreSQL"}]},{"@type":"WebSite","@id":"https:\/\/blog.fh-kaernten.at\/wehr\/#website","url":"https:\/\/blog.fh-kaernten.at\/wehr\/","name":"Mario&#039;s TinyLab","description":"About cool\/interesting Projects and Technologies","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/blog.fh-kaernten.at\/wehr\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/blog.fh-kaernten.at\/wehr\/#\/schema\/person\/8761b4d788b13b547de9ccd6504ce62d","name":"Mario Wehr","url":"https:\/\/blog.fh-kaernten.at\/wehr\/author\/wehr\/"}]}},"_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}]}}