{"action":"created","issue":{"url":"https://api.github.com/repos/jfruitet/moodle_referentiel_m27/issues/2","repository_url":"https://api.github.com/repos/jfruitet/moodle_referentiel_m27","labels_url":"https://api.github.com/repos/jfruitet/moodle_referentiel_m27/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/jfruitet/moodle_referentiel_m27/issues/2/comments","events_url":"https://api.github.com/repos/jfruitet/moodle_referentiel_m27/issues/2/events","html_url":"https://github.com/jfruitet/moodle_referentiel_m27/issues/2","id":139837126,"number":2,"title":"Exception thrwon into admin > reports > Skill repository","user":{"login":"gabrielrosset","id":16338923,"avatar_url":"https://avatars.githubusercontent.com/u/16338923?v=3","gravatar_id":"","url":"https://api.github.com/users/gabrielrosset","html_url":"https://github.com/gabrielrosset","followers_url":"https://api.github.com/users/gabrielrosset/followers","following_url":"https://api.github.com/users/gabrielrosset/following{/other_user}","gists_url":"https://api.github.com/users/gabrielrosset/gists{/gist_id}","starred_url":"https://api.github.com/users/gabrielrosset/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gabrielrosset/subscriptions","organizations_url":"https://api.github.com/users/gabrielrosset/orgs","repos_url":"https://api.github.com/users/gabrielrosset/repos","events_url":"https://api.github.com/users/gabrielrosset/events{/privacy}","received_events_url":"https://api.github.com/users/gabrielrosset/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-03-10T09:47:35Z","updated_at":"2016-03-10T11:08:34Z","closed_at":null,"body":"Hi Jean,\r\n    I just saw another bug concerning some DBMS like SQLServer which does not allow to specify fields in \"ORDER BY\" clause while they're not in \"SELECT\" clause.\r\n\r\nTo reproduce : \r\njust go to admin menu and click into \"reports > Skill repository\"\r\n\r\nHere is the detail : \r\n\r\nDebug info: SQLState: 42000<br>\r\nError Code: 145<br>\r\nMessage: [Microsoft][ODBC Driver 11 for SQL Server][SQL Server]Les éléments ORDER BY doivent se retrouver dans la liste de sélection si SELECT DISTINCT est spécifié.<br>\r\n\r\nSELECT DISTINCT userid FROM mdl_referentiel_activite WHERE ref_instance='1' ORDER BY userid ASC, date_creation DESC\r\n[array (\r\n0 => '1',\r\n)]\r\nError code: dmlreadexception\r\nStack trace:\r\n    line 443 of \\lib\\dml\\moodle_database.php: dml_read_exception thrown\r\n    line 291 of \\lib\\dml\\sqlsrv_native_moodle_database.php: call to moodle_database->query_end()\r\n    line 398 of \\lib\\dml\\sqlsrv_native_moodle_database.php: call to sqlsrv_native_moodle_database->query_end()\r\n    line 850 of \\lib\\dml\\sqlsrv_native_moodle_database.php: call to sqlsrv_native_moodle_database->do_query()\r\n    line 898 of \\lib\\dml\\sqlsrv_native_moodle_database.php: call to sqlsrv_native_moodle_database->get_recordset_sql()\r\n    line 1084 of \\mod\\referentiel\\locallib.php: call to sqlsrv_native_moodle_database->get_records_sql()\r\n    line 169 of \\report\\referentiel\\index.php: call to referentiel_get_users_activites_instance()"},"comment":{"url":"https://api.github.com/repos/jfruitet/moodle_referentiel_m27/issues/comments/194793809","html_url":"https://github.com/jfruitet/moodle_referentiel_m27/issues/2#issuecomment-194793809","issue_url":"https://api.github.com/repos/jfruitet/moodle_referentiel_m27/issues/2","id":194793809,"user":{"login":"jfruitet","id":1632466,"avatar_url":"https://avatars.githubusercontent.com/u/1632466?v=3","gravatar_id":"","url":"https://api.github.com/users/jfruitet","html_url":"https://github.com/jfruitet","followers_url":"https://api.github.com/users/jfruitet/followers","following_url":"https://api.github.com/users/jfruitet/following{/other_user}","gists_url":"https://api.github.com/users/jfruitet/gists{/gist_id}","starred_url":"https://api.github.com/users/jfruitet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jfruitet/subscriptions","organizations_url":"https://api.github.com/users/jfruitet/orgs","repos_url":"https://api.github.com/users/jfruitet/repos","events_url":"https://api.github.com/users/jfruitet/events{/privacy}","received_events_url":"https://api.github.com/users/jfruitet/received_events","type":"User","site_admin":false},"created_at":"2016-03-10T11:08:34Z","updated_at":"2016-03-10T11:08:34Z","body":"Please try that correction for me because I can't test it myself with my MySql server :>)\r\nIf you modify any other SQL clause, please let me know  (there is a lot of such requests in the plugin sources.)\r\n\r\nBonjour,\r\nPouvez-vous faire la vérification de la correction car je ne dispose pas de SQL Server.\r\nPar ailleurs il risque d'y avoir pas mal de corrections du même type dans tout le reste du programme...\r\nSi vous vous lancez dans les corrections merci de m'envoyer vos scripts modifiés que je les intègre à la version courant du plugin.\r\n\r\nCordialement..\r\nJF."}}