Best practice forum (Archived)

该论坛讨论已删除

 
该论坛帖子已被删除
2012年08月5日 Sunday 13:54
该论坛帖子的内容已被删除,无法再访问。
CogginsSimon
Re: Competencies - Reporting on Not Competency / Compliant
CogginsSimon 发表于 2012年09月2日 Sunday 19:35
小组 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

该论坛帖子已被删除
2012年09月11日 Tuesday 10:07
该论坛帖子的内容已被删除,无法再访问。
CogginsSimon
Re: Competencies - Reporting on Not Competency / Compliant
CogginsSimon 发表于 2012年09月11日 Tuesday 18:03
小组 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

BansalNikhil
Re: Competencies - Reporting on Not Competency / Compliant
BansalNikhil 发表于 2021年02月21日 Sunday 00:14
小组 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
Eves (Totara Support)Craig 发表于 2021年02月21日 Sunday 14:44
小组 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


BansalNikhil
Re: Competencies - Reporting on Not Competency / Compliant
BansalNikhil 发表于 2021年02月21日 Sunday 15:42
小组 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
Eves (Totara Support)Craig 发表于 2021年02月22日 Monday 17:30
小组 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



BansalNikhil
Re: Competencies - Reporting on Not Competency / Compliant
BansalNikhil 发表于 2021年02月22日 Monday 18:07
小组 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
Eves (Totara Support)Craig 发表于 2021年02月22日 Monday 18:47
小组 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


BansalNikhil
Re: Competencies - Reporting on Not Competency / Compliant
BansalNikhil 发表于 2021年02月22日 Monday 19:27
小组 Partners

Hi Craig,

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

Regards,

Nikhil