Best practice forum (Archived)

La discussione è stata rimossa.

 
L'intervento è stato rimosso
Sunday, 5 August 2012, 13:54
Il contenuto di questo intervento è stato rimosso, non è più possibile visualizzarlo.
Simon Coggins
Re: Competencies - Reporting on Not Competency / Compliant
di Simon Coggins - Sunday, 2 September 2012, 19:35
Gruppo Totara

Hi Patrick,

I'm afraid this isn't currently possible, although I agree it would be a very useful addition!

Probably the best way to implement this is as a new report source. I've created a feature request ticket to track it and hopefully we'll have some time to look at it soon.

Simon

L'intervento è stato rimosso
Tuesday, 11 September 2012, 10:07
Il contenuto di questo intervento è stato rimosso, non è più possibile visualizzarlo.
Simon Coggins
Re: Competencies - Reporting on Not Competency / Compliant
di Simon Coggins - Tuesday, 11 September 2012, 18:03
Gruppo Totara

There's some developer documentation on how to write report sources here:

http://docs.moodle.org/dev/reportbuilder#Beginner_Topics

They are not 100% complete but they should give a developer enough information to write a basic report source.

Simon

Nikhil Bansal
Re: Competencies - Reporting on Not Competency / Compliant
di Nikhil Bansal - Sunday, 21 February 2021, 00:14
Gruppo Partners
Hi,


I have written a report with the source as per the documentation. 

However, on running it is not showing any data. Can you please suggest? 

Report is shown in v13 report builder competencies with columns & filters. I can also see the fields in the database. However, it is not showing any data even after running cron job multiple times.

Is there any additional step required or setting or can debug some other way?

Regards,

Nikhil

Craig Eves
Re: Competencies - Reporting on Not Competency / Compliant
di Craig Eves (Totara Support) - Sunday, 21 February 2021, 14:44
Gruppo Totara

Hi Nikhil

One thing to check is that the user running the report has permissions to view the data.

You can try and run the report with developer debugging on to check for any errors. 

If you copy the the report url and add the string &debug=1 at the end then the SQL will be produced and check if anything doesn't look right.

Regards


Nikhil Bansal
Re: Competencies - Reporting on Not Competency / Compliant
di Nikhil Bansal - Sunday, 21 February 2021, 15:42
Gruppo Partners

Hi Craig,

Thanks, after some debugging I had got it working last night.

Few questions: 
1. Can we do inner with the non-totara table within the rb_base_source report?
2. Also, can we do advanced inner join with group by within the rb_base_source report? 
I have taken the competency status report & sub-deployed on local & trying to just show the latest proficiency result (Not all).

I was trying developer guide - https://help.totaralearning.com/display/DEV/Advanced+Joins

I think it is not updated. Can you please suggest advanced joins documents with examples? I am trying to do below.

SELECT *
  FROM ( SELECT competency_id as competency_id_max,user_id as user_id_max
              , MAX(last_aggregated) AS max_last_aggregated
           FROM public.mdl_totara_competency_achievement
         GROUP BY competency_id,user_id ) AS m
INNER
  JOIN public.mdl_totara_competency_achievement AS t
    ON t.competency_id = m.competency_id_max
	 AND t.user_id = m.user_id_max
   AND t.last_aggregated = m.max_last_aggregated

Regards,

Nikhil

Craig Eves
Re: Competencies - Reporting on Not Competency / Compliant
di Craig Eves (Totara Support) - Monday, 22 February 2021, 17:30
Gruppo Totara

Hi Nikhil

The documentation hasn't been completed - unfortunately i don't have the SQL knowledge to answer this 

Does this query give the expected results when you run this in the database ?

regards



Nikhil Bansal
Re: Competencies - Reporting on Not Competency / Compliant
di Nikhil Bansal - Monday, 22 February 2021, 18:07
Gruppo Partners

Hi Craig,

Yes, the SQL give desired results in the SQL database. I have tested it and was trying to write the same way that is expected by Totara.

While asking question on Helpdesk I have been asked to refer developer guide or documentation. 

However, unfortunately the developer guide isn't complete.

So, will it be possible for your developer team to complete that page at least or they can try SQL query I have provided and give equivalent query as per Totara report builder requirements? 

Regards,

Nikhil

Craig Eves
Re: Competencies - Reporting on Not Competency / Compliant
di Craig Eves (Totara Support) - Monday, 22 February 2021, 18:47
Gruppo Totara

Hi Nikhil

The report documentation has been incomplete for a while now so is currently a low priority.

You have created a helpdesk ticket that we can provide advice on with your specific query. 

Regards


Nikhil Bansal
Re: Competencies - Reporting on Not Competency / Compliant
di Nikhil Bansal - Monday, 22 February 2021, 19:27
Gruppo Partners

Hi Craig,

Thanks for your reply here. I have updated the ticket with more details.

Regards,

Nikhil