Configurable Reports for Moodle 2.6 and new features

Configurable Reports for Moodle 2.6 and new features

by Juan Leyva -
Number of replies: 22
Picture of Core developers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

See: https://moodle.org/plugins/pluginversion.php?id=5036

Support for Moodle 2.6
Multiple bugs fixed
Global report that can be shared in all courses
Public reports repository with multiple sample reports available
Ppublic SQL queries repository
Reports can run on a different DB that the current (production) DB
Reports can run on a CRON scheduler
Several filter plugins added
Integrated DataTables.js for the report table
Integrated CodeMirror.js for highlighting SQL query code, while editing.
New security settings

Thanks to Nadav Kavalerchik for providing most of the new features

Average of ratings: Useful (2)
In reply to Juan Leyva

Re: Configurable Reports for Moodle 2.6 and new features

by Randy Thornton -
Picture of Documentation writers

Juan, I just installed the latest 2011040106 from the slightly earlier release I was testing earlier this week.

When I make a new Report of Type SQL,  I get an odd looking page which will not show or let me edit the actual SQL (pics attached in both Clean and Standard themes).

It looks like the editing box is not loading ?

On already existing reports that I had put in last week, I also can not see the SQL code at all on this page. I just get a blank line number. However if I run the report, it works properly. (Same as screenshot 2 attached.)

I am using Firefox 24.0 on Mac, Moodle 2.6. build 20131118.

No messages at all from Dev level Debugging on.

This is a definitely a new behavior in this build different from the last build I tested a few days ago.

 

Attachment screenshot_743.png
Attachment screenshot_744.png
In reply to Randy Thornton

Re: Configurable Reports for Moodle 2.6 and new features

by Randy Thornton -
Picture of Documentation writers

Additional note: this also happens in Chrome (v 31.0) - but I do see the editor box flicker briefly on the screen with the code in it, but then it disappears and I end up with page similar to screenshot 2 above.

In reply to Randy Thornton

Re: Configurable Reports for Moodle 2.6 and new features

by Kuriko A -
Hi, this also happened to me. In Moodle 2.5 and 2.5, in Chrome and IE browsers. We have rolled back to the previous version and it is working now. Will stay tuned for any updates. This is such a great tool!
In reply to Kuriko A

Re: Configurable Reports for Moodle 2.6 and new features

by Juan Leyva -
Picture of Core developers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

Hi,

Please go to the plugin settings in admin / plugins / blocks / config. reports and disable the sql editor

Let me know if it works

Seems to be a pronlem with the library for the sql editor

In reply to Juan Leyva

Re: Configurable Reports for Moodle 2.6 and new features

by Javi Ac -

Iwould like to know if it is possible with this plugin to get a list of students in a course with time spent in each activity/lessons in a course. I am using moodle 2.5

In reply to Juan Leyva

Re: Configurable Reports for Moodle 2.6 and new features

by Kuriko A -

Hi Juan, 

I couldn't see an option to disable the SQL editor, but I tried un-checking the box in the attached screenshot which says: Highlight SQL syntax. Is there a different setting I should have that says 'Disable SQL editor'?

Anyway, unchecking the above setting has allowed us to enter SQL into the editor when editing an existing report. This is great!

However, there are three fairly big issues that are standing in our way at the moment: 

 

1) Whilst we are able to update the SQL code in an existing report, we are unable to change the name of an existing report. When we enter a new name on editreport.php, and click 'Add', we get this error message: 

This page should automatically redirect. If nothing is happening please use the continue link below.

Error output, so disabling automatic redirect.

 

2) We are also not able to Add new reports. When we click on Add report, then enter the details for the new report on editreport.php, we receive this error: 

This page should automatically redirect. If nothing is happening please use the continue link below.

Error output, so disabling automatic redirect.

 

3) For existing reports, on viewreport.php, the page displays all of the SQL code above the actual report. This looks quite messy and I'm not sure how to remove it. 

 

Thanks again for this great block. Look forward to hearing from you. 

 

Attachment highlight sql syntax.png
In reply to Kuriko A

Re: Configurable Reports for Moodle 2.6 and new features

by Kuriko A -

Just an update in relation to Issues 1 and 2 listed above... Even though we receive this error, the action (Add or edit report) seems to be taking effect in the background.

Perhaps this error with redirection is just an issue just for our site... 

In reply to Kuriko A

Re: Configurable Reports for Moodle 2.6 and new features

by Juan Leyva -
Picture of Core developers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

Hi,

1) Whilst we are able to update the SQL code in an existing report, we are unable to change the name of an existing report. When we enter a new name on editreport.php, and click 'Add', we get this error message: 

This page should automatically redirect. If nothing is happening please use the continue link below.

Error output, so disabling automatic redirect.

I've fixed this error, during today I'm going to publish a new version, this error shouldn't prevent the report to be saved 

2) We are also not able to Add new reports. When we click on Add report, then enter the details for the new report on editreport.php, we receive this error: 

This page should automatically redirect. If nothing is happening please use the continue link below.

Error output, so disabling automatic redirect.

 Same as above

3) For existing reports, on viewreport.php, the page displays all of the SQL code above the actual report. This looks quite messy and I'm not sure how to remove it.

This is because you have display debug messages enabled in your admin -> developer -> debugging settings, if you uncheck this options the message will dissapear

In reply to Juan Leyva

Re: Configurable Reports for Moodle 2.6 and new features

by Kuriko A -

Hi Juan, 

Thanks for your reply. That is all fixed now and working great!

I was wondering if you might be able to advise us on a few things: 

1) My developer has created a a couple of new columns in the groups table in Moodle (region and network) and we are now embedding those fields into our SQL report. But we are not able to use the Filter fields to filter these custom columns. Would you be able to point us in the right direction to be able to add these filters as drop-down menus at the top of the report, like the existing filter options appear? 

2) I'm having an issue with setting up a template for an SQL report. I can put plain text in the Header, Record template and Footer. But as soon as I try to insert a table into the Record template section, I get the attached error regarding permissions. I tried adapting your sample on the plugin page, and incorporated the 'Available marks' listed for my report,  but didn't have any luck. Here's the HTML code from my Record template section:

<table style="width: 100%;">

<tbody>
<tr>
<td>network</td>
<td>
<h2>region</h2>
</td>
</tr>
</tbody>
</table>

The file editcomp.php currently has 644 permissions and I tried changing it to 777 temporarily, but even this did not help. So I'm unable to edit the template in any useful way to present the data. 

3) In the footer, I see your sample has '##graphs##' and this works fine. But I am wondering if it is possible to separate the graphs one by one, so that I can insert a title for each graph into the template?

I hope you might be able to shed some light on these issues for us smile

Attachment forbidden error.png
In reply to Juan Leyva

Re: Configurable Reports for Moodle 2.6 and new features

by Randy Thornton -
Picture of Documentation writers

 

Yep, that solves the issue, unchecking Highlight SQL syntax. Works fine for editing now.

In reply to Randy Thornton

Re: Configurable Reports for Moodle 2.6 and new features

by Kuriko A -
Hi, this also happened to me. In Moodle 2.5 and 2.6, in Chrome and IE browsers. We have rolled back to the previous version and it is working now. Will stay tuned for any updates. This is such a great tool!
In reply to Kuriko A

Re: Configurable Reports for Moodle 2.6 and new features

by Juan Leyva -
Picture of Core developers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

Wow, it seems to work nicely for me in both browsers and old Moodle versions..

In any case, you can disable the SQL syntax in admin / plugins / blocks / configurable reports settings

In reply to Juan Leyva

Re: Configurable Reports for Moodle 2.6 and new features

by Séverin Terrier -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators

Thanks Juan and Nadav for this new version, with all these improvments.

Séverin

In reply to Randy Thornton

Re: Configurable Reports for Moodle 2.6 and new features

by Cindy Marcela Jiménez Ramírez -

Hola a todos,

Por lo que he leído ustedes conocen de  informes personalizados, espero me puedan ayudar ya que soy nueva en esto de Moodle, resulta que instale la versión 2.5 de mi moodle  e instale también a esta versión  el plugin para  el bloque de informes personalizados, hasta a aquí todo muy bonito pero mi problema es que a la hora que querer generar un reporte me aparece el siguiente error,  sad   no se de que se trata, agradezco me puedan dar  alguna pista. sad


 image?w=555&h=218&rev=10&ac=1

In reply to Cindy Marcela Jiménez Ramírez

Re: Configurable Reports for Moodle 2.6 and new features

by Guillermo Madero -

Hola Cindy,

Por favor usa los foros de Moodle en español:

https://moodle.org/course/view.php?id=11

Average of ratings: Useful (1)
In reply to Juan Leyva

Re: Configurable Reports for Moodle 2.6 and new features

by Sheldon Cardoza -

Hi Juan;

I am having an issue; when ever I try to create a report and i add more than 2 columns i get the following error message:

Error: Database connection failed

It is possible that the database is overloaded or otherwise not running properly.

The site administrator should also check that the database details have been correctly specified in config.php

I have checked the config.php fill and all seems to be in order... can you help please

Attachment report.png
In reply to Juan Leyva

Re: Configurable Reports for Moodle 2.6 and new features

by Peter Bowen -

Hi Juan,

Great new features - I particularly find csv immediately useful (Ability to run a report and upload the results straight into users), as well as the Global reports. (I had about 5 reports previously duplicated across 15 courses, with more requests coming all the time).

 

I have a couple of issues.

  1. I have a report set to run via the CRON, and the settings set to run at 5am each day. However, when I run the report, it runs the queriy new. (I know because it takes a few minutes to run). Unfortunately the documentation on using the CRON reports is not done - so is there a trick to setting it up?
  2. When Java script ordering is on, it appears to put a second heading column over the first one, which is a different size. (As per the below image)

Any ideas on these two?

 

CheersPeter

In reply to Peter Bowen

Re: Configurable Reports for Moodle 2.6 and new features

by Tristan Pease -

I have a related question: is it possible to view the previous export of a report in the block without prompting it to run? I have some very time consuming reports that are hanging my server and I'd love to resolve that.

In reply to Tristan Pease

Re: Configurable Reports for Moodle 2.6 and new features

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

Just download it to Excel...

In reply to Emma Richardson

Re: Configurable Reports for Moodle 2.6 and new features

by Tristan Pease -

Well, yes, but to download it you need to first view it, and then the report runs and you end up with a 504. Unless there's a way to access a cached report without it running automatically?