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

Re: Configurable reports for Moodle 3.2

$
0
0

by Madhu Avasarala.  

It "kinda works" for 3.3+ as well with some issues:

1. Chrome browser reports missing JS and CSS files. The directory structure must have changed in the themes I guess. There seem about 6 loading errors reported by the browser. When I go look for the file it does not indeed exist.

2. This is turn causes (my belief) some sporadic issues with Javascript templates in the database activity. The JS works intermittently. Rebooting the server sometimes corrects this issue.

3. I agree that this plugin is so valuable that an official 3.3 version is urgently in need. So Please! we are very grateful to the plugin maintainer obviously.


Re: All ungraded assignments w/Link returns no results

$
0
0

by Randy Thornton.  

Try this for a sanity check - just shows a simple list of courses and categories. Do you get the expected results? It's possible or even probable there's some error in my code which works on my test but not in your site. This will show tell us if the data is good, so that the places the query is pulling from are the same as I expect.


SELECT
c.shortname AS Course,
ccat.name AS Course_category
FROM prefix_course AS c
JOIN prefix_course_categories AS ccat ON ccat.id = c.category
WHERE 1=1
%%FILTER_CATEGORIES:c.category%%
ORDER BY c.shortname

Re: Error console reports missing CSS files

$
0
0

by Madhu Avasarala.  

Hi,


I am seeing the same problem albeit on Moodle 3.3+ so looks like it is not version dependent.

Have you tried posting on the tracker appropriate to block? posting here may not be noticed by the block maintainer?

Madhu

Svar: Activity completion by location SQL report?

$
0
0

by Dejan Marlovic.  

I'm trying to do the same thing but I have not come far. What I have found is that you can get SQL queries that are run on any php page by adding this at the top 


$DB->set_debug(true);


I have done this insade moodle/report/progress/index.php 

when I print the  excel compleation report I get these query print outs: 

SELECT * FROM mdl_course WHERE id = ? [array ( 0 => 2, )]


Query took: 0.00037908554077148 seconds.

SELECT * FROM mdl_context WHERE contextlevel = ? AND instanceid = ? [array ( 0 => 50, 1 => '2', )]
Query took: 0.00031900405883789 seconds.

SELECT name,value FROM mdl_user_preferences WHERE userid = ? [array ( 0 => '2', )]
Query took: 0.00031709671020508 seconds.

SELECT f.id FROM mdl_user_info_field f LEFT JOIN mdl_user_info_data d ON (d.fieldid = f.id AND d.userid = ?) WHERE f.required = 1 AND f.visible > 0 AND f.locked = 0 AND d.id IS NULL LIMIT 0, 1 [array ( 0 => '2', )]
Query took: 0.00019001960754395 seconds.

UPDATE mdl_user SET lastip = ?,lastaccess = ? WHERE id=? [array ( 0 => '80.217.170.175', 1 => 1496401494, 2 => '2', )]
Query took: 0.0022788047790527 seconds.

SELECT timeaccess FROM mdl_user_lastaccess WHERE userid = ? AND courseid = ? [array ( 0 => '2', 1 => '2', )]
Query took: 0.00055384635925293 seconds.

UPDATE mdl_user_lastaccess SET timeaccess = ? WHERE userid = ? AND courseid = ? [array ( 0 => 1496401494, 1 => '2', 2 => '2', )]
Query took: 0.0010018348693848 seconds.

SELECT ctx.* FROM mdl_context ctx WHERE ctx.path LIKE ? [array ( 0 => '/1/6/37/%', )]
Query took: 0.00017809867858887 seconds.

SELECT rc.id, rc.roleid, rc.permission, ctx.path FROM mdl_role_capabilities rc JOIN mdl_context ctx on rc.contextid = ctx.id WHERE rc.contextid IN (?,?,?) AND rc.capability = ? [array ( 0 => '1', 1 => '6', 2 => '37', 3 => 'moodle/course:isincompletionreports', )]
Query took: 0.00014281272888184 seconds.

SELECT COUNT(eu.id) FROM (SELECT DISTINCT eu1_u.id FROM mdl_user eu1_u JOIN mdl_user_enrolments ej1_ue ON ej1_ue.userid = eu1_u.id JOIN mdl_enrol ej1_e ON (ej1_e.id = ej1_ue.enrolid AND ej1_e.courseid = ?) JOIN mdl_role_assignments eu1_ra3 ON (eu1_ra3.userid = eu1_u.id AND eu1_ra3.roleid IN (5) AND eu1_ra3.contextid IN (1,6,37)) WHERE 1 = 1 AND ej1_ue.status = ? AND ej1_e.status = ? AND ej1_ue.timestart < ? AND (ej1_ue.timeend = 0 OR ej1_ue.timeend > ?) AND (eu1_u.id <> ?) AND eu1_u.deleted = 0) eu JOIN mdl_user u ON u.id = eu.id [array ( 0 => '2', 1 => 0, 2 => 0, 3 => 1496401500, 4 => 1496401500, 5 => '1', )]
Query took: 0.001317024230957 seconds.

SELECT rc.id, rc.roleid, rc.permission, ctx.path FROM mdl_role_capabilities rc JOIN mdl_context ctx on rc.contextid = ctx.id WHERE rc.contextid IN (?,?,?) AND rc.capability = ? [array ( 0 => '1', 1 => '6', 2 => '37', 3 => 'moodle/course:isincompletionreports', )]
Query took: 0.00011491775512695 seconds.

SELECT COUNT(eu.id) FROM (SELECT DISTINCT eu2_u.id FROM mdl_user eu2_u JOIN mdl_user_enrolments ej2_ue ON ej2_ue.userid = eu2_u.id JOIN mdl_enrol ej2_e ON (ej2_e.id = ej2_ue.enrolid AND ej2_e.courseid = ?) JOIN mdl_role_assignments eu2_ra3 ON (eu2_ra3.userid = eu2_u.id AND eu2_ra3.roleid IN (5) AND eu2_ra3.contextid IN (1,6,37)) WHERE 1 = 1 AND ej2_ue.status = ? AND ej2_e.status = ? AND ej2_ue.timestart < ? AND (ej2_ue.timeend = 0 OR ej2_ue.timeend > ?) AND (eu2_u.id <> ?) AND eu2_u.deleted = 0) eu JOIN mdl_user u ON u.id = eu.id [array ( 0 => '2', 1 => 0, 2 => 0, 3 => 1496401500, 4 => 1496401500, 5 => '1', )]
Query took: 0.0008549690246582 seconds.

SELECT rc.id, rc.roleid, rc.permission, ctx.path FROM mdl_role_capabilities rc JOIN mdl_context ctx on rc.contextid = ctx.id WHERE rc.contextid IN (?,?,?) AND rc.capability = ? [array ( 0 => '1', 1 => '6', 2 => '37', 3 => 'moodle/course:isincompletionreports', )]
Query took: 0.00033998489379883 seconds.

SELECT u.id, u.idnumber, u.firstnamephonetic,u.lastnamephonetic,u.middlename,u.alternatename,u.firstname,u.lastname, u.email FROM (SELECT DISTINCT eu3_u.id FROM mdl_user eu3_u JOIN mdl_user_enrolments ej3_ue ON ej3_ue.userid = eu3_u.id JOIN mdl_enrol ej3_e ON (ej3_e.id = ej3_ue.enrolid AND ej3_e.courseid = ?) JOIN mdl_role_assignments eu3_ra3 ON (eu3_ra3.userid = eu3_u.id AND eu3_ra3.roleid IN (5) AND eu3_ra3.contextid IN (1,6,37)) WHERE 1 = 1 AND ej3_ue.status = ? AND ej3_e.status = ? AND ej3_ue.timestart < ? AND (ej3_ue.timeend = 0 OR ej3_ue.timeend > ?) AND (eu3_u.id <> ?) AND eu3_u.deleted = 0) eu JOIN mdl_user u ON u.id = eu.id ORDER BY u.lastname ASC [array ( 0 => '2', 1 => 0, 2 => 0, 3 => 1496401500, 4 => 1496401500, 5 => '1', )]
Query took: 0.00078582763671875 seconds.

SELECT cmc.* FROM mdl_course_modules cm INNER JOIN mdl_course_modules_completion cmc ON cm.id=cmc.coursemoduleid WHERE cm.course=? AND cmc.userid IN (?,?,?,?,?,?,?,?,?,?,?,?,?) [array ( 0 => '2', 1 => '37', 2 => '38', 3 => '33', 4 => '39', 5 => '21', 6 => '15', 7 => '31', 8 => '34', 9 => '17', 10 => '16', 11 => '7', 12 => '2', 13 => '18', )]
Query took: 0.00013399124145508 seconds.

SELECT active.filter, fc.name, fc.value FROM (SELECT f.filter, MAX(f.sortorder) AS sortorder FROM mdl_filter_active f JOIN mdl_context ctx ON f.contextid = ctx.id WHERE ctx.id IN (1,6,37) GROUP BY filter HAVING MAX(f.active * ctx.depth) > -MIN(f.active * ctx.depth) ) active LEFT JOIN mdl_filter_config fc ON fc.filter = active.filter AND fc.contextid = 37 ORDER BY active.sortorder [array egg]
Query took: 0.00011610984802246 seconds.

SELECT f.filter, fc.name, fc.value FROM mdl_filter_active f LEFT JOIN mdl_filter_config fc ON fc.filter = f.filter AND fc.contextid = f.contextid WHERE f.contextid = ? AND f.active != ? ORDER BY f.sortorder [array ( 0 => 1, 1 => -9999, )]
Query took: 0.00020909309387207 seconds.
"Email address"
SELECT active.filter, fc.name, fc.value FROM (SELECT f.filter, MAX(f.sortorder) AS sortorder FROM mdl_filter_active f JOIN mdl_context ctx ON f.contextid = ctx.id WHERE ctx.id IN (1,6,37,193) GROUP BY filter HAVING MAX(f.active * ctx.depth) > -MIN(f.active * ctx.depth) ) active LEFT JOIN mdl_filter_config fc ON fc.filter = active.filter AND fc.contextid = 193 ORDER BY active.sortorder [array egg]
Query took: 0.0012497901916504 seconds.
"Instructions"""
SELECT active.filter, fc.name, fc.value FROM (SELECT f.filter, MAX(f.sortorder) AS sortorder FROM mdl_filter_active f JOIN mdl_context ctx ON f.contextid = ctx.id WHERE ctx.id IN (1,6,37,101) GROUP BY filter HAVING MAX(f.active * ctx.depth) > -MIN(f.active * ctx.depth) ) active LEFT JOIN mdl_filter_config fc ON fc.filter = active.filter AND fc.contextid = 101 ORDER BY active.sortorder [array egg]
Query took: 0.00083398818969727 seconds.
"Introduction"""
SELECT active.filter, fc.name, fc.value FROM (SELECT f.filter, MAX(f.sortorder) AS sortorder FROM mdl_filter_active f JOIN mdl_context ctx ON f.contextid = ctx.id WHERE ctx.id IN (1,6,37,102) GROUP BY filter HAVING MAX(f.active * ctx.depth) > -MIN(f.active * ctx.depth) ) active LEFT JOIN mdl_filter_config fc ON fc.filter = active.filter AND fc.contextid = 102 ORDER BY active.sortorder [array egg]
Query took: 0.00073599815368652 seconds.
"Mission and Values"""
SELECT active.filter, fc.name, fc.value FROM (SELECT f.filter, MAX(f.sortorder) AS sortorder FROM mdl_filter_active f JOIN mdl_context ctx ON f.contextid = ctx.id WHERE ctx.id IN (1,6,37,103) GROUP BY filter HAVING MAX(f.active * ctx.depth) > -MIN(f.active * ctx.depth) ) active LEFT JOIN mdl_filter_config fc ON fc.filter = active.filter AND fc.contextid = 103 ORDER BY active.sortorder [array egg]
Query took: 0.00057506561279297 seconds.
"Our rules of behavior"""
SELECT active.filter, fc.name, fc.value FROM (SELECT f.filter, MAX(f.sortorder) AS sortorder FROM mdl_filter_active f JOIN mdl_context ctx ON f.contextid = ctx.id WHERE ctx.id IN (1,6,37,104) GROUP BY filter HAVING MAX(f.active * ctx.depth) > -MIN(f.active * ctx.depth) ) active LEFT JOIN mdl_filter_config fc ON fc.filter = active.filter AND fc.contextid = 104 ORDER BY active.sortorder [array egg]
Query took: 0.00075101852416992 seconds.
"Reporting a concern - Speak up!"""
SELECT active.filter, fc.name, fc.value FROM (SELECT f.filter, MAX(f.sortorder) AS sortorder FROM mdl_filter_active f JOIN mdl_context ctx ON f.contextid = ctx.id WHERE ctx.id IN (1,6,37,107) GROUP BY filter HAVING MAX(f.active * ctx.depth) > -MIN(f.active * ctx.depth) ) active LEFT JOIN mdl_filter_config fc ON fc.filter = active.filter AND fc.contextid = 107 ORDER BY active.sortorder [array egg]
Query took: 0.00065493583679199 seconds.
"Quiz""""Nadiia Golovan""Nadiia.golovan@canpack.eu""Completed""Wednesday, 31 May 2017, 11:47 AM""Completed""Wednesday, 31 May 2017, 11:47 AM""Not completed""""Not completed""""Not completed""""Not completed""""Marzena Kowalczyk""marzena.kowalczyk@canpack.eu""Not completed""""Completed""Thursday, 1 June 2017, 9:24 AM""Completed""Thursday, 1 June 2017, 9:41 AM""Completed""Thursday, 1 June 2017, 9:43 AM""Completed""Thursday, 1 June 2017, 9:43 AM""Not completed""""Dejan Marlovic""d_marlovic@hotmail.com""Completed""Tuesday, 30 May 2017, 8:39 PM""Not completed""""Not completed""""Not completed""""Not completed""""Not completed""""Rajesh Menon""rajesh.menon@canpackme.ae""Completed""Thursday, 1 June 2017, 9:15 AM""Completed""Thursday, 1 June 2017, 11:38 AM""Completed""Thursday, 1 June 2017, 12:04 PM""Not completed""""Not completed""""Completed (achieved pass grade)""Thursday, 1 June 2017, 9:29 AM""Patrick Minogue""p_minogue@hotmail.com""Not completed""""Not completed""""Not completed""""Not completed""""Not completed""""Not completed""""richard minogue""richard.minogue@hibis.com""Completed""Monday, 15 May 2017, 7:06 PM""Completed""Monday, 15 May 2017, 7:09 PM""Completed""Thursday, 18 May 2017, 9:01 PM""Completed""Thursday, 18 May 2017, 7:07 PM""Completed""Monday, 15 May 2017, 6:53 PM""Not completed""""Anna Osip""Anna.Osip@canpack.eu""Not completed""""Not completed""""Not completed""""Not completed""""Not completed""""Not completed""""Anna Osip""whatever@example.com""Not completed""""Not completed""""Not completed""""Not completed""""Not completed""""Not completed""""Joanna O|egalska""joanna.ozegalska@canpack.eu""Completed""Tuesday, 23 May 2017, 9:30 AM""Completed""Tuesday, 23 May 2017, 9:30 AM""Completed""Tuesday, 23 May 2017, 9:30 AM""Not completed""""Completed""Tuesday, 23 May 2017, 9:55 AM""Not completed""""Agata Pastuszak""agata.pastuszak@canpack.eu""Not completed""""Not completed""""Not completed""""Not completed""""Not completed""""Completed (achieved pass grade)""Tuesday, 4 April 2017, 6:37 PM""Arkadiusz Toruniewski""r.minogue@gmail.com""Completed""Thursday, 18 May 2017, 11:54 AM""Completed""Thursday, 18 May 2017, 11:54 AM""Completed""Thursday, 18 May 2017, 11:57 AM""Completed""Thursday, 18 May 2017, 11:58 AM""Completed""Thursday, 18 May 2017, 11:49 AM""Completed (achieved pass grade)""Tuesday, 4 April 2017, 6:37 PM""Admin User""dmarlovic83@gmail.com""Completed""Friday, 12 May 2017, 8:55 PM""Completed""Thursday, 18 May 2017, 12:06 PM""Completed""Monday, 15 May 2017, 7:09 PM""Completed""Tuesday, 9 May 2017, 6:02 PM""Completed""Tuesday, 9 May 2017, 5:53 PM""Completed (achieved pass grade)""Tuesday, 4 April 2017, 6:47 PM""Teresa Zielniok""teresa.zielniok@canpack.eu""Not completed""""Not completed""""Not completed""""Not completed""""Not completed""""Not completed"""


This is basecally the report we need but when I run this in  thedatabase I get empty result but I think that this has to do with active filters that are not active when you just exceute the querys. 


Setting up a (course) filter

$
0
0

by Rolf Petersen.  

Hello 

Using M-3.2 (and 3.3 on another installation) and latest release of "configurable reports" I would like to solve following problem:

When I use a coursefilter, presently all courses on the plattform appear in the filter-dropdown.

That is very long List for us (>80 entries) and very difficult to use.

How can I set up a special filter, that reduces the number of courses presented within the Filter-dropdown-List?

We have a lot of courses (>80) in different course-categories. Each customer/institution has an own course-category.

All Users can be identified via userprofile to belong to a certain customer/institution (userprofile-filed "institution").

So when a user is logged in, it is clear what customer/institution he belongs to and what courses are belonging to his company/institution.

Now I want to set up a Filter (coursefilter), so that only courses belonging to the company (institution) of the active user appear in the filter-dropdown. So that userprofile->institution works as filter for course-category. (Of course spelling of "user-institution" and "course-category" is equal.)

Example:

User institution is "company_xyz" -->show all courses within course-category "company_xyz" within the filter-dropdown only.

How can I set up such a special filter, that reduces the Filter-dropdown-List?


Really need help!

Thank you!!!

Rolf

Need to join queries

$
0
0

by Aditya Dubay.  

Hi,

 

I wish to join below queries to generate configurable report:

To Find course: SELECT DISTINCT `data` FROM `mdl_user_info_data` WHERE `fieldid` ='1'
To Get user's first login: SELECT * FROM `mdl_user` WHERE `id` ='$userid'
To Get user's last login: SELECT * FROM `mdl_user` WHERE `id` ='$userid'
To Exclude some specific users: SELECT userid FROM `mdl_user_info_data` WHERE mdl_user_info_data.userid IN (SELECT userid FROM mdl_quiz_attempts WHERE userid != '839' AND userid != '2' AND userid != '1702' AND userid != '1703' AND userid != '1704' AND userid != '1705' ) AND fieldid ='5'
To Count students: SELECT userid FROM `mdl_user_info_data` WHERE mdl_user_info_data.userid IN (SELECT userid FROM mdl_quiz_attempts) AND fieldid ='5'
To Count quiz attempt: SELECT COUNT(`userid`) AS total_student FROM `mdl_quiz_attempts` WHERE `userid` ='$userid'
To Get Date and time: SELECT * FROM `mdl_quiz_attempts` WHERE `userid` ='$userid' ORDER BY `mdl_quiz_attempts`.`id` ASC
To Check custom_profile_field: SELECT * FROM `mdl_user_info_data` WHERE `userid`='$userid' and fieldid ='1'
To Get username: SELECT * FROM `mdl_user` WHERE `id` ='$userid'
To Get custom_profile_field: SELECT * FROM `mdl_user_info_data` WHERE `userid`='$userid' and fieldid ='5'
To Get total of custom_profile_field: SELECT DISTINCT `data` FROM `mdl_user_info_data` WHERE mdl_user_info_data.userid IN (SELECT userid FROM mdl_quiz_attempts) AND fieldid ='1'
To Get total students: SELECT * FROM `mdl_user_info_data` WHERE `userid`='$userid' and fieldid ='5'
To get Quiz Name: SELECT * FROM `mdl_quiz` WHERE `id` ='$quiz_id'

 

Above queries are to get data in column like this:

S.NO

User Name

Course Name (custom_profile_field)

Examination Centre (custom_profile_field)

No. Of Quiz (How many quizzes student attempted )

Quiz Attempt (Names of Quiz Attempted)

Start Time (Start time of quiz)

End Time (End time of Quiz)

Marks (Grades received by student)

First Login (First login of student)

last Login (Last login of student)

 

Please help me in this.

Thanks in Advance.

Re: Need to join queries

$
0
0

by Aditya Dubay.  

No help till now sad

Re: Need to join queries

$
0
0

by Aditya Dubay.  

I try to explain it again:
 
In my report I wish to get data in below columns:
 

S.NO

User Name

Course Name

Examination Centre

No. Of Quiz

Quiz Attempt

Start Time

End Time

Marks

First Login

last Login

 
User Name – username of student
Course Name – custom_profile_field of user
Examination Center - custom_profile_field of user
No. of Quizzes – Count of number of quizzes user attempted
Quiz Attempted – Names of quizzes user attempted
Start Time – Start time of quiz attempt
End Time – End time of quiz attempt
First Login – First login detail of user
Last Login – Last login detail of user
 
Please help smile

Aggregate category-grade from all courses

$
0
0

by Ramon Rodriguez.  

Hi:


I'd like some help for creating a report that gives me just the total of the different grade categories. I'd like to be able to search for a specific student and to get something like this.


Student Name: 

 

Grade Category 1

Grade Category 2

Grade Category 3

Subject 1

 

 

 

Subject 2

 

 

 

Subject 3

 

 

 

Is there any solution to this?


Thanks,

SQL query number of active courses and number of active teachers

$
0
0

by David Mesa.  

Good afternoon moodle community



I would like to know if there is a consultation that shows me the courses and active teachers. Since there are registered courses on the platform, I need to know which of these are being actively used and also identify those who are in a state of abandonment, I think it would be ideal that after one month the course will be declared inactive and in the same way Happens in the case of teachers.
I have a table that I call indicators is something like this:

| Id period | Active Courses | Courses in total | Active Teachers | Teachers in total |

| 2017-1 | ? | 53 | ? | 47 |

So where is the question mark is what I lack, I would appreciate your great help.

Thanks and regards.

Re: Need to join queries

$
0
0

by Aditya Dubay.  

Hello,

 

Somebody please help

Odp: Re: "Print report" button is not working on IE and Chrome

$
0
0

by Łukasz Sanokowski.  

Hello

I just want to confirm that printing feature does not work in Chrome.

Regards

Configurable Reports - Error: Database connection failed

$
0
0

by Samuel Ng.  

Am encountering the following error when i try to review the report or even delete the report. Was able to do so previously without having any issues. Any ideas on what could be the cause?

Thanks in advance.

Screen shot of error message

Re: Configurable Reports - Error: Database connection failed

$
0
0

by Emma Richardson.  

Is the rest of the site working correctly?  If so, then I would check that you are using the latest version and maybe upgrade the plugin.  If not, then, as the error states, you have a problem connecting to the database.  Try restarting it or checking the connection settings.

Add completion date to user

$
0
0

by Moodle User123.  

Hi,

I was wondering if anyone could help me. I've just installed the configurable reports block and, as my SQL knowledge is unfortunately non-existent, I thought I'd try some of the built in configurable reports first. I've managed to create a users report that lists the user and course fields for a particular course that I want, with the exception of the date of completion, which I would love to add to this report but have no idea how to include.


If anyone could advise me on how to add a course completion date to a users report (or if there's another report I should be using) I would very much appreciate some help.


Many thanks,

John


Re: Configurable Reports - Error: Database connection failed

$
0
0

by Samuel Ng.  

Hi Emma

Yes, the rest of the site is working correctly. In fact it is only this one report that is giving me this error, I am also unable to delete

this report, with the error message being triggered when I attempt to delete it.

Creating new reports doesn't trigger the same error.

Best Regards

Samuel NG

Re: Configurable Reports - Error: Database connection failed

$
0
0

by Emma Richardson.  

Oh, very strange.  Can you get into the report to edit it?  I would try rewriting the sql query to something very simple that you know will work and see if that fixes the issue or at least now allows you to delete it.

Re: Configurable Reports - Error: Database connection failed

$
0
0

by Samuel Ng.  

Hi Emma


I am not able to edit the sql. The same error occurs when I try to edit or even delete the report.


Best Regards

Samuel NG

Re: Configurable Reports - Error: Database connection failed

$
0
0

by Emma Richardson.  

You will probably need to fix this directly in the database then.  I am not real familiar with the database structure for that plugin but I imagine that you can find the reference to the report somewhere in there and delete it there.  Make sure you backup first!

Re: Configurable Reports - Error: Database connection failed

$
0
0

by Samuel NG.  

Hi Emma

Thanks so much for your advice.

Best Regards

Samuel NG

Viewing all 2794 articles
Browse latest View live


Latest Images

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