Quantcast
Channel: Configurable reports block (plugin)
Viewing all 2785 articles
Browse latest View live

Re: SQL report for users and simple certificates issued

$
0
0
by Al Brocklehurst.  

Brilliant Rick thanks worked a treat.

I think I was trying to take extra lines out at FROM and getting confused.

Cheers

Al


Re: SQL report for users and simple certificates issued

$
0
0
by Rick Dennis.  

I answered a question...................hahahaha


Good things are continuing to head my way. big grin


I am glad it worked.


Configurable Reports in Single Activity Format Courses

$
0
0
by Erin Melvin.  

Hello, 

We're working with a client who needs to report on forums, which essentially make up the material of their Single Activity Format courses.  They require reporting on the gender (custom profile field) of the user and the dates they posted.  I created and tested a Configurable Report on test site and then when I went to add it to their Single Activity Format course, there was no option to add the Configurable Reports block (which is installed).  Is there a way that I can access these forums with Configurable reports to Single Activity Format courses...or a work around?

Also, is it possible to report on documents posted to the forum?

Thanks!

Erin

Moodle 2.7.3

Re: Configurable Reports in Single Activity Format Courses

$
0
0
by Emma Richardson.  

The whole idea of configurable reports is that you can create reports across the whole site.  You do not need to add it to the course - you could actually limit the report to those courses by adding a filter in your sql query to just select courses with that format.  Or at least list course format and then you can filter from Excel when you download your data.  If you want individual course reports just add a course number filter and filter that way.

One report from two activity modules.

$
0
0
by Stephan Tedesco.  

I want to buil a report, which is based on the activity modules Face-to-Face and a Mynewplugin, which I am developing. 

As both plugins provide us with similar data about the user attendance, the report has to be based on the face-to-face-sessions report.  (user name, trainer/teacher name, session start date, session finish date, session address etc) 

In facetoface/rb_sources/rb_source_facetoface_sessions.php we have the definition of the data we need from Face-to-face. 

But how to build the report in mynewplugin//rb_sources/rb_source_mynewplugin.php, so when I am making a report about the user, it will pull the  data, which we need. 

Or should I make completely new rb_source_files for both plugins?


Couldn't find any similar question here and will appreciate any help. 


S. 

Re: One report from two activity modules.

$
0
0
by Emma Richardson.  

Are you looking for assistance in the building the sql report in configurable reports or writing php to create a report within a plugin?

In configurable reports, you just need to find a way to join the tables and then you can pull data from both tables from your database.

If you need help with php, I will leave that to one of our wonderful coders!

Re: One report from two activity modules.

$
0
0
by Stephan Tedesco.  

Thank you Emma for the guidance. I already builded a report within mynewplugin and I am looking to combine it with the report of facetoface-sessions. 

As described by you, I will look to join the tables in configurable reports and should be capable to manage this by myself, at least that one I can do by myself, if not I will write you back in 2 days. 

But I will have help regarding this question https://moodle.org/mod/forum/discuss.php?d=319931 Can you suggest me a way to find a solution?


Regards, 


S.

Need help finding the correct report to use

$
0
0
by Mike Condardo.  

I am interested in being able to create a report in Moodle 2.8 where people with specific permissions are easily able to go to a spot (like a block), select a link (like "Completion Report"), select a specific "Group" or "Grouping," and run a site-wide report. The information returned would be a list of their specific Group of participants and the Date of Completion for the courses that each of them have taken.

Further, the structure of the platform that I have inherited are set up as metacourses (group of courses from the Master List) or "Course Tracks" ... where Student A may be in Course Track 1 taking courses Alpha, Beta, Gamma, Delta, and Student B make take courses Alpha, Beta and Epsilon from Course Track 2. But in our reporting, we need to see both Student A and Student B on the same report, even though they are in different Course Tracks.

There are so many elements to use in Moodle, I need some suggestions for the best way to create this report. I see it much like the Course Completion Report, only that it would gather all Course Completion Dates from courses site-wide for a specific Group from a pull-down menu at the top of the page.

Does the fact that it exists in a Metacourse mean anything to the reporting function? Can I set up an independent, site-wide report that can be accessed (with permissions) by others? And keep in mind, courses have already started for the year so I don't want anything that will damage the integrity of the existing data.

Any help of direction would be appreciated. Thank you!


Problem in database schema after upgrading Ad-hoc database queries report

$
0
0
by Séverin Terrier.  

Hi,

I've recently updated my Ad-hoc database queries report plugin to latest version (3.0) on Moodle 2.9.2, and now, when i launch admin/cli/check_database_schema.php, i've got :
-------------------------------------------------------------------------------
report_customsql_categories
 * column 'name' should be NOT NULL (C)
 * column 'name' has default 'Miscellaneous', expected 'NULL' (C)
-------------------------------------------------------------------------------

It seems something was not well handled when upgrading.

Séverin

Re: Problem in database schema after upgrading Ad-hoc database queries report

$
0
0
by Séverin Terrier.  

Hi,

i then launched XMLDB editor, and started default values check, which showed :
Table: report_customsql_categories. Champ: name, Valeur attendue '' Valeur actuelle 'Miscellaneous'
ALTER TABLE mdl_report_customsql_categories MODIFY COLUMN name VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' after id;

After launching the SQL, i tried again the two checks, and everything was OK (after purging caches) smile

Séverin

PS : would be useful if check_database_schema.php could also have an option to make corrections, or at least provide a list of SQL commands for that

Re: Problem in database schema after upgrading Ad-hoc database queries report

Re: Problem in database schema after upgrading Ad-hoc database queries report

$
0
0
by Séverin Terrier.  

I don't know exactly what happened.

Just can say i'm using Moodle 2.9.2, was using latest existing version of "Ad-hoc database queries report" and upgraded to the 3.0 version (using web installer) when it came out in plugin database.

Fixed for me with the SQL command provided by default values check in XMLDB editor.

Re: nosemicolon check and MySQL pivot reports

$
0
0
by batpurev b.  

hi,

Jonathan Moore did you find solution to creating DYNAMIC columns using Pivot table or Stored procedure or prepared statements? 

I spent some time to do same you were going to do with no luck. As for semi colon issue this can be easily HACKED in the code (/reports/customsql/edit_form.php) by removing/changing the restrictions in the source code but still it does not work.

for example:

SET @s = 'SELECT * FROM prefix_assign';

PREPARE stmt3 FROM @s;

EXECUTE stmt3;

ad hoc report allows its execution even though it gives following error

Error when executing the query: Error reading from database You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'PREPARE stmt3 FROM @s; EXECUTE stmt3; LIMIT 0, 2' at line 2 SET @s = 'SELECT * FROM mdl_assign'; PREPARE stmt3 FROM @s; EXECUTE stmt3; LIMIT 0, 2 [array egg]


 

MYSQL Date of Birth Pre 1970 & Timezone

$
0
0
by Al Brocklehurst.  

Hi all,

I have an SQL query which works ok but missing the DOB (custom field) for those born before Unix (1970-01-01) and it also reports the day before given server is US but I'm in Adelaide.

SELECT u.firstname AS 'First Name', u.lastname AS 'Last name', DATE_FORMAT(FROM_UNIXTIME(uid.data), '%d-%m-%Y') AS DateofBirth, 
u.email AS email, uid2.data AS 'LEA Site', c.idnumber AS 'System Code', c.shortname AS 'Module Completed',
DATE_FORMAT(FROM_UNIXTIME(ci.timecreated),'%d-%m-%Y') AS 'Certificate Date'
FROM prefix_course_completions AS p
JOIN prefix_course AS c ON p.course = c.id
JOIN prefix_user AS u ON p.userid = u.id
JOIN prefix_user_info_data AS uid ON uid.userid = u.id
JOIN prefix_user_info_field AS uif ON uid.fieldid = uif.id
JOIN prefix_user_info_data AS uid2 ON uid2.userid = u.id
JOIN prefix_user_info_field AS uif2 ON uid2.fieldid = uif2.id
JOIN prefix_simplecertificate_issues AS ci ON u.id = ci.userid
WHERE c.id=170 and uif.shortname = 'DOB' and uif2.shortname = 'School'
ORDER BY u.lastname

Any ideas on how to tweak the query to correct the above.

Thanks


Re: MYSQL Date of Birth Pre 1970 & Timezone

$
0
0
by Sam Stevens.  

Well the DOB thing is odd. MYSQL should store that as a signed integer. So you can go as far back with a negative timestamp as you can forward with a positive one. If you just return the raw integer (uid.date) does it have any negatives in it? I think that is a custom field as well so I'd suspect that it isn't going in properly.

For the times being returned you probably wouldn't change those here. It will be in the timezone settings for the server. Now it could be a couple. Could be the MYSQL or possibly the PHP timezone setting. Google for how to change both of them to oz.


Re: MYSQL Date of Birth Pre 1970 & Timezone

$
0
0
by Al Brocklehurst.  

Thanks for the ideas Sam. 

The timestamp is recorded in a custom profile field 'Date of Birth' and is stored in the user_info_data field, where other custom profile data is stored so the (uid_data) can't change to (uid_date) as 'data' is the column name.

Re: MYSQL Date of Birth Pre 1970 & Timezone

$
0
0
by Al Brocklehurst.  

Some success thanks to Google and persistence

Replaced

DATE_FORMAT(FROM_UNIXTIME(uid.data), '%d-%m-%Y')

with

DATE_FORMAT(DATE_ADD(FROM_UNIXTIME(0), INTERVAL uid.data SECOND), '%d-%m-%Y')

so now show's pre 1970 dates.

Just need to sort out the timezone issue

Help with SQL Queries for a Novice.

$
0
0
by Deepak Bhalla.  

Hi !

I need a big help from my friends here. Our Moodle Site is serving apprx 30 thousand students from 29 different yet connected institutions. I have now been asked to prepare certain reports for which I have installed the ad-hoc reports query plugin however I am a novice as far as SQL is concerned hence I need help with SQL queries as the ones available under contributed reports are not suitable for my requirements.

I will be grateful if someone can help create the following queries ;

1. To get the list of active student accounts (not suspended) accounts where profile_field_institutionname (Custom Profile field) = School A and profile_field_rolename="Student" AND profile_field_ecourse="Class XYZ"

2. To get the list of active staff accounts (not suspended )  where profile_field_institutionname (Custom Profile field) = "School A" and profile_field_rolename="Staff".

3. To get the list of no. of logins and activities undertaken (add, update, delete) by staff (profile_field_rolename="Staff") of a particular institution(profile_field_institutionname="School A") between date1 and date2.

4. To get the list of (active accounts) students who have never logged in. for a particular institute(category) where  profile_field_institutionname = "School A" AND profile_field_ecourse="Class *" .

5. To get the list of (active accounts) Staff who have never logged in. for a particular institute(category) where  profile_field_institutionname = "School A".

Earlier I was preparing these reports manually by using filters available in the Browse Users section however now, as we are moving towards automation of a few things I am required to make and run these queries through SQL.

Further, is there any way we can increase the number of rows for the report from 5000 to 30000 ?

Please help.

Thanks and Regards

Deepak Bhalla

New Delhi

Re: Excel exports not working - ERR_INVALID_RESPONSE

$
0
0
by Maher Chamma.  

Thanks for the reply. I'm getting the following error:

[17-Oct-2015 15:53:51 America/New_York] PHP Fatal error:  Class 'ZipArchive' not found in /home/rabata/public_html/ribaat/lib/phpexcel/PHPExcel/Writer/Excel2007.php on line 234


Is that some sort of dependency that's gone missing?

Deleting automatic course backup files - possible through Configurable Reports?

$
0
0
by David Morrow.  

Greetings - and thanks ahead of time for any assistance.

The short version of my question is, Can I use Configurable Reports to delete automated backup files after I have identified them?

And more specifically, What should I do with the information returned from the particular Contributed Ad-hoc report described below?

And I’ll ask forgiveness ahead of time, as well, for what may be a poorly worded post (I am not a sysadmin or anything close to that, but I do most of our Moodle administration).

The longer version:

I would like to delete the automated course backups from our Moodle installation. After installing the Configurable Reports block I’ve identified almost 48 GB of these automated backup files.

I’ve been working in our test server (Moodle 2.9.2+ Build: 20151014) - a clone of our production server) and have done the following:

  • Installed the Configurable Reports block
  • Used it to create/run this query/report (this is where you can really tell that I don’t know what I’m talking about…):
SELECT SUM(filesize)/(1024*1024*1024) FROM `mdl_files` WHERE  `filename` LIKE '%mbz%' AND filearea =  'automated'

That report is from the Ad-hoc Contributed Reports page: https://docs.moodle.org/29/en/ad-hoc_contributed_reports
(although I did change ‘mdl_files’ to ‘prefix_files’)

That report returned 47.5625 ( space taken by backup files in GB, right?)

  • I then ran:

SELECT CONCAT( 'rm -f /var/moodledatanew/filedir/', SUBSTRING( contenthash, 1, 2 ) , '/', SUBSTRING( contenthash, 3, 2 ) , '/', contenthash )
FROM `mdl_files`
WHERE `filename` LIKE '%mbz%'
AND filearea = 'automated'

located on same page (https://docs.moodle.org/29/en/ad-hoc_contributed_reports#Delete_all_the_automated_backup_files)

  • Again, changed ‘mdl_files’ to ‘prefix_files’
  • That returned a list of 3,079 file names, in this format:

concat( 'rm -f /var/moodledatanew/filedir/', substring( contenthash, 1, 2 ) , '/', substring( contenthash, 3, 2 ) , '/', contenthash )

rm -f /var/moodledatanew/filedir/23/d0 /23d0baf8c3f82322355fe1923a39ed1ea0ced62c
rm -f /var/moodledatanew/filedir/7e/23 /7e2399f9862aa8a4f6301dbace15f4c4474838ad
rm -f /var/moodledatanew/filedir/14/80 /148002e7041ea6be5aa04a108e4f85a0632a5d30

  • I picked a few of these at random and verified that they were, indeed, .mbz files (by using Adminer, which I also just installed).

That last report is described this way - “Delete all the automated backup files. Prepare bash cli script to delete all the automated backup files on the file system. (clean up some disk space)”

Based on the report name, I originally thought that the process of running the report would delete the files, but it looks more like it has just identified the files.

So - what now? Can I use Configurable Reports to delete the files? If so, I would appreciate any help in structuring the query.

If I am way off track here - just say so. But - like I tell teachers for evaluations - be honest, but don't be mean!

Thanks all,

David


Viewing all 2785 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>