Modules and plugins

RSS
Page: ()  1 ...  117  118  119  120  121  122  123  124  125  126  127  128  129  130  131  132  133  134 ...576   ()

Admin Report: Custom SQL queries

Type: Admin Report
Requires: Moodle 1.9
Status: Contributed
Maintainer(s): Tim Hunt, The Open University

This report, created by The Open University, lets Administrators set up arbitrary SQL select queries that anyone with the appropriate permissions can then run. Reports can be set to be runnable on-demand, or automatically run weekly or monthly.

The results are displayed as a fairly plain HTML table, and can also be downloaded as CSV.

The idea is that this lets you quicly set up ad-hoc reports, without having to create a whole new admin report plugin.


Record added by Tim Hunt - Thursday, October 29, 2009, 01:52 AM
Last modified - Saturday, October 31, 2009, 12:53 AM
Picture of Cloud Chiu
by Cloud Chiu - Thursday, October 29, 2009, 07:46 AM
 

I'm really interested in this tool. But it can't be downloaded. Could you please fix it.

Picture of Cloud Chiu
by Cloud Chiu - Thursday, October 29, 2009, 08:58 AM
 

Sorry, it can be downloaded now. Could you please provide more guides on installing it?

Barry
by Barry Oosthuizen - Thursday, October 29, 2009, 09:17 PM
 

Upload and extract the zip file to your admin/report/ directory

Go to Site Admin > Notifications

The report will be under Site Admin > Reports > Ad-hoc database queries

Thanks Tim, this is great!

Barry
by Barry Oosthuizen - Thursday, October 29, 2009, 09:48 PM
 

Grab and Drag Resizable/Sortable columns (Javascript):

I've just added this using the dhtmlxGrid (maybe it could be done with YUI as well).

This might not work very well if you have really large resultsets.

To try it out download this file: http://moodle.org/file.php/5/moddata/forum/125/595572/codebase.zip and extract it to your admin/report/customsql/ folder.

Then add this code to view.php (around line 32)

require_js('codebase/dhtmlxcommon.js');
require_js('codebase/dhtmlxgrid.js');
require_js('codebase/dhtmlxgridcell.js');
require_js('codebase/ext/dhtmlxgrid_start.js');

around line 95 Change

print_table($table);

to:

$table->id = 'mygrid';
print_table($table);
?>
<script type="text/javascript">
var grid = dhtmlXGridFromTable("mygrid");
</script>
<?php



Picture of Nick Thompson
by Nick Thompson - Tuesday, November 3, 2009, 01:35 AM
 

I'm thinking of modifying the plugin so that users can use $CFG variables in the sql queries. it would be nice if this were available.

Picture of Rob Rashotte
by Rob Rashotte - Tuesday, November 10, 2009, 01:30 AM
 

I have installed this report plugin, but I am not seeing any results when I run a report. I am using a very basic query for testing (counting users), but when I run the report there are no results displayed - just a screen with the title of the report. When I look at the list of available report, I see that the query did run and there are no errors reported. Any idea?

Rob


Page: ()  1 ...  117  118  119  120  121  122  123  124  125  126  127  128  129  130  131  132  133  134 ...576   ()